Skip to content
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

Document PKI authentication provider. #43572

Merged
merged 10 commits into from
Aug 30, 2019

Conversation

azasypkin
Copy link
Member

@azasypkin azasypkin commented Aug 20, 2019

Document PKI authentication provider.

Blocked by: #42606, elastic/elasticsearch#45906

@azasypkin azasypkin added Team:Docs blocked Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Security/Authentication Platform Security - Authentication v7.4.0 labels Aug 20, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-docs

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security

@azasypkin azasypkin requested a review from kobelb August 20, 2019 09:33
@azasypkin azasypkin added the release_note:skip Skip the PR/issue when compiling release notes label Aug 20, 2019
xpack.security.authc.providers: [pki, basic]
--------------------------------------------------------------------------------

Please, note that with `server.ssl.clientAuthentication` set to `required` user will be asked to provide a valid client certificate even if they want to authenticate with username and password. Depending on the security policies it may or may not be desired, and if it's not `server.ssl.clientAuthentication` can be set to `optional`. In this case {kib} will still request a client certificate but the client won't be required to present one. The `optional` client authentication mode can also be needed in some other cases, e.g. when PKI authentication is used in conjunction with Reporting.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I was initially planning to put the last sentence somewhere here, but I don't see that it mentions other limitations we have with Reporting + SAML/OIDC/Token so went the simplest route 🤷‍♂️ .

@@ -44,6 +45,31 @@ The token authentication provider can be used in conjunction with the basic auth
xpack.security.authc.providers: [token, basic]
--------------------------------------------------------------------------------

[[pki-authentication]]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I'll double check all the links once ES documentation PR I reference to lands.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to ensure the doc links work before merging this PR. There's a step that is ran by the docs CI which will start failing their build if the links don't work 😬

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, there was no plan to merge this before ES docs change reaches upstream master 😛

@elasticmachine
Copy link
Contributor

💔 Build Failed

[[pki-authentication]]
==== Public Key Infrastructure (PKI) Authentication

PKI authentication allows users to login into {kib} using X.509 client certificates that should be presented while connecting to {kib}. The certificates must first be accepted for authentication on the {kib} TLS layer and then they are further validated by an {es} PKI realm. The PKI authentication provider relies on {es}'s {ref}/delegate-pki-authentication.html[Delegate PKI authentication API] to exchange X.509 client certificates to access tokens. And all subsequent requests to {es}'s APIs on behalf of the users will be authenticated using these access tokens.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PKI authentication allows users to login into {kib} using X.509 client certificates that should be presented while connecting to {kib}. The certificates must first be accepted for authentication on the {kib} TLS layer and then they are further validated by an {es} PKI realm. The PKI authentication provider relies on {es}'s {ref}/delegate-pki-authentication.html[Delegate PKI authentication API] to exchange X.509 client certificates to access tokens. And all subsequent requests to {es}'s APIs on behalf of the users will be authenticated using these access tokens.
PKI authentication allows users to log in to {kib} using X.509 client certificates that must be presented while connecting to {kib}. The certificates must first be accepted for authentication on the {kib} TLS layer and then they are further validated by an {es} PKI realm. The PKI authentication provider relies on {es}'s {ref}/delegate-pki-authentication.html[Delegate PKI authentication API] to exchange X.509 client certificates to access tokens. And all subsequent requests to {es}'s APIs on behalf of the users will be authenticated using these access tokens.


PKI authentication allows users to login into {kib} using X.509 client certificates that should be presented while connecting to {kib}. The certificates must first be accepted for authentication on the {kib} TLS layer and then they are further validated by an {es} PKI realm. The PKI authentication provider relies on {es}'s {ref}/delegate-pki-authentication.html[Delegate PKI authentication API] to exchange X.509 client certificates to access tokens. And all subsequent requests to {es}'s APIs on behalf of the users will be authenticated using these access tokens.

Prior to configuring {kib}, ensure that PKI realm is enabled in {es} and configured to permit delegation. See {xpack-ref}/configuring-pki-realm.html[Configuring a PKI realm] for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Prior to configuring {kib}, ensure that PKI realm is enabled in {es} and configured to permit delegation. See {xpack-ref}/configuring-pki-realm.html[Configuring a PKI realm] for more information.
Prior to configuring {kib}, ensure that the PKI realm is enabled in {es} and configured to permit delegation. See {xpack-ref}/configuring-pki-realm.html[Configuring a PKI realm] for more information.


Prior to configuring {kib}, ensure that PKI realm is enabled in {es} and configured to permit delegation. See {xpack-ref}/configuring-pki-realm.html[Configuring a PKI realm] for more information.

