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

OpenID Connect realm guide #41423

Merged
merged 20 commits into from
May 20, 2019
Merged

OpenID Connect realm guide #41423

merged 20 commits into from
May 20, 2019

Conversation

jkakavas
Copy link
Member

This commit adds a configuration guide for the newly introduced
OpenID Connect realm. The guide is similar to the style of the
SAML Guide and shares certain parts where applicable (role mapping)
It also contains a short section on how the realm can be used for
authenticating users without Kibana.

This commit adds a configuration guide for the newly introduced
OpenID Connect realm. The guide is similar to the style of the
SAML Guide and shares certain parts where applicable (role mappign)
It also contains a short section on how the realm can be used for
authenticating users without Kibana.
@jkakavas jkakavas added >docs General docs changes :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v8.0.0 v7.2.0 labels Apr 22, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security

@jkakavas
Copy link
Member Author

 [7.0.1] Use '--warning-mode all' to show the individual deprecation warnings.
 [7.0.1]       > Could not resolve jdk:linux:12.
 [7.0.1] See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings
 [7.0.1]          > Could not get resource 'https://download.java.net/java/GA/jdk12/33/GPL/openjdk-12_linux-x64_bin.xml'.
 [7.0.1]             > Could not GET 'https://download.java.net/java/GA/jdk12/33/GPL/openjdk-12_linux-x64_bin.xml'.
 [7.0.1]                > Read timed out

@elasticmachine please run elasticsearch-ci/packaging-sample

@jkakavas jkakavas requested a review from tvernum April 23, 2019 05:56
x-pack/docs/en/security/authentication/oidc-guide.asciidoc Outdated Show resolved Hide resolved
x-pack/docs/en/security/authentication/oidc-guide.asciidoc Outdated Show resolved Hide resolved
- `id_token token` which means that we want to use the Implicit flow and we also request an oAuth2
access token from the OP, that we can potentially use for follow up requests ( UserInfo )
- `id_token` which means that we want to use the Implicit flow, but are not interested in getting
an oAuth2 token too.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we provide any guidance on how to know which one to use?

This seems like the first place where we've fallen into the "you need to understand OIDC in order to configure this", and it would be nice to avoid that.

Copy link
Member Author

@jkakavas jkakavas Apr 24, 2019

Choose a reason for hiding this comment

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

I made an attempt at suggesting when to use each

x-pack/docs/en/security/authentication/oidc-guide.asciidoc Outdated Show resolved Hide resolved
x-pack/docs/en/security/authentication/oidc-guide.asciidoc Outdated Show resolved Hide resolved
x-pack/docs/en/security/authentication/oidc-guide.asciidoc Outdated Show resolved Hide resolved
}
--------------------------------------------------
// CONSOLE
// TEST[skip:These are properly tested in the OpenIDConnectIT suite]
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally we wouldn't skip these.
The intent of the docs-snippet testing is not to test the backend functionatlity, but to ensure that the docs content is free of errors, and is kept in sync with the implementation.
When we skip these, we run the risk of the examples being broken (e.g. by changes to the endpoint URL, or the addition of required fields)

Copy link
Member Author

Choose a reason for hiding this comment

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

Understood. I'll take care of it

Copy link
Member Author

@jkakavas jkakavas Apr 24, 2019

Choose a reason for hiding this comment

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

I enabled tests for prepare and added // TESTRESPONSE[catch:X] for authenticate and logout as there is no easy way to test them here.

In order to get a succesful response from the integTest cluster for authenticate, we'd need to use the implicit flow and introduce code to sign the ID Token in a // TESTSETUP section so that the cluster can consume it. I don't think it's worth the effort, but I can be swayed

x-pack/docs/en/security/authentication/oidc-guide.asciidoc Outdated Show resolved Hide resolved
Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

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

Nice job Ioannis!

@lcawl
Copy link
Contributor

lcawl commented May 3, 2019

