-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Client credentials not correctly encoded in Basic Auth #9610
Copy link
Copy link
Closed
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: breaks-passivityA change that breaks passivity with the previous releaseA change that breaks passivity with the previous releasetype: bugA general bugA general bug
Milestone
Metadata
Metadata
Assignees
Labels
in: oauth2An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose)type: breaks-passivityA change that breaks passivity with the previous releaseA change that breaks passivity with the previous releasetype: bugA general bugA general bug
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
OAuth2AuthorizationGrantRequestEntityUtils.getTokenRequestHeaders does not work properly if client credentials contain special characters. From RFC 6749:
Actual Behavior
The client with client name or password containing special characters cannot login. The provider returns exception.
Expected Behavior
The client with client name or password containing special characters can be authenticated.
Configuration Sample
spring.security.oauth2.client.registration.sth.client-secret = sthUI=+2~fubar
Where
org.springframework.security.oauth2.client.endpoint.OAuth2AuthorizationGrantRequestEntityUtils.getTokenRequestHeaders(ClientRegistration)
Related
This is related to spring-attic/spring-security-oauth#1826