LDAP Authentication and Authorization Testing
You can use the Knox CLI to run a diagnostic test to authenticate a user name and password against LDAP
The Knox CLI is a command line utility that can be used to manage and test various aspects of a Knox deployment.
knoxcli.sh command line utility script is located in the
You can use the following command format to authenticate a user name and password against LDAP.
bin/knoxcli.sh user-auth-test [--cluster c] [--u username] [--p password] [--g] [--d] [--help]
This command will test a topology’s ability to connect, authenticate, and authorize a
user with an LDAP server. The only required argument is the
argument to specify the name of the topology you wish to use. The topology must be valid
(passes a validate-topology command). If the
arguments are not specified, you will be prompted for a user name and password.
If authentication is successful, the command will attempt to use the topology to do an
LDAP group lookup. The topology must be configured correctly to do this. If it is not,
groups will not be returned and no errors will be printed unless the
--g argument is specified. Currently this command only works if a
topology supports the use of ShiroProvider for authentication.
|--cluster||The name of the cluster to authenticate.||Yes|
|--u||The user name to authenticate with.||No|
|--p||The password to authenticate with.||No|
|--g||Specifies that you want to return a user’s groups. If not specified, group lookup errors will not be returned.||No|
|--d||Print extra debug information for a failed authentication.||No|