-
Notifications
You must be signed in to change notification settings - Fork 179
Add Details About username_rdn_name and username_rdn_oid to PKI Security Doc #4022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 6 commits
bb53b30
7407abc
63764e0
c717dcc
8306f98
a78bf13
fc077f5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,32 @@ | |
| When you configure realms in `elasticsearch.yml`, only the realms you specify are used for authentication. If you also want to use the `native` or `file` realms, you must include them in the realm chain. | ||
| :::: | ||
|
|
||
| 2. Optional: The username is defined by the [username_pattern](elasticsearch://reference/elasticsearch/configuration-reference/security-settings.md#ref-pki-settings). If you want to use something other than the CN of the Subject DN as the username, you can specify a regex to extract the desired username. The regex is applied on the Subject DN. | ||
| 2. Optional: If you want to use something other than the CN of the Subject DN as the username, you can use one of the following methods to extract the username: | ||
|
|
||
| * {applies_to}`stack: ga 9.1` Extract the username from a specific relative distinguished name (RDN) attribute in the Subject DN. | ||
|
Check notice on line 49 in deploy-manage/users-roles/cluster-or-deployment-auth/pki.md
|
||
| * Using the [[username_pattern](elasticsearch://reference/elasticsearch/configuration-reference/security-settings.md#ref-pki-settings) setting, specify a regex to extract the desired username. The regex is applied on the Subject DN. | ||
|
|
||
| :::::{tab-set} | ||
|
|
||
| ::::{tab-item} Specific RDN attribute | ||
| The username can be extracted from a specific RDN attribute in the Subject DN by using [username_rdn_name](elasticsearch://reference/elasticsearch/configuration-reference/security-settings.md#ref-pki-settings) or [username_rdn_oid](elasticsearch://reference/elasticsearch/configuration-reference/security-settings.md#ref-pki-settings). When an RDN attribute configuration is provided, it supersedes `username_pattern`. | ||
|
Check notice on line 55 in deploy-manage/users-roles/cluster-or-deployment-auth/pki.md
|
||
|
|
||
| For example, to extract the username from the `CN` RDN attribute: | ||
|
Check notice on line 57 in deploy-manage/users-roles/cluster-or-deployment-auth/pki.md
|
||
|
|
||
| ```yaml | ||
| xpack: | ||
| security: | ||
| authc: | ||
| realms: | ||
| pki: | ||
| pki1: | ||
| order: 1 | ||
| username_rdn_name: "CN" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. qq: does this just replicate the default behavior (the CN of the Subject DN as the username)? we might want to choose a different field to display in the example
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it does. There's a subtlety here, which is that we'd eventually like to deprecate the pattern-based configuration. So, eventually, the |
||
| ``` | ||
| :::: | ||
|
|
||
| ::::{tab-item} Regex | ||
| Specify a regex to extract the desired username. The regex is applied on the Subject DN. | ||
|
|
||
| For example, the regex in the following configuration extracts the email address from the Subject DN: | ||
|
|
||
|
|
@@ -58,11 +83,13 @@ | |
| order: 1 | ||
| username_pattern: "EMAILADDRESS=(.*?)(?:,|$)" | ||
| ``` | ||
|
|
||
| ::::{note} | ||
| :::{note} | ||
| If the regex is too restrictive and does not match the Subject DN of the client’s certificate, then the realm does not authenticate the certificate. | ||
| ::: | ||
| :::: | ||
|
|
||
| ::::: | ||
|
|
||
| 3. Optional: If you want the same users to also be authenticated using certificates when they connect to {{kib}}, you must configure the {{es}} PKI realm to allow delegation. See [PKI authentication for clients connecting to {{kib}}](#pki-realm-for-proxied-clients). | ||
| 4. Restart {{es}} because realm configuration is not reloaded automatically. If you’re following through with the next steps, you might wish to hold the restart for last. | ||
| 5. If you're using a self-managed cluster, then [enable SSL/TLS](../../security/secure-cluster-communications.md#encrypt-internode-communication). | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.