Hi
This is a topic that has been covered here a lot and there are many ways how to do it, depending if you are using keycloak for everything (read everything as: user management, authentication, etc…).
I have setup a system where users in a realm can access clients through
oidc:
- Redmine
- Weblate
saml: - cloud services (they have migrated their SSO to OIDC yet)
Now I want to create a flow that will check if the user has a role.
Some of the look at topics:
httpsX://github.com/keycloak/keycloak/issues/10250
httpsX://keycloak.discourse.group/t/limiting-sso-for-certain-users/11985/14
Current setup
- Copy browser flow → Browser flow with Role control
- Modify to look like picture below.
The flow should be
Login to client subflow (login either using cookie or User/Pass/OTP) :
- User can login with cookie to client if cookie exist and is ok (whatever the flow control does)
- User can login if username/password form is ok with OTP being successful
Login to client checks (renamed to just client checks - this will check if user has role and according to that the flow should allow or deny: - User can login if the user has a role that corresponds to the client.
Will this work, or what should I change in this crazy complicated world of keycloak?
Extra thoughts:
I don’t know if this flow will work for ALL clients, or will it be specific to one.







