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

Handle 3rd party initiated login in OIDC in a different endpoint #43258

Closed
jkakavas opened this issue Aug 14, 2019 · 2 comments · Fixed by #50695
Closed

Handle 3rd party initiated login in OIDC in a different endpoint #43258

jkakavas opened this issue Aug 14, 2019 · 2 comments · Fixed by #50695
Labels
enhancement New value added to drive a business result Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@jkakavas
Copy link
Member

So far we use the rp.redirect_uri both for RP initiated and 3rd party initiated logins. This should work in most cases but breaks when an OpenID Provider responds to an rp initiated Authentication Request with a redirect to the redirect_uri that contains an iss parameter.

In this case, since we check for iss first, we assume this is a new request for a Third party initiated login and we send a new Authentication Request to the OP, which ends up in an infinite loop and probably an ERR_TOO_MANY_REDIRECTS in the browser.

There is no reason for an OP to send the iss parameter in an authentication response, but at the same time the Spec dictates that an RP MUST ignore any unknown parameters when validating an authentication response.

We could try changing our logic to check for the existence of a code parameter first (or an id_token in the case of an implicit flow ) but I'd suggest we simply support and additional endpoint as the login initiation endpoint for supporting Third party initiated login.

@jkakavas jkakavas added bug Fixes for quality problems that affect the customer experience Feature:Security/Authentication Platform Security - Authentication labels Aug 14, 2019
@azasypkin azasypkin added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Aug 19, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security

@jkakavas
Copy link
Member Author

As discussed with @azasypkin, the slightly-relevant changes in #42069 makes this a non-issue for >7.4.
I suggest we keep this open as an ER, as I believe that having a separate login initiation endpoint is probably better from a user perspective and might also allow us to simplify the OIDC auth provider code further.

@azasypkin azasypkin added enhancement New value added to drive a business result and removed bug Fixes for quality problems that affect the customer experience labels Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Security/Authentication Platform Security - Authentication Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants