LDAP authentication
Base authentication
The following new parameters allows to configure a secondary (sufficient) or primary (required) LDAP authentication endpoint.
Variable |
Description |
Default |
---|---|---|
|
Whether to enable property based JAAS config |
|
|
Whether to enable LDAP based JAAS config |
|
|
URL for LDAP server connection |
|
|
Bind username for LDAP server |
|
|
Bind user password for LDAP server |
|
|
Optional password codec class for bind user password |
|
|
Protocol for LDAP connection |
|
|
Type of LDAP server authentication |
|
|
Base for user search |
|
|
User attribute |
|
|
Whether to enable subtree user search |
|
|
Base for role search |
|
|
Role attribute |
|
|
Role search attribute |
|
|
Whether to enable subtree role search |
|
|
Specify how to handle referrals; valid values: ignore, follow, throw |
|
Configuration example
The following example shows how to connect to a test LDAP service publivly available:
activemq_hawtio_role: Scientists
activemq_auth_ldap_enabled: True
activemq_auth_ldap_url: ldap://ldap.forumsys.com:389
activemq_auth_ldap_conn_username: uid=tesla,dc=example,dc=com
activemq_auth_ldap_conn_password: password
activemq_auth_ldap_user_base: dc=example,dc=com
activemq_auth_ldap_user_search: '(uid={0})'
activemq_auth_ldap_role_base: dc=example,dc=com
activemq_auth_ldap_role_name: cn
activemq_auth_ldap_role_search: '(uniqueMember={0})'
activemq_auth_ldap_role_search_subtree: True
activemq_users:
- user: amq
password: amqbrokerpass
roles: [ admin ]
- user: other
password: amqotherpass
roles: [ consumer, producer ]
activemq_roles:
- name: admin
permissions: [ createNonDurableQueue, deleteNonDurableQueue, createDurableQueue, deleteDurableQueue, createAddress, deleteAddress, consume, browse, send, manage ]
- name: Scientists
permissions: [ createNonDurableQueue, deleteNonDurableQueue, createDurableQueue, deleteDurableQueue, createAddress, deleteAddress, consume, browse, send, manage ]
It will authenticate and authorized LDAP users in the “Scientists” group; in addition to amq
and other
defined in property files.
Custom jaas login.config file
It is possible to use the following parameter to use a custom template, to be made available in playbooks file lookup paths, instead of the configuration described above (which will in this case be ignored, unless the same parameters are used for the custom template).
Variable |
Description |
Default |
---|---|---|
|
Location of JAAS login.config template; by default use template provided with role |
|