Skip to content

Conversation

@ebarlas
Copy link
Contributor

@ebarlas ebarlas commented Nov 11, 2025

This change adds configuration options to the PKI Realm for principal extraction from the client certificate based on a relative distinguished name (RDN) attribute value.

The following Elasticsearch YAML configuration options is included:

  • username_rdn_name - the RDN attribute name to use, e.g. CN

The implementation is based on text parsing of the RFC 2253 formatted text of the X500 distinguished name using the UnboundID LDAP SDK library.

Caveat: this approach only supports standard LDAP attribute types, such as CN, O, OU, UID, etc.

Non-LDAP extensions, such as EMAILADDRESS, and custom OIDs are not supported.

Examples:

DN Name Value
CN=John Doe, OU=Security Team, OU=Engineering, O=Elastic CN John Doe
UID=abc123, OU=Security Team, OU=Engineering, O=Elastic UID abc123
UID=abc123, OU=Security Team, OU=Engineering, O=Elastic CN -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants