-
Notifications
You must be signed in to change notification settings - Fork 1.7k
#913 Support RFC 8693 (OAuth 2.0 Token Exchange) for the "scope" claim in ScopesAuthorizer #1478
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
|
The build is broken, it fails on irrelevant part from this PR. #1436 fixes is I think. |
|
This is still an issue. Adding my 👍 to get this small and valuable PR merged. |
|
Mehmet, Unfortunately the last build is failed: 5 acceptance tests have failed! Why is your PR code so unstable? |
|
I haven't found out the reason why the tests failed with a quick look. I couldn't figure out the tests structure. When I have time I'll look into it. |
|
@mehyaa Could you add me as collaborator to your forked repo please? I will fix develop branch because now it has the diff, but both develop branches should be identical. |
|
@raman-m I've fixed the tests. Failing tests were written for the bug that requires one of allowed scopes. I've changed the claims and allowed scopes on tests so they can test the correct conditions. For adding new tests to test |
|
@raman-m I've added you as collaborator on my fork, you can fix the diff or guide me to how-to. |
|
Interestingly some irrelevant tests fail irregularly. |
Thanks for fixing of failed tests!
No, at least one new test should cover claims logic having them multiple in the related config property. Come on! We've changed the logic from single Scope to multiple ones! And it is definitely right time to cover these changes. I have idea: let's write tests for each linked issue:
Sounds good? |
|
Don't worry! This is unstable scenario: Ocelot.AcceptanceTests.ConfigurationReloadTests.should_reload_config_on_change |
|
@mehyaa |
|
I like this, guys! Let's close the PR and open once again 🤣 |
|
Oops, I've changed my mind. I forgot that PR is now part of the .NET 10 milestone. |
|
@raman-m the last close/open was by mistake, my bad. I've figured out the acceptance tests' problem, the token server was misconfigured. I've added a fix there too. You need to review. On my machine The tests are passing now. |
@mehyaa could you just comment this in code please. It's fine for me and i will approve your PR. |
Added a comment to the code. |
raman-m
left a comment
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 code looks much better now, with some minor but valuable suggestions noted below.
It seems acceptance testing is complete, and I will review unit testing and code coverage later.
test/Ocelot.AcceptanceTests/Authorization/AuthorizationTests.cs
Outdated
Show resolved
Hide resolved
test/Ocelot.AcceptanceTests/Authorization/AuthorizationTests.cs
Outdated
Show resolved
Hide resolved
raman-m
left a comment
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.
Ready for delivery ✅
- Code review ✔️ ✔️
- Unit testing ✔️ ✔️
- Acceptance testing ✔️
- Updated docs ✔️
|
@mehyaa Congrats, Mehmet! 🥳 |
Fixes #913
Scopes can be a space separated list in a single claim. Include this possibility on allowed scopes check.
Proposed Changes