Briefing · Article · source · published · Boston Identity
RFC 9470 lets an API demand a fresher or stronger sign-in, with no shared scale for 'stronger'
Vittorio Bertocci of Auth0/Okta and Brian Campbell of Ping Identity wrote RFC 9470, a 2023 IETF Proposed Standard. It lets an API turn down a request because the user's sign-in behind the access token was too weak or too old, and tell the client what would pass. The new token then carries or references how the user signed in, as acr and auth_time. The RFC assumes no shared ranking of sign-in methods.
RFC Editor · Vittorio Bertocci, Brian Campbell · September 8, 2023 · read
What's happening
Finding3RFC 9470 lets an API turn down a request because the user's sign-in was not strong or recent enough, and say what would pass.
RFC 9470 gives an API a standard way to turn down a request because the user's sign-in behind its access token was not strong enough or recent enough, and to say what would pass. The API answers with a WWW-Authenticate challenge carrying a new error value, insufficient_user_authentication. In acr_values it can list the authentication context class references it accepts, in order of preference, and in max_age the number of seconds allowed since the user last actively signed in. The client SHOULD carry them, when present, into its authorization request as the OpenID Connect parameters of the same names. How the API decides that a request needs more is out of scope, and the RFC calls "step up" a metaphor that does not suggest "an absolute hierarchy of authentication methods expressed in interoperable fashion."
Also reported in +1 briefing
flag a problem with BI-FIND-2023-0051
Figure steps
- The client calls the API with the access token it already holds.
- The API finds the sign-in behind that token too weak or too old and answers 401 with insufficient_user_authentication, naming acr_values, max_age or both. How it decides is out of scope.
- The client sends the user's browser to the authorization server with the same acr_values and max_age in the authorization request.
- The user signs in as the request asks, and the new access token carries or references how, as acr and auth_time.
- The client repeats the call with the new token.
- The API checks acr and auth_time against its requirement and returns the resource.
The API states its requirement in a 401 challenge, the client carries it to the authorization server, and the new token brings back how the user signed in.
Sequence as RFC 9470 describes it in figure 1 and sections 3 to 6Source dated September 8, 2023Passage: Section 1
Swipe for the full figure →
RFC 9470 carries how the user signed in as acr and auth_time, as claims in a JWT access token or as members of a token introspection response.
For the retry to pass, the API has to know how the user signed in, and RFC 9470 carries that in the token. It describes two ways: acr and auth_time claims in a JWT access token (RFC 9068), or the same two values as members of a token introspection response (RFC 7662); other methods are allowed by agreement but out of scope. In a JWT access token, both values are set when the user authenticates and do not change when the token is renewed. The authorization server SHOULD treat a requested acr as necessary: if the sign-in did not meet it, the request fails with unmet_authentication_requirements instead of returning a token. The RFC says this will help keep clients from looping on tokens the API has already rejected. An authorization server that lists acr_values_supported in its metadata signals that it will understand and honour acr_values and max_age.
flag a problem with BI-FIND-2023-0052
RFC 9470 warns that the challenge itself can give information away, for example which users might be high-privilege targets for phishing.
RFC 9470's security section warns that the challenge itself can give information away. Depending on the API's policy, acr_values might disclose details about the user, the resource or the authorization server; the RFC's example is an API that asks some users but not others for a high-assurance acr, which "might identify possible high-privilege users to target with spearhead phishing attacks." An API MAY send the challenge without first validating the token, which the RFC says leaks its requirements to a caller who has not shown it can get a token. It also tells authorization servers and clients to consider that a malicious resource server might abuse its power to prompt the user. Its deployment section adds that, because the RFC puts no limits on their policies, an API and an authorization server can set requirements no user can meet.
flag a problem with BI-FIND-2023-0053
Section by section
4showing 4 of 4
[1]Why a resource server needs to ask for stronger or fresher authentication, and the end-to-end flow
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
Standards
Why a resource server needs to ask for stronger or fresher authentication, and the end-to-end flow
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
In sections 1 and 2, an API may need a stronger or more recent sign-in than the access token reflects, on grounds only the API knows; the RFC's example is an online shop that wants more for purchases over a threshold it sets itself. The flow has six steps: the call, the API's challenge, a new authorization request, a new token, the retry and the resource. The RFC calls 'authentication level' and 'step up' metaphors that imply no interoperable hierarchy of methods.
technical artifactfrom published text
[2]The challenge and the authorization request: insufficient_user_authentication, acr_values, max_age
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
Standards
The challenge and the authorization request: insufficient_user_authentication, acr_values, max_age
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
Sections 3 and 4 define one new error value, insufficient_user_authentication, and two parameters for the WWW-Authenticate challenge: acr_values, an ordered list of acceptable authentication context class references, and max_age, the seconds allowed since the user last actively signed in. The client SHOULD carry them into its authorization request as the OpenID Connect parameters of the same names. How the resource server decides to challenge is out of scope.
technical artifactfrom published text
[3]What the authorization server returns and how the resource server reads it: acr and auth_time, introspection, metadata
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
Standards
What the authorization server returns and how the resource server reads it: acr and auth_time, introspection, metadata
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
Under sections 5 to 7, the authorization server SHOULD treat a requested acr as necessary and return unmet_authentication_requirements rather than a token that misses it, to help keep clients out of a loop. The token reports the sign-in as acr and auth_time claims in a JWT access token (RFC 9068) or as members of an introspection response (RFC 7662), and acr_values_supported in the server's metadata advertises support. The RFC registers the error value, acr and auth_time with IANA.
technical artifactfrom published text
[4]Deployment limits and security considerations
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
Standards
Deployment limits and security considerations
Vittorio Bertocci, Auth0/Okta · Brian Campbell, Ping Identity
In sections 8 and 9, the RFC puts no limits on resource server and authorization server policy, so the pair can set requirements no user can meet, and it says the document MUST NOT be used to position OAuth as an authentication protocol. A challenge's acr_values might reveal which users are high-privilege. A resource server MAY challenge without validating the token, which leaks its requirements, and a malicious resource server might abuse the power to prompt the user.
technical artifactfrom published text