-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feature Request: Add PKCE Support #6
Comments
Hi @ds-sebastian, thx for creating this feature request. |
Ok PKCE is not that easy, because i'am currently relying on the introspection response to validate tokens and this doesn't support PKCE. |
@ds-sebastian PKCE should be supported now. |
Finally got around to testing. Following the local dev steps with the |
Hi, |
I've seen you check a jwt for the expiration date and the issuer here: Lines 228 to 231 in 5623307
What do you think of adding a check for the I think this would be great for the security of this middleware since at the moment we only check for a non-expired token from the provided auth server but we don't check whether the token was really issued for our application. |
@WhySoBad yes makes sense. But i think we should make it configurable. I think it doesn't always neccesarily need to match the client id. options := []jwt.ParserOption{
jwt.WithIssuer(oidcAuth.DiscoveryDocument.Issuer),
jwt.WithExpirationRequired(),
}
if oidcAuth.Config.Provider.ValidAudience != "" {
options = append(options, jwt.WithAudience(oidcAuth.Config.Provider.ValidAudience))
}
parser := jwt.NewParser(options...) |
I think having it configurable is a good idea. I also noticed the Additionally, I think the issuer should be configurable too. What do you think of the following config options:
which would allow for any combination of those assertions whilst still having a reasonable default values |
# Conflicts: # utils.go
I'm currently using this plugin with an OIDC provider (Kanidm) that requires PKCE (Proof Key for Code Exchange).
Feature request:
Please add support for PKCE in the OAuth2 authorization flow. This would involve:
PKCE is becoming a standard security practice for OAuth2, especially for public clients, and adding this feature would greatly enhance the plugin's compatibility and security!
The text was updated successfully, but these errors were encountered: