如何将客户端访问限制为仅在密钥斗篷中的一组用户? [英] How can i restrict client access to only one group of users in keycloak?

查看:167
本文介绍了如何将客户端访问限制为仅在密钥斗篷中的一组用户?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的awx(可折叠塔)网页在keycloak中有一个客户端. 我只需要一个特定keycloak组中的用户即可通过此客户端登录.

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 this client.

如何禁止所有其他用户(一个特定组除外)使用此keycloak客户端?

How can I forbid all other users(except from one particular group) from using this keycloak client?

推荐答案

我是这样解决的:

  1. 在Keycloak中创建新角色.
  2. 将此角色分配给组.
  3. 在Kycloak中创建一个新的身份验证脚本.配置登录时允许使用哪个角色(例如user.hasRole(realm.getRole("yourRoleName"))).
  4. 在客户端的设置中,在身份验证流替代"下,选择刚刚创建的身份验证脚本.
  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.

这篇关于如何将客户端访问限制为仅在密钥斗篷中的一组用户?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