-
Notifications
You must be signed in to change notification settings - Fork 79
Scope Validation is not working. Is a feature or dead code? #29
Comments
I have same question. |
Feature is working as expected. Please note it doesn't make sense to ask to validate 3 scopes for a single endpoint. You should review your API security practices. |
Thank for your reply.
I visit the configured route in kong with browser i get redirected to keycloak to authenticate and after success i can see my endpoint (anyuser I created in keycloak can access this endpoint through the browser). But when I using this code to get access token and connect to endpoint I got error:
And after I check the access token, I don't see any value "openid" in scope. Maybe i made a mistake? |
Scope validation is not intended to be used with OpenID scope, that's the whole purpose of the oidc plugin. |
I see. Thank you for your answer. |
From what I see here in handler.lua, it's possible to pass multiple scopes to the plugin configuration and asks it to validate if the returned token has these scopes, is that correct?
https://github.com/revomatico/kong-oidc/blob/master/kong/plugins/oidc/handler.lua#L126
But it seems that this code only supports 1 scope, not multiple scopes.
I was wondering if this is a hidden feature, or is just some dead code that was left behind. I would be interested in submiting a PR if that's welcome.
The text was updated successfully, but these errors were encountered: