portier / oidc-prototype

OpenID Connect prototype
2 stars 0 forks source link

What is a "Dynamic OpenID Provider," and can we avoid being one? #4

Open callahad opened 8 years ago

callahad commented 8 years ago

A bunch of things in the OpenID Connect Discovery have stricter requirements for "Dynamic OpenID Providers."

Like having to support the code and token id_token response types in addition to just id_token, or supporting both authorization_code and implicit flows, when we really just want to support the implicit flow.

We could intentionally break from the spec, but I'd like to see how far we can get while being compliant, first.

callahad commented 8 years ago

Here are all the relevant quotes from the OpenID Connect Core spec, all emphasis mine:

callahad commented 8 years ago

My interpretation is that a "Dynamic OpenID Provider" is specifically one implements the Dynamic Client Registration spec.

Similarly, providers that interact with unknown third parties are encouraged but not required to do so via the Discovery and Registration specs.

Does that make sense? Can anyone find an explicit definition of "Dynamic OpenID Provider" in any of the Core, Discovery, or Dynamic Client Registration specs?

callahad commented 8 years ago

If we do have to go down this path, the Dynamic Client Registration spec mentions a way to do so without needing a stateful OpenID Provider:

One means of doing this is to encode necessary registration information about the Client into the client_id value returned by the initial registration of the Client. This has the effect of having the Client store this information, rather than the Authorization Server. The particular encodings used by different Authorization Servers will differ.

When stateless dynamic client registration is used by the Authorization Server, read operations are likely to not be possible, because issuing a Registration Access Token might require per-Client state at the Authorization Server. In that case, no Client Configuration Endpoint or Registration Access Token will be returned by the initial registration of the Client.

callahad commented 8 years ago

Ooh! I found a definition in the OpenID Connect Conformance Profiles document:

Dynamic OpenID Providers implement the Mandatory to Implement Features for Dynamic OpenID Providers described in Section 15.2 of OpenID Connect Core 1.0. Note that conforming to the Dynamic OpenID Provider profile also means that the implementation will conform to the Basic OpenID Provider, Implicit OpenID Provider, and OpenID Provider Publishing Configuration Information profiles and implement the OP features of the OpenID Connect Discovery 1.0 and OpenID Connect Dynamic Client Registration 1.0 specifications.

callahad commented 8 years ago

I think we want to start by aiming for compliance with two of the above profiles:

  1. Implicit OpenID Provider

    Which just means supporting the id_token and id_token token response types.

  2. OpenID Provider Publishing Configuration Information

    Which just means key rotation (punt for the prototype) and publishing provider metadata at /.well-known/openid-configuration. This is a subset of the full "Dynamic OpenID Provider" level.