@jkakavas Do you intend this content to be located in the same place as https://www.elastic.co/guide/en/elastic-stack-overview/current/saml-guide.html ? If so, I'll open a PR in stack-docs to pull it in and fix a few inclusions here.

@jkakavas
Copy link
Member Author

jkakavas commented May 4, 2019 via email

@jkakavas
Copy link
Member Author

jkakavas commented May 8, 2019

@elasticmachine run elasticsearch-ci/docbldesx

@lcawl
Copy link
Contributor

lcawl commented May 8, 2019

I've cleaned up a few documentation issues.

The new content will be added to the Stack Overview via elastic/stack-docs#328

At some point I think we'll want to add configuration details to the Elasticsearch Reference too (equivalent to https://www.elastic.co/guide/en/elasticsearch/reference/master/configuring-saml-realm.html). But I think we can do that in a subsequent PR (equivalent to #30548)

==== Register the RP with an OpenID Connect Provider

The Relying Party ( {es} and the custom web app ) will need to be registered as
client with the OpenID Connect Provider. Note that when registering the
Copy link
Contributor

@lcawl lcawl May 10, 2019

Choose a reason for hiding this comment

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

Suggested change
client with the OpenID Connect Provider. Note that when registering the
a client with the OpenID Connect Provider. Note that when registering the

Copy link
Member Author

Choose a reason for hiding this comment

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

it is actually one client

Copy link
Contributor

Choose a reason for hiding this comment

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

OK! I've updated my suggestion

"delegating" the authentication to the OpenID Connect Provider ). The OpenID Connect
APIs require authentication and the necessary authorization level for the authenticated
user. For this reason, a Service Account user needs to be created and assigned a role
that gives them the `manage_oidc` cluster privilege. The use of the `manage_token`
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks, I created elastic/stack-docs#334

jkakavas and others added 4 commits May 11, 2019 10:49
Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
@jkakavas
Copy link
Member Author

@tvernum do you want to take another look at this? I've tried to handle your original feedback, let me know what you think

Copy link
Contributor

@tvernum tvernum left a comment

Choose a reason for hiding this comment

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

I haven't re-read the entirety of the docs, but I'm happy with the changes that have been made.

@jkakavas jkakavas merged commit 18f3b27 into elastic:master May 20, 2019
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
This commit adds a configuration guide for the newly introduced
OpenID Connect realm. The guide is similar to the style of the
SAML Guide and shares certain parts where applicable (role mapping)
It also contains a short section on how the realm can be used for
authenticating users without Kibana.

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
jkakavas added a commit to jkakavas/elasticsearch that referenced this pull request Jun 4, 2019
This commit adds a configuration guide for the newly introduced
OpenID Connect realm. The guide is similar to the style of the
SAML Guide and shares certain parts where applicable (role mapping)
It also contains a short section on how the realm can be used for
authenticating users without Kibana.

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>
jkakavas added a commit that referenced this pull request Jun 4, 2019
This commit adds a configuration guide for the newly introduced
OpenID Connect realm. The guide is similar to the style of the
SAML Guide and shares certain parts where applicable (role mapping)
It also contains a short section on how the realm can be used for
authenticating users without Kibana.

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

Backport of #41423 and #42555
jkakavas added a commit to jkakavas/elasticsearch that referenced this pull request Jun 4, 2019
This commit adds a configuration guide for the newly introduced
OpenID Connect realm. The guide is similar to the style of the
SAML Guide and shares certain parts where applicable (role mapping)
It also contains a short section on how the realm can be used for
authenticating users without Kibana.

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

Backport of elastic#41423 and elastic#42555
jkakavas added a commit that referenced this pull request Jun 4, 2019
This commit adds a configuration guide for the newly introduced
OpenID Connect realm. The guide is similar to the style of the
SAML Guide and shares certain parts where applicable (role mapping)
It also contains a short section on how the realm can be used for
authenticating users without Kibana.

Co-Authored-By: Lisa Cawley <lcawley@elastic.co>

Backport of #41423 and #42555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) v7.2.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants