How can i restrict client access to only one group of users in keycloak?

后端 未结 8 751
一生所求
一生所求 2020-12-24 15:08

I have a client in keycloak for my awx(ansible tower) webpage. I need only the users from one specific keycloak group to be able to log in through

8条回答
  •  伪装坚强ぢ
    2020-12-24 15:16

    I solved it like this:

    1. Create a new role in Keycloak.
    2. Assign this role to the group.
    3. Create a new authentication script in Kycloak. Configure which role is allowed upon login (e.g. user.hasRole(realm.getRole("yourRoleName"))).
    4. In the client's settings, under "Authentication Flow Overrides", choose the authentication script that was just created.

提交回复
热议问题