spring-projects / spring-projects/spring-security
Autoconfig bearer only clients OIDC
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Summary
I'm trying to connect Keycloak and Spring Boot with Webflux (Kotlin) and I'm trying to pass Keycloak token as Bearer in Authorization header. Spring Boot App is set as Bearer only client.
Actual Behavior
Redirects me to root URL of Keycloak server
Expected Behavior
It would be good if Spring Security could detect Authorization header nad try to verify it without redirection to root URL
Configuration
Before I only used
security:
oauth2:
client:
registration:
x-users:
client-id: xxx
client-secret: xxx
provider:
x-users:
authorization-uri: https://xxx/auth/
token-uri: https://xxx/auth/realms/test/protocol/openid-connect/token
user-info-uri: https://xxx/auth/realms/test/protocol/openid-connect/userinfo
user-name-attribute: sub
jwk-set-uri: https://xxx/auth/realms/test/protocol/openid-connect/certs
issuer-uri: https://xxx/auth/realms/test
Version
5.2.1 Release
Sample
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file, test, or sample; start by reproducing the Spring Boot 5.2.1 WebFlux setup with a Bearer-only Keycloak client and inspect the OAuth2 entry points. Done means an Authorization bearer token is verified without redirecting to Keycloak, with regression coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, kotlin, spring-boot
- Domain
- authentication, backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100