-
Notifications
You must be signed in to change notification settings - Fork 0
Rewrite as wrapper around Java impl #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This way we can add more values in the future without a breaking change.
|
GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
---|---|---|---|---|---|
329054 | Triggered | RSA Private Key | 6d6b8c9 | src/com/mdsol/mauth/clojure/client.clj | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Revoke and rotate the secret.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
☝️ That GitGuardian check is a false positive. There is a key in a rich comment form, but it was generated specifically for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the README.md Usage and the included changelog for this version 3.
{:status 401 | ||
:body {:message (if exception | ||
(ex-message exception) | ||
"MAuth authentication failed.")}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message should be "Unauthorized." We should only log the exception.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Why? What's the harm in distinguishing between "this signature has expired" and "I couldn't find a public key for that UUID"?
- The caller can customize this behavior if they don't like the default. That includes SF – SF can deviate from this default, if we want it to.
- This is a library, so it shouldn't log anything unless it gives the caller control over that logging. That's a yak I don't want to take the time to shave right now.
Let's link this PR to a MCC ticket |
I think there's one I can link – but why? |
just to backtrack what requirement caused this effort, and also it is a standard practice to keep the PRs associated with a ticket. |
Closing this PR in favor of #34, whose branch name includes a Jira ticket number. |
Major version bump!
This PR completely rewrites the library to be a wrapper around the Java implementation, rather than an independent pure-Clojure implementation. It also uses the standard MAuth test suite to prove correctness.
Some notable details of the approach taken:
ClientPublicKeyProvider
implementations provided by mauth-jvm-clients. As a future enhancement, I would like to add a factory function that will turn any HTTP client following the clj-http signature into aClientPublicKeyProvider
with appropriate caching.convert
namespace defines protocols which can be used to extend this flexibility further, if desired.