Version: Search Guard 5 / This is an older version of Search Guard. Switch to Latest version
Client certificate based authentication
Search Guard can use a client TLS certificate in the HTTP request to authenticate users and assign roles and permissions.
Search Guard already ships with client certificate based authentication. No additional installation steps are required.
In order for Search Guard to pick up client certificate on the REST layer, you need to set the
elasticsearch.yml to either
The configuration for the client certificate authenticator is very minimal:
clientcert_auth_domain: enabled: false order: 1 http_authenticator: type: clientcert config: username_attribute: cn challenge: false authentication_backend: type: noop
|username_attribute||String, the part of the certificate’s DN that is used as username. If not specified, the complete DN is used.|
Mapping DNs to roles
To map a certificate based user to a role, just use the username as specified by
sg_roles_mapping.yml, for example:
sg_role_starfleet: users: - 'cn=ldaprole,ou=groups,dc=example,dc=com' backendroles: - ... hosts: - ...