-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: add required scopes
configuration property to openid-connect
plugin
#10493
feat: add required scopes
configuration property to openid-connect
plugin
#10493
Conversation
@csotiriou thanks for this PR. It will be great if you can add test cases for it :) |
Hello @moonming I'm trying to wrap my head around the test implementation, my familiarity with lua is limited. However, I have reached the point where I'm making a sample test. I noticed that for the openid-connect plugin there are some sample oidc providers with a dummy client-id and client-secret used. Must I use the same and have the same configuration in my keycloak? If not, how are tests going to pass during automation? |
@Revolyssup Please check how to write a more appropriate test case. I am not familiar with this plug-in. |
Signed-off-by: Ashish Tiwari <[email protected]>
@moonming @csotiriou I have added the test case and fixed the lint tests to save time. |
Signed-off-by: Ashish Tiwari <[email protected]>
Signed-off-by: Ashish Tiwari <[email protected]>
@csotiriou thanks for your great work 👍 |
I think you need to add a test case for scope validation |
@soulbird Do you mean the case where the correct scope is passed and the request succeeds? |
@csotiriou please fix this when you have time. |
Signed-off-by: Ashish Tiwari <[email protected]>
yes |
…tiriou/apisix into feature/oidc-required-scopes
Thanks for the notification, @moonming , It seems that the merge conflicts in the conflicting documentation files have been resolved by @Revolyssup faster, thank you for the help! |
Fixes #10352
This adds the optional
required_scopes
configuration property in theopenid-connect
plugin configuration. In cases where the introspection endpoint of the OIDC server is called, the plugin will check if all required scopes are present in the scopes returned by the introspection endpoint.I have also updated the documentation to reflect this, in case anyone finds this PR valuable.