访问控制 - LDAP
Access Control - LDAP
This extension will allow you to use LDAP for authentication and authorization in Axon Server. User accounts and roles from LDAP are not synchronized to the Axon Server cluster, so they won't show up on the "Users" tab.
Installing the LDAP Extension
To install the LDAP Extension, you need to unpack the distribution ZIP-file, so the JAR files are in the "exts" subdirectory of the working directory of Axon Server:
$ mkdir exts
$ unzip -j axon-server-extension-ldap-4.5.1-bin.zip -d exts
Archive: axon-server-extension-ldap-4.5-bin.zip
inflating: exts/axon-server-extension-ldap-4.5.1-sources.jar
inflating: exts/axon-server-extension-ldap-4.5.1.jar
inflating: exts/javax.inject-1.jar
inflating: exts/spring-ldap-core-2.3.4.RELEASE.jar
inflating: exts/spring-security-ldap-5.4.7.jar
$Note that version 4.5.1 is the current version at the time of Axon Server 4.5.13.
Configuring the LDAP Extension
The options used are:
axoniq.axonserver.accesscontrol.enabledThis must be set to "
true" to enable access control.axoniq.axonserver.enterprise.ldap.enabledSet this to "
true" to enable the plugin.axoniq.axonserver.enterprise.ldap.server-nameThis sets the LDAP server's hostname, which is defaulted to "
localhost".axoniq.axonserver.enterprise.ldap.server-portThis sets the LDAP server's port, which is defaulted to
389.axoniq.axonserver.enterprise.ldap.server-urlAs an alternative, for example when you want to use a TLS-secured connection, you can provide the URL to the LDAP server, such as "
ldaps://ldap-server.local".axoniq.axonserver.enterprise.ldap.initialBindUserDNIf the LDAP server does not accept unauthenticated initial binds, set the DN of the user for that, for example "
cn=admin,dc=demo,dc=io". Only if both this property and the corresponding password are set, will they be used.axoniq.axonserver.enterprise.ldap.initialBindPasswordIf the LDAP server does not accept unauthenticated initial binds, set the password for that. Only if both this property and the corresponding User DN are set, will they be used.
axoniq.axonserver.enterprise.ldap.search-baseThis setting provides the base context for searching users, for example "
ou=people,dc=planetexpress,dc=com".axoniq.axonserver.enterprise.ldap.search-filterThis is the filter to be used for searching, so you typically add object types, and the attribute to match on. An example would be "
(&(objectClass=inetOrgPerson)(uid={0}))". The "{0}" notation is used to place the username.axoniq.axonserver.enterprise.ldap.group-baseSimilarly to the "
search-base" setting, you can add a "group-base". This setting is optional and normally not needed.
axoniq.axonserver.enterprise.ldap.group-filterThe "
group-filter" is the search pattern for groups, which will be translated to roles, for example "(&(objectclass=Group)(member={0}))"
Active Directory specific settings
When using ActiveDirectory, the following properties are needed:
axoniq.axonserver.enterprise.ldap.activeDirectoryThis must be set to "
true".axoniq.axonserver.enterprise.ldap.adDomainThis must be set to the AD Domain serviced by the controller.
An example of an Active Directory configuration is:
Linking LDAP groups to roles in Axon Server
In order to translate LDAP Groups, you must provide properties as follows:
For example, if we have a group "ADMIN_STAFF" that we want to make administrators, and a group "SHIP_CREW" that should be normal users of the "default" context, then we would use:
Tuning the LDAP Extension
Two further options exist that may be used to tune the connection with the LDAP server. Both have a default value of "true".
axoniq.axonserver.enterprise.ldap.using-pooled-queriesaxoniq.axonserver.enterprise.ldap.allowing-referrals
最后更新于