Move logic to reject certain endpoints when using OBO from authenticator to endpoint validator#6132
Move logic to reject certain endpoints when using OBO from authenticator to endpoint validator#6132cwperks wants to merge 3 commits intoopensearch-project:mainfrom
Conversation
…tor to endpoint validator Signed-off-by: Craig Perkins <cwperx@amazon.com>
…tor to endpoint validator Signed-off-by: Craig Perkins <cwperx@amazon.com>
PR Reviewer Guide 🔍(Review updated until commit 7f671f2)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 7f671f2
Previous suggestionsSuggestions up to commit b1982e8
|
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 7f671f2.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit 7f671f2 |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6132 +/- ##
==========================================
- Coverage 74.85% 74.81% -0.04%
==========================================
Files 447 446 -1
Lines 28480 28476 -4
Branches 4331 4327 -4
==========================================
- Hits 21318 21305 -13
- Misses 5166 5178 +12
+ Partials 1996 1993 -3
🚀 New features to boost your workflow:
|
Description
This PR removes authorization logic from within OnBehalfOfAuthenticator. Currently, this authenticator has logic to reject a request for forbidden endpoints (i.e. obo token cannot be used to change a user's password or request new obo tokens).
While the logic in the authenticator works, it necessarily puts authorization logic where authentication takes place. The changes in this PR move that decision to after authentication is performed and mark it directly on the rest handler.
Refactoring
Issues Resolved
Related to discussion here: #5443 (comment)
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.