spring-projects / spring-security-samples

1.46k stars 709 forks source link

Add an OIDC sample that uses Redis implementations #319

Open dreamstar-enterprises opened 2 months ago

dreamstar-enterprises commented 2 months ago

Expected Behavior

It is possible to enhance the documentation here to show how one can implement this with Redis? The OIDC Session Registry (for BackChannel Logouts)

https://docs.spring.io/spring-security/reference/reactive/oauth2/login/logout.html#_customizing_the_oidc_provider_session_strategy

Current Behavior

Currently because of a memory leak issue: https://github.com/spring-projects/spring-security/issues/14558

I don't implement OidC. See my implementation here: https://github.com/dreamstar-enterprises/docs/blob/master/Spring%20BFF/BFF/src/main/kotlin/com/frontiers/bff/auth/repositories/oidcsessionregistry/OidcSessionRegistryConfig.kt

But it would be nice to know how to use it.

This is in my main config file here (but it is turned off): https://github.com/dreamstar-enterprises/docs/blob/master/Spring%20BFF/BFF/src/main/kotlin/com/frontiers/bff/auth/BffSecurityConfig.kt#L189

Context

How has this issue affected you?

I am in month 3 of my Spring BFF login page. It would be nice to know how to properly implement my BFF with backchannel logout

jzheaux commented 2 months ago

I think this would a be a good candidate for a sample, showing how to configure an OAuth 2.0 application using Redis as the backing store. As such, I'm moving this over to spring-security-samples.