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

OAuth2 discovery versus OIDC discovery #75

Open
bbockelm opened this issue May 7, 2018 · 8 comments
Open

OAuth2 discovery versus OIDC discovery #75

bbockelm opened this issue May 7, 2018 · 8 comments

Comments

@bbockelm
Copy link
Contributor

bbockelm commented May 7, 2018

The location of the .well-known directory is a bit of a mess.

  • The location of the directory is defined by RFC 5785.
  • OIDC's definition of .well-known violates RFC 5785 but is codified in the OIDC standard and in wide use in software implementations.
  • There's a draft standard for OAuth Discovery which is strongly motivated by OIDC but complies with RFC 5785.
  • The draft OAuth Discovery allows clients in mixed use environments to use either approach.

So - what should we do?

@jbasney
Copy link
Member

jbasney commented May 7, 2018

SciTokens should use OAuth Discovery, since SciTokens is OAuth, not OIDC.

Similar issue in scitokens-java.

@bbockelm
Copy link
Contributor Author

bbockelm commented May 7, 2018

But even there, we have:

And it should be published at issuer/.well-known/oauth-authorization-server rather than issuer/.well-known/openid-configuration.

Whereas the OAuth discovery (and RFC 5785) says this should be:

.well-known/oauth-authorization-server/issuer

@jbasney
Copy link
Member

jbasney commented May 7, 2018

Brian, I guess you're referring to https://tools.ietf.org/html/draft-ietf-oauth-discovery-10#section-3.1 and https://tools.ietf.org/html/draft-ietf-oauth-discovery-10#section-5 which discusses how to form the discovery URI when the issuer contains a path component? I don't see anything about .well-known/oauth-authorization-server/issuer in https://tools.ietf.org/html/rfc5785.

It seems clear to me.

issuer = https://scitokens.org/
discovery = https://scitokens.org/.well-known/oauth-authorization-server

issuer = https://scitokens.org/ligo
discovery = https://scitokens.org/.well-known/oauth-authorization-server/ligo

Personally I find https://tools.ietf.org/html/draft-ietf-oauth-discovery-10#section-5 a bit of a mess, so I'd strongly recommend against issuers containing path components to avoid that particular mess. I think there's a decent chance that will change before the RFC is published.

@jbasney
Copy link
Member

jbasney commented May 7, 2018

Following the example at https://tools.ietf.org/html/rfc5785#section-3:

For example, if an application registers the name 'example', the
corresponding well-known URI on 'http://www.example.com/' would be
'http://www.example.com/.well-known/example'.

In our case, the application name is "oauth-authorization-server" so if our issuer is "https://scitokens.org/" then we get "https://scitokens.org/.well-known/oauth-authorization-server".

@bbockelm
Copy link
Contributor Author

bbockelm commented May 7, 2018

You're right - RFC 5785 doesn't really touch this, other than being fairly clear that .well-known belongs to the top-level (which, of course, OIDC doesn't do...).

What's your feeling of the status of the OAuth Discovery document? The WLCG folks were reluctant to follow it as it's still a draft. Given the implementations being considered on the WLCG side are also OIDC clients, there was a strong preference to utilize OIDC mechanisms.

@jbasney
Copy link
Member

jbasney commented May 8, 2018

https://datatracker.ietf.org/doc/draft-ietf-oauth-discovery/ shows it is far along in the process. The change to the URI form for issuers containing path components happened recently during IESG review for BCP 190 conformance. It's farther along than https://datatracker.ietf.org/doc/draft-ietf-oauth-token-exchange/ which we're already depending on.

Given the feedback from WLCG, I'm guessing SciTokens needs to support both OIDC and OAuth discovery, with OAuth discovery as our recommended/preferred approach, since I think we want to avoid any explicit dependencies on OIDC (according to our "SciTokens is OAuth, not OIDC" principle).

@bbockelm
Copy link
Contributor Author

bbockelm commented May 8, 2018

I think that as long as our libraries try the OAuth2 mechanism and fall back to OIDC, we should be fine. If I parsed yesterday's conversation correctly (they haven't updated the working docs to reflect the discussion), WLCG will do the same once the OAuth2 discovery mechanism is an official RFC.

@jbasney
Copy link
Member

jbasney commented Jun 29, 2018

OAuth Discovery is now RFC 8414, so we don't need to worry about "just a draft" concerns anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants