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

Support of different types of tokens is not clear #11

Closed
alextok opened this issue Dec 19, 2023 · 5 comments
Closed

Support of different types of tokens is not clear #11

alextok opened this issue Dec 19, 2023 · 5 comments

Comments

@alextok
Copy link

alextok commented Dec 19, 2023

We need to define how different type of credentials will be delivered to the servers. The current spec defines "authorization" as , but what should we send if it is an "id_token", or "access token", or custom token. What is a plan to support other credential types?

Plan A:
"authorization" : <authorization_code | id_token | access_token|custom_token >

Plan B:
"authorization" : <authorization_code>
"id_token": <id_token>
"access_token": <access_token>
"custom_token": <custom_token >

@arnar
Copy link
Collaborator

arnar commented Dec 19, 2023

I think the particular type or semantics of those tokens don't need to be relevant to dbsc.

We could clarify that this should not be confused with authorization tokens in eg OAuth2 - the only meaning of the authorization parameter is that the browser will set it as an Authorization: Bearer ... header on the registration call to the endpoint.

The motivation for this was twofold:

  1. It allows passing a bearer token for the server to link registration with some preceding sign in flow without relying on cookies.

  2. It may fit some existing oauth-modeled infrastructure, where a one time authz token can be used here, a refresh token as the session id, and access tokens as the short term cookies.

But if a website wants to use other tokens (including bespoke non-standard ones), as long as they accept them in the Authorization header, they should be able to just do so.

@kmonsen
Copy link
Collaborator

kmonsen commented Dec 27, 2023

Updated the explainer with Arnar's explanation here: d23e52d

@alextok
Copy link
Author

alextok commented Jan 4, 2024

In OAuth RFC there is a term "authorization code" but there is no term "authorization token". Hence, I would remove:

The authorization code is not an authorization token

I would change this one:

a one time authz token
to:
a one-time authorization code

I would remove refresh token, as it may be an arguable statement (depends upon background):

a refresh token as the session id

My version:

The authorization code is optional and will be sent in the registration JWT if present. The authorization parameter is that the browser will set it in the JWT on the registration call to the endpoint. This allows passing a bearer token for the server to link registration with some preceding sign in flow without relying on cookies, or it may fit some existing OAuth-modeled infrastructure, where a one-time authorization code, an access token or id token can be used here for authentication. If a website wants to use other tokens (including bespoke non-standard ones), as long as they accept them in the Authorization header, they should be able to just do so.

@alextok alextok changed the title Support of different types of tokens in not clear Support of different types of tokens is not clear Jan 4, 2024
@kmonsen
Copy link
Collaborator

kmonsen commented Jan 4, 2024

Updated here: 6b39658

@alextok alextok closed this as completed Jan 4, 2024
@arnar
Copy link
Collaborator

arnar commented Jan 5, 2024

I added the value back as the authorization header in 00141ce, as this is the main point that can help integrate with existing infra. I agree it should be included in the JWT as well though for integrity, hence it appears in both places now.

I also changed some of the language to clarify.

Please reopen this issue if you have comments on that change.

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

3 participants