Secure Spring Boot App - M2M Tokens

How to add Authorization to My Spring Boot Application (Gateway Server) - For 3rd party services (i want to restrict access to certain API endpoints) i tried to use the M2M tokens but i getting 403 error on my API because scopes not sent (i tried to issue a client creds token with scopes but with no success * i added aud as my domain ) i did it without SDK just with Security config httpSecurity.authorizeExchange(exchanges -> exchanges.pathMatchers("/demo/**").authenticated()) .oauth2ResourceServer( oAuth2ResourceServerSpec -> { oAuth2ResourceServerSpec.jwt(jwtSpec -> jwtSpec.jwtDecoder(JwtDecoders.fromIssuerLocation("https://myapidomain/api"))); }).build(); in my application.yaml i did like this oauth2: resourceserver: jwt: jwk-set-uri: "https://mysubdomain.kinde.com/.well-known/jwks.json" issuer-uri: "https://myapidomain/api" jws-algorithms: RS256
1 Reply
Oli - Kinde
Oli - Kinde7mo ago
Hey @brandonrk., I can see you asked the same question in our Slack community here: https://thekindecommunity.slack.com/archives/C04K316BXEH/p1715834878724739 Lets continue the conversation on Slack.
Want results from more Discord servers?
Add your server