Skip to content

Commit

Permalink
Minor doc fixes for PKI realm (#103831) (#104143)
Browse files Browse the repository at this point in the history
Remove the reference to the transport client and clarify the usage of username_pattern
  • Loading branch information
jakelandis authored Jan 9, 2024
1 parent e3edb22 commit a6c450a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ the desired network layers (transport or http), and map the Distinguished Names
(DNs) from the Subject field in the user certificates to roles. You create the
mappings in a role mapping file or use the role mappings API.

TIP: You can use a combination of PKI and username/password authentication. For
example, you can enable SSL/TLS on the transport layer and define a PKI realm to
require transport clients to authenticate with X.509 certificates, while still
authenticating HTTP traffic using username and password credentials.

. Add a realm configuration for a `pki` realm to `elasticsearch.yml` under the
`xpack.security.authc.realms.pki` namespace. You must explicitly set the `order`
attribute. See <<ref-pki-settings>> for all of the options you can set for a
Expand Down Expand Up @@ -42,7 +37,8 @@ realms you specify are used for authentication. If you also want to use the

--

. Optional: If you want to use something other than the CN of the Subject DN as
. Optional: The username is defined by the <<ref-pki-settings, username_pattern>>.
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.
+
Expand Down
6 changes: 4 additions & 2 deletions docs/reference/settings/security-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,10 @@ the following settings:
`username_pattern`::
(<<static-cluster-setting,Static>>)
The regular expression pattern used to extract the username from the
certificate DN. The first match group is the used as the username.
Defaults to `CN=(.*?)(?:,\|$)`.
certificate DN. The username is used for auditing and logging. The username can also be used
with the <<role-mapping-resources, role mapping API>> and <<configuring-authorization-delegation, authorization delegation>>.
The first match group is the used as the username.
Defaults to `CN=(.*?)(?:,|$)`.

`certificate_authorities`::
(<<static-cluster-setting,Static>>)
Expand Down

0 comments on commit a6c450a

Please sign in to comment.