-
Notifications
You must be signed in to change notification settings - Fork 13
PXP-11248 PXP-11258 using POST auth/mapping instead of GET to support client credentials authentication #254
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
| resourcesEndpoint, | ||
| { | ||
| method: 'GET', | ||
| method: 'POST', |
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.
This is a breaking change since the POST endpoint in older Arborist versions does not accept a token. I think we should add a retry here to make it backwards compatible - if the POST request doesn't work, try a GET request.
And a comment explaining the situation - we can remove the retry in a little while, when it will likely not cause issues
…it doesn't support token auth
|
@grugna eslint is complaining: |
|
Tested in QA - Arborist logs:
The last one doesn't sound right ^ @grugna |
|
@paulineribeyre I agree it should only call a POST ( #254 (comment) ). I can't recreate it on my side, which images are you using? |
|
@grugna Sorry for the confusion, the logs above are when the user is unauthenticated. No jwt, so it falls back on the request body.
The concern I have is that when the user is unauthenticated, the endpoints have different behaviors:
So with this code, for an unauthenticated user, we will always fall back to the GET endpoint and return "anonymous" access. If we ever remove the fallback to the GET endpoint from Guppy, the behavior will change to not supporting unauthenticated requests. I need to think about this a bit more, see if the Arborist logic can be refactored |
|
Ah, I see what you are saying. @paulineribeyre I agree this would need to be an arborist change. Let me know if you want me to start another PR for that. |
|
Hi @grugna, I pushed a fix for the above and wrote down the results of my tests here: uc-cdis/arborist#164 If the changes look good to you, I think we can go ahead and merge this one |
Depends on uc-cdis/arborist#163
New Features
Breaking Changes
Bug Fixes
Improvements
Use POST instead of GET /auth/mapping endpoint to enable client_credentials authentication
Dependency updates
Deployment changes