-
Notifications
You must be signed in to change notification settings - Fork 6.1k
DPoP filter is ignored when another AuthenticationFilter is present #17173
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
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: duplicate
A duplicate of another issue
type: bug
A general bug
Comments
@gbaso Thanks for reporting this. Indeed this is an issue if there is more than one Overriding Would you be interested in submitting a fix? |
If no one would mind, I could prepare a fix. |
@therepanic you can go ahead |
therepanic
added a commit
to therepanic/spring-security
that referenced
this issue
May 29, 2025
…uthenticationFilter` (spring-projects#17173) Signed-off-by: Andrey Litvitski <[email protected]>
therepanic
added a commit
to therepanic/spring-security
that referenced
this issue
May 30, 2025
…uthenticationFilter` (spring-projects#17173) Signed-off-by: Andrey Litvitski <[email protected]>
therepanic
added a commit
to therepanic/spring-security
that referenced
this issue
May 30, 2025
…uthenticationFilter` (spring-projects#17173) Signed-off-by: Andrey Litvitski <[email protected]>
therepanic
added a commit
to therepanic/spring-security
that referenced
this issue
Jun 3, 2025
…thenticationFilter` (spring-projects#17173) Signed-off-by: Andrey Litvitski <[email protected]>
therepanic
added a commit
to therepanic/spring-security
that referenced
this issue
Jun 5, 2025
…uthenticationFilter` (spring-projects#17173) Signed-off-by: Andrey Litvitski <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
in: oauth2
An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)
status: duplicate
A duplicate of another issue
type: bug
A general bug
DPoP filter is implemented as a an
AuthenticationConverter
applied to anAuthenticationFilter
.AuthenticationFilter
extendsOncePerRequestFilter
, which means that only the first filter of that type actually do its filtering. An attribute then is added to the request that prevents additional filters of the same type to do anything other than proceeding to the next filter.In my experience,
AuthenticationFilter
plusAuthenticationConverter
is the easiest way to create a custom filter, therefore I believe it to be very commonly used. Depending on the configuration, either DPoP or the custom filter is completely disabled, based on the filter ordering.Sample application with oauth2 resource server + custom API key: https://github.com/gbaso/oauth2-api-server
The text was updated successfully, but these errors were encountered: