Comments (5)
When I use spring-boot-starter-oauth2-resource-server and remove okta-spring-boot-starter dependency, it works as expected.
Of course you have to move issuer uri from okta.oauth2.issuer to spring.security.oauth2.resourceserver.jwt.issuer-uri
from okta-spring-boot.
@Draudastic26 Thanks for posting!
I'd like to understand a bit more about your use case and the need for a custom JWT Authentication Converter. The Okta Springboot starter provides a converter that automatically takes care of converting claims in tokens to authorities.
Are you sure you are adding your custom JwtAuthenticationConverter bean to the SecurityChain in your oauth2ResourceServer config?
from okta-spring-boot.
Our customer has their own Okta instance and the required info for our backend is just available in the id_token via the okta userinfo endpoint. Also the authorities (RACF and AD groups) are just available in the id_token via custom claims. This setup is fix and can't be configured. My idea was to convert the JWT into an extended version of the JwtAuthenticationToken with the required fields from the userinfo endpoint. With that, I could also use the handy @PreAuthorize annotation. Everything works as expected, but only with the spring-boot-starter-oauth2-resource-server dependency and not with this okta lib.
The security chain looks like this:
@Bean
fun filterChain(http: HttpSecurity): SecurityFilterChain {
http {
authorizeRequests {
authorize(anyRequest, authenticated)
}
oauth2ResourceServer {
jwt {
jwtAuthenticationConverter = CustomJwtConverter()
}
}
}
return http.build()
}
EDIT: I use Kotlin
from okta-spring-boot.
@Draudastic26 Can you please check if this is still an issue with 3.0.3?
from okta-spring-boot.
Related Issues (20)
- Application startup failure HOT 3
- Spring boot 3 HOT 3
- Public keys are not cached on the start up HOT 2
- How to disable Okta Login when running locally? HOT 2
- okta-spring-boot-starter 3.0.0 pulls in `javax` dependency; should pull in as `jakarta` HOT 8
- The redirect URI is invalid when using Spring WebFlux HOT 2
- Create authorities from Auth0 permissions claim HOT 2
- Bump okta.sdk.version from 8.2.3 to 10.x.x HOT 4
- Spring Boot 3.1 M2 not supported HOT 3
- No support for runtime-resolved OktaOAuth2Properties HOT 2
- Using this starter with Auth0 results in an opaque access token with `oauth2Login()` HOT 2
- How to resolve OKTA OIDC issue [access_denied] policy evaluation failed for this request please check the policy configurations HOT 2
- Default configuration causes pre-flight CORS request OPTIONS fail with HTTP 401 HOT 2
- Adding Spring HATEOAS to a project with Okta Boot Starter makes it fail to start
- From version 3.0.3, the application property resolution is broken when properties are loaded from Kubernetes ConfigMap HOT 2
- How to override the behavior of OktaOAuth2PropertiesMappingEnvironmentPostProcessor in a @SpringBootTest HOT 3
- Update start.spring.io to allow usage with Spring Boot 3.2.0 HOT 1
- When getting exception from OKTA is being redirected to /login?error HOT 2
- Documentation uses "marked for removal" examples
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okta-spring-boot.