如果您打算将 LDAP 注册中心与 Jazz™ Team Server 配合使用,那么必须配置 Apache Tomcat 或 WebSphere® Application Server 以使用 LDAP 注册中心来认证用户。
参数 | 对值的描述 |
---|---|
LDAP 注册中心位置 | 引用了您的 LDAP 服务器的 URL。ldap://ldap.example.com:389 |
用户名 | 要登录至此 LDAP 服务器的用户名。某些 LDAP 服务器允许匿名登录和输入密码。这种情况下,此参数为空白。 |
密码 | 与用户名相关联的密码。 |
基本用户 DN | 此搜索条件指示在层次结构中何处开始搜索用户。例如“o=company,l=your city,c=your country”。 |
用户属性名映射 | 从 Jazz 用户属性名到 LDAP 注册中心入口属性名的映射。您必须定义下列映射:
userId 属性标识用户登录到系统时使用的用户标识。name 属性用来在用户界面中显示名称。 例如,userId=mail,name=cn,emailAddress=mail |
基本组 DN | 此搜索条件指示从层次结构中的何处开始搜索组名,例如 ou=memberlist,ou=yourgroups,o=example.com。 |
Jazz 至 LDAP 组的映射 | Jazz 组与 LDAP 组之间的映射。可以将一个 Jazz 组映射至多个 LDAP 组。必须使用分号将各个 LDAP 组分隔开。例如,JazzAdmins=LDAPAdmins1;LDAPAdmins2 会将 JazzAdmins 组映射至 LDAPAdmins1 和 LDAPAdmins2。Jazz Team Server 定义了五个要与其建立映射的组:
|
组名属性 | 用于表示 LDAP 注册中心中的 Jazz 组名的 LDAP 属性。例如,cn。这在查询中用于检索 LDAP 组。要检索 LDAP 组,查询将使用基本组 DN 与组名属性的组合。 |
组成员属性 | 用于表示 LDAP 注册中心中一个组的成员的 LDAP 属性。例如,uniquemember。 |
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" digest="SHA-1" digestEncoding="UTF-8"/>
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" digest="SHA-1" digestEncoding="UTF-8"/>
<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://ldap.company.com:389" roleBase="cn=Groups,dc=company,dc=com" roleSearch="(uniquemember={0})" roleName="cn" userBase="cn=Users,dc=company,dc=com" userSearch="(uid={0})"/>对于 Microsoft Active Directory,添加以下标记:
<Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://ldap.company.com:3268" authentication="simple" referrals="follow" connectionName="cn=LDAPUser,ou=Service Accounts,dc=company,dc=com" connectionPassword="VerySecretPassword" userSearch="(sAMAccountName={0})" userBase="dc=company,dc=com" userSubtree="true" roleSearch="(member={0})" roleName="cn" roleSubtree="true" roleBase="dc=company,dc=com"/>
<web-app id="WebApp"> <servlet id="bridge"> <servlet-name>equinoxbridgeservlet</servlet-name> <display-name>Equinox Bridge Servlet</display-name> <description>Equinox Bridge Servlet</description> <servlet-class>org.eclipse.equinox.servletbridge.BridgeServlet</servlet-class> <init-param><!-- ... --></init-param> <!-- ... --> <load-on-startup>1</load-on-startup> <!-- Addendum 如果 LDAP 组的名称与缺省 Jazz 角色相同,那么不需要添加下列标记: --> <security-role-ref> <role-name>JazzAdmins</role-name> <role-link>[Jazz 管理员的 LDAP 组]</role-link> </security-role-ref> <security-role-ref> <role-name>JazzDWAdmins</role-name> <role-link>[Jazz 管理员的 LDAP 组]</role-link> </security-role-ref> <security-role-ref> <role-name>JazzGuests</role-name> <role-link>[Jazz 管理员的 LDAP 组]</role-link> </security-role-ref> <security-role-ref> <role-name>JazzUsers</role-name> <role-link>[Jazz 管理员的 LDAP 组]</role-link> </security-role-ref> <security-role-ref> <role-name>JazzProjectAdmins</role-name> <role-link>[Jazz 管理员的 LDAP 组]</role-link> </security-role-ref> </servlet> <!-- ... --> </web-app>使用下列标记将 LDAP 组声明为安全角色:
<web-app id="WebApp"> <servlet id="bridge"> <!-- ... --> <security-role> <role-name>JazzAdmins</role-name> <role-name>JazzDWAdmins</role-name> <role-name>JazzGuests</role-name> <role-name>JazzUsers</role-name> <role-name>JazzProjectAdmins</role-name> <!-- Addendum 如果 LDAP 组的名称与缺省 Jazz 角色相同,那么不需要添加下列标记: --> <role-name>[Jazz 管理员的 LDAP 组]</role-name> <role-name>[Jazz 数据仓库管理员的 LDAP 组]</role-name> <role-name>[Jazz 来宾的 LDAP 组]</role-name> <role-name>[Jazz 用户的 LDAP 组]</role-name> <role-name>[Jazz 项目管理员的 LDAP 组]</role-name> <!-- End Addendum --> </security-role> <!-- ... --> </web-app>使用下列标记来更新安全性约束节:
<web-app id="WebApp"> <!-- ... --> <security-constraint> <web-resource-collection> <web-resource-name>secure</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>JazzUsers</role-name> <role-name>JazzAdmins</role-name> <role-name>JazzGuests</role-name> <role-name>JazzDWAdmins</role-name> <role-name>JazzProjectAdmins</role-name> <!-- Addendum 如果 LDAP 组的名称与缺省 Jazz 角色相同,那么不需要添加下列标记: --> <role-name>[Jazz 管理员的 LDAP 组]</role-name> <role-name>[Jazz 数据仓库管理员的 LDAP 组]</role-name> <role-name>[Jazz 来宾的 LDAP 组]</role-name> <role-name>[Jazz 用户的 LDAP 组]</role-name> <role-name>[Jazz 项目管理员的 LDAP 组]</role-name> <!-- End Addendum --> </auth-constraint> <user-data-constarint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> <!-- ... --> </web-app>对每个引用 Jazz 组的安全性约束重复相同的附录:
<web-app id="WebApp"> <!-- ... --> <security-constraint> <web-resource-collection> <web-resource-name>adminsecure</web-resource-name> <url-pattern>/admin/cmd/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>JazzAdmins</role-name> <!-- Addendum --> <role-name>[Jazz 管理员的 LDAP 组]</role-name> <!-- End addendum --> </auth-constraint> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> <!-- ... --> </web-app>