-
Notifications
You must be signed in to change notification settings - Fork 207
Closed
Description
Describe the bug
WSL + Azure CLI uses MSAL for auth in a public client scenario.
Upon receiving an ID Token, MSAL validates it and fails due to invalid nbf
with error "The ID token is not yet valid"
Root cause
Looks like MSAL Py tries to validate the id token as follows:
- nbf claim
- exp
- issuer, nonce and aud
However, due to a clock skew, MSAL Py raises an error.
Clients should not validate the id token's nbf
and exp
claim. In case of access tokens, the STS returns an expiry duration in the token response to help clients cache the access tokens correctly.
At a minimum remove nbf
and exp
validation.
Ideally remove all token validation logic - other MSALs do not perform this and rely on having had an SSL connection with the token issuer.