rundeck无法对Active Directory进行身份validation

我正在尝试安装rundeck,以便对Active Directory进行身份validation

我不断收到这个错误

在这里输入图像说明

维基包含有关403. Reason: !role信息。 403. Reason: !role错误https://github.com/rundeck/rundeck/wiki/FAQ#i-get-an-error-logging-in-http-error-403–reason-angular色

Rundeck 2.6.2-1(从.deb安装)
Ubuntu 14.04

JAAS-的ldap.conf

 ldap { com.dtolabs.rundeck.jetty.jaas.JettyCachingLdapLoginModule required debug="true" contextFactory="com.sun.jndi.ldap.LdapCtxFactory" providerUrl="ldap://DC01.example.com:389" bindDn="cn=rundeck,OU=MyOU,DC=example,DC=com" bindPassword="correct-horse-battery-staple" authenticationMethod="simple" forceBindingLogin="true" userBaseDn="DC=example,DC=com" userRdnAttribute="sAMAccountName" userIdAttribute="sAMAccountName" userPasswordAttribute="unicodePwd" userObjectClass="user" roleBaseDn="DC=example,DC=com" roleNameAttribute="sAMAccountName" roleUsernameMemberAttribute="cn" roleMemberAttribute="member" roleObjectClass="group" cacheDurationMillis="300000" supplementalRoles="user" reportStatistics="true" timeoutRead="10000" timeoutConnect="20000" nestedGroups="true"; }; 

/var/lib/rundeck/exp/webapp/WEB-INF/web.xml

  ... <security-role> <role-name>Enterprise Admins</role-name> </security-role> ... 

轮廓

 ... export RDECK_JVM="-Djava.security.auth.login.config=/etc/rundeck/jaas-ldap.conf \ -Dloginmodule.name=ldap \ ... 

我知道这是违背最佳做法,原因如下:

  • 使用“简单”的身份validation和端口389.以纯文本发送的所有密码!
  • baseDN方式太广泛,应该缩小加快ldapsearch
  • 如果使用forceBindingLogin,则不需要bindDN

其他资源:

https://github.com/rundeck/rundeck/issues/590
https://github.com/rundeck/rundeck/issues/620
http://www.bitester.com/2015/12/ldap-authentication-with-rundeck.html

发现至less在我的用例中,我不得不删除roleUsernameMemberAttribute

定义supplementalRolesangular色也很重要

最后的工作示例(未优化)

 ldap { com.dtolabs.rundeck.jetty.jaas.JettyCachingLdapLoginModule required debug="true" contextFactory="com.sun.jndi.ldap.LdapCtxFactory" providerUrl="ldap://DC01.example.com:389" bindDn="cn=rundeck,OU=MyOU,DC=example,DC=com" bindPassword="correct-horse-battery-staple" authenticationMethod="simple" forceBindingLogin="true" userBaseDn="DC=example,DC=com" userRdnAttribute="sAMAccountName" userIdAttribute="sAMAccountName" userPasswordAttribute="unicodePwd" userObjectClass="user" roleBaseDn="DC=example,DC=com" roleNameAttribute="sAMAccountName" roleMemberAttribute="member" roleObjectClass="group" cacheDurationMillis="300000" supplementalRoles="user" reportStatistics="true" timeoutRead="10000" timeoutConnect="20000" nestedGroups="true"; }; 

注意:这只是ldapauthentication。 您也可以混合使用本地帐户和ldap帐户。

更新

在这个github问题的其他文档和信息