简体   繁体   English

将LDAP用户映射到Liferay本地组

[英]Mapping LDAP users to Liferay local groups

I have setup LDAP authentication with liferay in my application. 我在应用程序中使用liferay设置了LDAP身份验证。 I have kept LDAP enabled and required as true. 我一直启用LDAP并将其要求为true。 This way only users with LDAP account would be able to login to portal. 这样,只有具有LDAP帐户的用户才能登录门户。

ldap.auth.enabled=true
ldap.auth.required=true 

Now I have requirement to create a local liferay group having certain users from LDAP (belonging to my team). 现在,我需要创建一个本地Liferay组,该组具有LDAP中的某些用户(属于我的团队)。 After LDAP authentication, this group would be checked if the user logging in is part of this group then only authentication would be allowed. LDAP认证后,如果登录的用户是该组的一部分,则将检查该组,然后仅允许认证。

So basically I need two groups: 所以基本上我需要两个小组:

  1. Team group (containing subset of LDAP) 团队组(包含LDAP的子集)
  2. Admin group (Subset of team and will be able to add/remove from team group) 管理员组(小组的子集,将能够从小组中添加/删除)

I need help on achieving this. 我需要帮助来实现这一目标。 The issue is, as my LDAP account do not have admin rights once I login to liferay, I do not see any administration options, and won't be able to create group. 问题是,由于登录到Liferay后我的LDAP帐户没有管理员权限,因此看不到任何管理选项,并且无法创建组。

Is there anyway I can map some of the LDAP accounts to admin accounts and how do I achieve this in production without doing required flag as false? 无论如何,我可以将一些LDAP帐户映射到管理帐户,如何在生产中实现此功能而不做必填标记为false?

Thanks in advance! 提前致谢!

If I understand your question well, you need to only grant some of your LDAP user login permission. 如果我很好地理解了您的问题,则只需授予一些LDAP用户登录权限。 There are several ways to achieve that : 有几种方法可以实现:

  1. Filter the users you synch with Liferay, by their DN, or by their LDAP group 通过DN或LDAP组过滤与Liferay同步的用户
  2. Add a custom LoginPreAction event to deny login to certain users 添加自定义LoginPreAction事件以拒绝某些用户登录

To give users admin role, you can add your custom LoginPostAction , and give them the Administrator role if they meat the criterias 要赋予用户管理员角色,您可以添加自定义的LoginPostAction ,并在满足条件时为他们提供管理员角色。

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

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