简体   繁体   English

在WSO2 Identity Server中禁用用户帐户

[英]Disable user account in WSO2 Identity Server

Is it possible to disable a user account in WSO2 Identity Server 5.0 after a certain period of inactivity? 一段时间不活动后,是否可以禁用WSO2 Identity Server 5.0中的用户帐户? Is there any way to implement this using a REST or SAOP API? 有什么方法可以使用REST或SAOP API来实现?

i'm new on WSO2 Identity Server, but I would try this way: 我是WSO2 Identity Server的新用户,但我会尝试这种方式:

  • Create a scheduled job. 创建计划的作业。 You can implement it as you want or, for example, you can use WSO2 Task Server features. 您可以根据需要实施它,例如,可以使用WSO2任务服务器功能。
  • The scheduled could call a web service, who implements these steps: 计划的人员可以调用Web服务,该服务将实现以下步骤:
    1. read last login timestamp for each user in IS; 读取IS中每个用户的最后登录时间戳;
    2. calculate difference from last login timestamp e current timestamp; 计算与上次登录时间戳和当前时间戳之间的差异;
    3. populate a list of users to disable; 填充要禁用的用户列表;
    4. for each user to disable, call the WSO2 Identity Server Admin Services to "disable operation". 对于每个要禁用的用户,请调用WSO2 Identity Server Admin Services来“禁用操作”。

I'don't find the "disable operation" implemented in IS, so i think you could realize a DISABLE status creating a role, called "USER_DISABLED", without login permission or try to remove login permission on the original role of the user. 我找不到在IS中实现的“禁用操作”,因此我认为您可以在没有登录许可的情况下实现创建名为“ USER_DISABLED”的角色的DISABLE状态,或者尝试删除用户原始角色的登录许可。

As I said i'm new on WSO2 IS, but i would try this way. 如我所说,我是WSO2 IS的新手,但我会尝试这种方式。

Sorry for my english. 对不起我的英语不好。

Bye Vincenzo F. 再见Vincenzo F.

You cannot directly disable the user account. 您不能直接禁用用户帐户。 what you can do is, you can disable user account by changing the permission of the user in the user group. 您可以做的是,可以通过更改用户组中用户的权限来禁用用户帐户。 In order to disable the login account You have to add the particular user to that user group. 为了禁用登录帐户,您必须将特定用户添加到该用户组。 You can un-check it at the user permission tree. 您可以在用户权限树中取消选中它。

Find the below steps to change the user permission: 查找以下步骤以更改用户权限:

  1. Login to WSO2 IS Management Console. 登录到WSO2 IS管理控制台。
  2. Click on Configure to access the Configure menu. 单击配置以访问“配置”菜单。
  3. From the Configure menu, select Users and Roles. 从配置菜单中,选择用户和角色。
  4. On the User Management page, click on the Roles link. 在“用户管理”页面上,单击“角色”链接。
  5. Locate the role you want to edit, and click on the Permissions link associated with it. 找到您要编辑的角色,然后单击与其关联的“权限”链接。
  6. On the Permissions of the Role page, deselect permissions assigned to the role using the check-boxes. 在“角色的权限”页面上,取消选中使用复选框分配给角色的权限。
  7. finally click on the Update button to save the alterations. 最后单击“更新”按钮以保存更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM