|
19 | 19 | # body parameters going on the wire and must differentiate cached tokens. |
20 | 20 | # |
21 | 21 | # Excluded fields and reasons: |
22 | | -# - "key_id" : Already handled as a separate cache lookup field |
23 | | -# - "token_type" : Used for SSH-cert/POP detection; AT entry stores it separately |
24 | | -# - "req_cnf" : Ephemeral proof-of-possession nonce, changes per request |
25 | | -# - "claims" : Handled separately; its presence forces a token refresh |
26 | | -# - "scope" : Already represented as "target" in the AT cache key; |
27 | | -# also added to data only at wire-time, not at cache-lookup time |
28 | | -# - "username" : Standard ROPC grant parameter, not an extra body parameter |
29 | | -# - "password" : Standard ROPC grant parameter, not an extra body parameter |
| 22 | +# - "client_id" : Standard OAuth2 client identifier, same for every request |
| 23 | +# - "grant_type" : Standard OAuth2 grant type (e.g. jwt-bearer, refresh_token) |
| 24 | +# - "scope" : Already represented as "target" in the AT cache key |
| 25 | +# - "claims" : Handled separately; its presence forces a token refresh |
| 26 | +# - "username" : Standard ROPC grant parameter |
| 27 | +# - "password" : Standard ROPC grant parameter |
| 28 | +# - "refresh_token" : Standard refresh grant parameter |
| 29 | +# - "code" : Standard authorization code grant parameter |
| 30 | +# - "redirect_uri" : Standard authorization code grant parameter |
| 31 | +# - "code_verifier" : Standard PKCE parameter |
| 32 | +# - "device_code" : Standard device flow parameter |
| 33 | +# - "assertion" : Standard OBO/SAML assertion (RFC 7521) |
| 34 | +# - "requested_token_use" : OBO indicator ("on_behalf_of"), not an extra param |
| 35 | +# - "client_assertion" : Client authentication credential (RFC 7521 §4.2) |
| 36 | +# - "client_assertion_type" : Client authentication type (RFC 7521 §4.2) |
| 37 | +# - "client_secret" : Client authentication secret |
| 38 | +# - "token_type" : Used for SSH-cert/POP detection; AT entry stores separately |
| 39 | +# - "req_cnf" : Ephemeral proof-of-possession nonce, changes per request |
| 40 | +# - "key_id" : Already handled as a separate cache lookup field |
30 | 41 | # |
31 | 42 | # Included fields (examples — anything NOT in this set is included): |
32 | | -# - "fmi_path" : Federated Managed Identity credential path |
33 | | -# - any future extra body parameter that should isolate cache entries |
| 43 | +# - "fmi_path" : Federated Managed Identity credential path |
| 44 | +# - any future non-standard body parameter that should isolate cache entries |
34 | 45 | _EXT_CACHE_KEY_EXCLUDED_FIELDS = frozenset({ |
35 | | - "key_id", |
36 | | - "token_type", |
37 | | - "req_cnf", |
38 | | - "claims", |
| 46 | + # Standard OAuth2 body parameters — these appear in every token request |
| 47 | + # and must NOT influence the extended cache key. |
| 48 | + # Only non-standard fields (e.g. fmi_path) should contribute to the hash. |
| 49 | + "client_id", |
| 50 | + "grant_type", |
39 | 51 | "scope", |
| 52 | + "claims", |
40 | 53 | "username", |
41 | 54 | "password", |
| 55 | + "refresh_token", |
| 56 | + "code", |
| 57 | + "redirect_uri", |
| 58 | + "code_verifier", |
| 59 | + "device_code", |
| 60 | + "assertion", |
| 61 | + "requested_token_use", |
42 | 62 | "client_assertion", |
43 | 63 | "client_assertion_type", |
44 | | - "assertion", |
| 64 | + "client_secret", |
| 65 | + "token_type", |
| 66 | + "req_cnf", |
| 67 | + "key_id", |
45 | 68 | }) |
46 | 69 |
|
47 | 70 |
|
|
0 commit comments