Skip to content

Commit 09bee22

Browse files
committed
A sequence diagram for CDT
1 parent 0e28482 commit 09bee22

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/cdt.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
```mermaid
2+
sequenceDiagram
3+
App->>MSAL: AcquireTokenForClient(scopes=..., delegrationConstraints=[...], delegrationKey=...)
4+
note over MSAL: Use the caller supplied key, or a key in memory maintained by MSAL
5+
note over MSAL: Search token cache for same key (req_ds_cnf) AND compatible scopes
6+
alt If cache miss
7+
note over MSAL: Put the key in JWK format and base64url encode it into a req_ds_cnf
8+
MSAL-->>eSTS: POST /tenant-guid/oauth2/v2.0/token<br/><br/>client_id=...&req_ds_cnf=eyJr...xyz
9+
eSTS-->>MSAL: {<br/> "token_type": "Bearer",<br/> "access_token": "eyJh...",<br/> "xms_ds_nonce": "random",<br/>...}
10+
else If cache hit
11+
note over MSAL: Get the xms_ds_nonce from the cached app token
12+
end
13+
note over MSAL: Construct the constraint as a JWT<br/>{"typ": "JWT", "alg": "..."}<br/>.{"xms_ds_nonce": xms_ds_nonce, "constraints": [...]}<br/>.signature
14+
note over MSAL: Mint a CDT as a JWT<br/>{"typ": "cdt+jwt", "alg": "none"}<br/>.{"t": app_token, "c": constraints}<br/>.
15+
MSAL->>App: access_token=CDT, token_type=Bearer
16+
App->>Resource: GET /resource<br/>Authorization: Bearer CDT
17+
```
18+

0 commit comments

Comments
 (0)