-
Notifications
You must be signed in to change notification settings - Fork 47
The session is valid for multiple realms, how to avoid that? #22
Comments
I am not sure the python method you used handles session cookies like a browser. The session cookie name is Did not use the plugin so far in the way you are trying. Programatically I would not use it like that unless you want to simulate user behavior in user-agent (browser). In the browser, accessing resources from realm1 will redirect to login the first time. |
hi @cristichiru , first of all thanks for your concern! 🙂 Forget the python part... no I'm using the kong helm chart, that deploy kong-ingress-controller and using the image Then I create two oidc plugins, for two different realms,
then I enable each oidc plugin on the respective ingress (route):
Checking on kong api, I can confirm that both plugins are enabled on each route. So:
Is not true in my use case. |
Just a note, this behavior is occurring both with |
I'm running into an issue where a session created on one realm is not restricted from accessing resources on a different realm for which the session should not be valid.
I've setup kong routes aligning with two keycloak realms like so:
/realm1/app/
/realm2/app/
Each realm has it's own OIDC client with unique keys/ name /client secret. I then add the related kong-oidc to each route.
Accessing /realm1/app I'm redirected properly to the realm1 login, and similarly for realm2. However, if I'm logged into realm1 with an active session, I can still access /realm2/app. Looking at the app logs, the active session when accessing realm2 is still for realm1.
Am I missing some crucial setting?
The text was updated successfully, but these errors were encountered: