-
Notifications
You must be signed in to change notification settings - Fork 37
Description
In our implementation, Credential Issuer (RS) will use different Authorization Servers depending on the grant type: authorization code flow will use existing AS in production and there will be a new AS spun out for pre-auth code flow.
We did our best towards using the same AS but in the end it was impossible because we cannot make changes to the AS in production so that token endpoint accepts pre-auth code and using a new AS as an intermediary AS to the existing production-AS for authz code flow broke SSO and all other features (production AS is needed for authz code to authenticate existing customers). There was also a suggestion to use different credential issuer (RS) per AS, but most credentials can be issued using both of the grant types, so that would mean the wallet would have to determine which issuer to use depending on the grant type which adds a lot of complexity (i.e. making credential_issuer property in the credential offer an array so that the wallet can choose a right RS/issuer based on the flow?).
We explored a lot of options and settled on using the same RS with two ASs.
This means that Credential Issuer will need to communicate in its metadata endpoints of multiple Authorization Servers, while currently issuer metadata only allows to communicate one. Here, we explored the following three options:
- defining
authorization_code_authorization_serverandpre-authorization_code_authorization_serverparameters in the credential issuer metadata, the values of which are respective endpoints. (the parameter names already sound horrible, I know) - defining
authorization_serversparameter as an array of strings that can include multiple entries, the wallet will need to determine which AS to use looking into the metadata of each entry. - defining
authorization_serversparameter as an array of objects where each object entry clarifies which grant type which AS supports.
To the options 3, @selfissued rightly said this "gives the RS the job of supplying some AS metadata. That could easily become stale or out of sync with what the AS actually does. It's probably cleaner to let the AS speak for itself." but I think this comment also applies to option 1.
@jogu has pointed out that "others are likely to have use cases for multiple authorization servers other than an AS per grant type too.", while option 1 and 3 are pretty specific to AS per grant type.
option 2 is also an approach adopted in resource server metadata draft, which has recently been adopted by IETF OAuth WG. So I think option 2 is the best option. I did a draft PR #78 to see how it would look and I don't think it's too terrible. In most cases, I would expect authorization_servers array would only have one entry, but having this parameter as an array would be very helpful.
Feedback would be appreciated.