-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
Describe the bug
The token introspection endpoint fails, if the passed token contains an issuer claim, which is not a URI.
Looking at the specification in https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1, it says that it must be an URI or String. In our specific case it is not a URI, because we set the issuer to String as we are following the client assertion specification (https://datatracker.ietf.org/doc/html/rfc7521), so the issuer claim is the clientId.
The stacktrace is:
java.lang.IllegalArgumentException: iss must be a valid URL
at org.springframework.security.oauth2.server.authorization.OAuth2TokenIntrospection$Builder.validateURL(OAuth2TokenIntrospection.java:337)
at org.springframework.security.oauth2.server.authorization.OAuth2TokenIntrospection$Builder.validate(OAuth2TokenIntrospection.java:307)
at org.springframework.security.oauth2.server.authorization.OAuth2TokenIntrospection$Builder.build(OAuth2TokenIntrospection.java:278)
at org.springframework.security.oauth2.server.authorization.authentication.OAuth2TokenIntrospectionAuthenticationProvider.withActiveTokenClaims(OAuth2TokenIntrospectionAuthenticationProvider.java:158)
at org.springframework.security.oauth2.server.authorization.authentication.OAuth2TokenIntrospectionAuthenticationProvider.authenticate(OAuth2TokenIntrospectionAuthenticationProvider.java:114)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:182)
...
Expected behavior
Using the introspection token endpoint should be possible if the issuer claim is not a URI. I don't see why the claims are validated in the introspection endpoint in such a way, that tokens which have been created just before are invalid
Metadata
Metadata
Assignees
Labels
status: invalidAn issue that we don't feel is validAn issue that we don't feel is valid