To enable the PKI authentication provider in {kib}, you first need to <<configuring-tls,configure {kib} to encrypt communications between browser and {kib} server>>. Once it's done you need to additionally enable TLS client authentication and include the certificate authority (CA) used to sign client certificates into list of CAs trusted by {kib} in your `kibana.yml`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To enable the PKI authentication provider in {kib}, you first need to <<configuring-tls,configure {kib} to encrypt communications between browser and {kib} server>>. Once it's done you need to additionally enable TLS client authentication and include the certificate authority (CA) used to sign client certificates into list of CAs trusted by {kib} in your `kibana.yml`:
To enable the PKI authentication provider in {kib}, you first need to <<configuring-tls,configure {kib} to encrypt communications between the browser and {kib} server>>. Once it's done, you need to additionally enable TLS client authentication and include the certificate authority (CA) used to sign client certificates into a list of CAs trusted by {kib} in your `kibana.yml`:

xpack.security.authc.providers: [pki, basic]
--------------------------------------------------------------------------------

Please, note that with `server.ssl.clientAuthentication` set to `required` user will be asked to provide a valid client certificate even if they want to authenticate with username and password. Depending on the security policies it may or may not be desired, and if it's not `server.ssl.clientAuthentication` can be set to `optional`. In this case {kib} will still request a client certificate but the client won't be required to present one. The `optional` client authentication mode can also be needed in some other cases, e.g. when PKI authentication is used in conjunction with Reporting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Please, note that with `server.ssl.clientAuthentication` set to `required` user will be asked to provide a valid client certificate even if they want to authenticate with username and password. Depending on the security policies it may or may not be desired, and if it's not `server.ssl.clientAuthentication` can be set to `optional`. In this case {kib} will still request a client certificate but the client won't be required to present one. The `optional` client authentication mode can also be needed in some other cases, e.g. when PKI authentication is used in conjunction with Reporting.
Please note that with `server.ssl.clientAuthentication` set to `required`, users will be asked to provide a valid client certificate even if they want to authenticate with username and password. Depending on the security policies, it may or may not be desired, and if not, `server.ssl.clientAuthentication` can be set to `optional`. In this case {kib} will still request a client certificate but the client won't be required to present one. The `optional` client authentication mode can also be needed in some other cases, e.g. when PKI authentication is used in conjunction with Reporting.


PKI authentication allows users to login into {kib} using X.509 client certificates that should be presented while connecting to {kib}. The certificates must first be accepted for authentication on the {kib} TLS layer and then they are further validated by an {es} PKI realm. The PKI authentication provider relies on {es}'s {ref}/delegate-pki-authentication.html[Delegate PKI authentication API] to exchange X.509 client certificates to access tokens. And all subsequent requests to {es}'s APIs on behalf of the users will be authenticated using these access tokens.

Prior to configuring {kib}, ensure that PKI realm is enabled in {es} and configured to permit delegation. See {xpack-ref}/configuring-pki-realm.html[Configuring a PKI realm] for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These links to the Elasticsearch reference are broken:

  • configuring-pki-realm.html
  • delegate-pki-authentication.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we're still waiting for ES docs PR: ttps://github.com/elastic/elasticsearch/pull/45259. Will double check that links work as soon as ES PR lands.

@azasypkin
Copy link
Member Author

Thanks a lot for review @gchaps, everything should be handled now!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@kobelb
Copy link
Contributor

kobelb commented Aug 21, 2019

Should we add any disclaimers about http layer reverse-proxies preventing the ability to request the client's certificates?

@azasypkin
Copy link
Member Author

Should we add any disclaimers about http layer reverse-proxies preventing the ability to request the client's certificates?

Hmm, I think it's a good idea, thanks! I don't see ES PKI docs expand on this though, but I'd agree that proxies are usually used with Kibana than ES.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@azasypkin
Copy link
Member Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

@azasypkin azasypkin requested a review from gchaps August 26, 2019 17:01
@azasypkin
Copy link
Member Author

@kobelb @gchaps ES documentation PR has landed and I've corrected the links. PR is ready for another pass, thanks!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@azasypkin azasypkin removed the blocked label Aug 27, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

docs/security/authentication/index.asciidoc Outdated Show resolved Hide resolved
docs/security/authentication/index.asciidoc Outdated Show resolved Hide resolved
docs/security/authentication/index.asciidoc Outdated Show resolved Hide resolved
docs/security/authentication/index.asciidoc Outdated Show resolved Hide resolved
@azasypkin
Copy link
Member Author

Thanks @gchaps, applied all your suggestions!

@elasticmachine
Copy link
Contributor

💔 Build Failed

@azasypkin azasypkin requested a review from gchaps August 28, 2019 06:22
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Built locally. LGTM

@azasypkin
Copy link
Member Author

7.4/7.4.0: f60cd27
7.x/7.5.0: e8a68ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Feature:Security/Authentication Platform Security - Authentication release_note:skip Skip the PR/issue when compiling release notes Team:Docs Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.4.0 v7.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants