This repository was archived by the owner on Jun 23, 2023. It is now read-only.
-
Couldn't load subscription status.
- Fork 25
This repository was archived by the owner on Jun 23, 2023. It is now read-only.
Token Exchange support #162
Copy link
Copy link
Open
Description
So, we are in the process of adding Token Exchange support on oidc-op as described in RFC-8693 and we need feedback regarding the implementation.
More specifically, we consider the following scenario regarding the exchanging of Access Tokens with Refresh Tokens:
- A
USER_AaccessesCLIENT_Aand retrieves an Access TokenAT1with a set of scopes that includes theoffline_scope. CLIENT_AsendsAT1toCLIENT_B.- Then
CLIENT_BexchangesAT1with a new Refresh TokenRT1with the same scope set, but sets theaudienceparameter of the request to beCLIENT_CandCLIENT_D. - Finally
CLIENT_B,CLIENT_CorCLIENT_Dmay useRT1to get Access TokenAT2with the same or fewer scopes (and optionally with a different audience) to access protected resource X. Equivalently,AT2will be owned by the client that issued the new Token Exchange request and every client (if any) that will be stated in the audience parameter will be allowed to use it.
Some observations on the aforementioned scenario:
- During step 1, the initial access token
AT1belongs to a sessionUSER_A;;CLIENT_Ain terms of oidc-op. - On the contrary, at step 3 the exchanged refresh token
RT1should be mapped in a different client in order forCLIENT_Bto be able to use it. This in terms of oidc-op is interpreted as a new sessionUSER_A;;CLIENT_Bwhere the token should be assigned. - In step 4, only the owner and the corresponding audience of token
RT1are allowed to use it. Currently, oidc-op retrieves the session thatRT1is mapped to and checks if theclient_idstated in the request matches the client of the session. This check should be modified in order to include a check upon theaudienceof the used token. - In RFC-8693 there is no strict definition of what the
audience(or evenresource) parameter should represent. For now, we intend to map theaudienceparameter with oidc-opclient_id.
Some potential conflicts in case of multiple audiences:
- What happens if we decide to support revocation of token upon usage? The first client, out of the set of the legitimate clients that are allowed to use the token, restricts the others from using it.
peppelinux
Metadata
Metadata
Assignees
Labels
No labels