-
Notifications
You must be signed in to change notification settings - Fork 41.3k
Closed
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement
Description
Background
According to this doc, resource-server must validate iss
and aud
.
Current situation
iss
- Congiguration: Now
iss
will be configured byspring.security.oauth2.resourceserver.jwt.issuer-uri
, - Validation logic:
Lines 68 to 76 in 30c2727
JwtDecoder jwtDecoderByJwkKeySetUri() { NimbusJwtDecoder nimbusJwtDecoder = NimbusJwtDecoder.withJwkSetUri(this.properties.getJwkSetUri()) .jwsAlgorithm(SignatureAlgorithm.from(this.properties.getJwsAlgorithm())).build(); String issuerUri = this.properties.getIssuerUri(); if (issuerUri != null) { nimbusJwtDecoder.setJwtValidator(JwtValidators.createDefaultWithIssuer(issuerUri)); } return nimbusJwtDecoder; }
aud
No related logic
Requirement
Just like iss
, we should validate aud
. And add a property like spring.security.oauth2.resourceserver.jwt.audience
.
Metadata
Metadata
Assignees
Labels
status: supersededAn issue that has been superseded by anotherAn issue that has been superseded by anothertype: enhancementA general enhancementA general enhancement