[英]Basic Authentication on Glassfish using Ldap
I´m developping a Web Service. 我正在开发Web服务。 Currently, I´m using Basic Authentication using a file to manage users.
目前,我正在使用基本身份验证,并使用一个文件来管理用户。
Now I want to use Basic authentication, integrate LDAP server. 现在,我想使用基本身份验证,集成LDAP服务器。 I installed and I create a LDAP server, using LDAP - Apache Directory Studio.
我安装并使用LDAP-Apache Directory Studio创建LDAP服务器。
In Glassfish console I create a new ldapRealm. 在Glassfish控制台中,我创建一个新的ldapRealm。
My web.xml has this code: 我的web.xml具有以下代码:
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>LDAP</realm-name>
</login-config>
Now I want to specify different roles for different ldap group of users. 现在,我想为不同的ldap用户组指定不同的角色。
How can I achieve this? 我该如何实现? There is any tutorial for this prupose for Web Services?
是否有针对此目的的Web服务教程?
There is possiblity to add an annotation specifing roles like @RolesAllowed(LDAP Group) to different methods? 是否可以在不同方法中添加指定@RolesAllowed(LDAP Group)等角色的注释?
In order to configure the realm in Glassfish look To Create an LDAP Realm in the GlassFish Server . 为了在Glassfish中配置领域,请查看在GlassFish Server中创建LDAP领域 。
Regarding Apache Directory Studio, see Let's create an LDAP user and search for him . 关于Apache Directory Studio,请参阅让我们创建LDAP用户并搜索 。 You may want to see Setting up an LDAP directory server for Alfresco development .
您可能需要查看为Alfresco开发设置LDAP目录服务器 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.