Repository navigation
Closed
Labels
priority: mediumMedium prioritytype: authRelated to authorization or authenticationworkload: daysLikely takes days to resolve
Milestone
Description
Why
spring-security-oauth2 and spring-security-oauth2-autoconfigure are end
of life and don't run on Spring Security 6 or 7. Spring Security 5.8 (used
now) has the resource server support that replaces them, so the switch can
happen on Spring Boot 2.7, before the framework moves.
How
- Replace
@EnableResourceServer/ResourceServerConfigurerAdapter
(ResourceServerConfiguration) with aSecurityFilterChainusing
oauth2ResourceServer().opaqueToken(), with anOpaqueTokenIntrospector
that validates tokens at the user info endpoint, as now. - Keep the behaviour exactly: the same principal (
User, built by
ElixirPrincipalExtractor), group authorities (GroupNamesSecurityExtractor,
group prefix), claim authorisation (tesk.api.authorisation.claim),
service-client JWTs checked locally (ServiceClientTokenServices, feat(auth): accept tokens of allow-listed clients #154),
public paths (service-info unlessTESK_API_SERVICE_INFO_PUBLIC=false,
API description, Swagger UI), and the JSON error responses and
WWW-Authenticateheaders ofCustomAuthenticationEntryPoint. - Keep
SECURITY_OAUTH2_RESOURCE_USER_INFO_URI
(security.oauth2.resource.user-info-uri) working; if a new key is added,
the old one stays as a fallback and the docs say so. - The existing integration tests (
AuthIT,ClaimAuthIT,
ServiceClientAuthIT,NoAuthIT,ServiceInfoTokenRequiredIT,
SwaggerUi*AuthIT,LegacyUserLabelsIT) are the contract: they pass
unchanged, apart from imports of removed classes. - Remove both dependencies and the
spring-security-oauth2pin; docs
(access control, configuration) updated.
Acceptance criteria
- No
org.springframework.security.oauthartifacts in the build. - All auth integration tests pass unchanged; the smoke test (401 without a
token, public service-info) passes. - Docs updated; no configuration change needed for existing deployments.
Part of #66.
Metadata
Metadata
Assignees
Labels
priority: mediumMedium prioritytype: authRelated to authorization or authenticationworkload: daysLikely takes days to resolve
Type
Projects
- StatusShow more project fieldsDone
Activity
Merge branch 'dev' into refactor/165-resource-server