Skip to content
Advertisement

Token exchange in Spring OAuth2 client credentials flow

I have following Spring Security configuration:

JavaScript

And following configuration is used:

JavaScript

Now I need to do impersonation(https://datatracker.ietf.org/doc/html/rfc8693). So I need to pretend as some user. I need it because of “current user” logic inside some-app application.

How can I reconfigure to achieve it ?

P.S. I tried to google it but I haven’t found anything relevant.

Advertisement

Answer

RFC 8693 Token Exchange was released jan 2020 and covers this feature. Spring security as of now does not support this fetaure yet, but should be released soon.

you can follow the open issue in Spring Security here:

Provide support for OAuth 2.0 Token Exchange for client

you can read more about the flow in general here on behalf of flow

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement