-
-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.5.4 - token time-window validation #2185
Comments
Something like that?
|
For reference some wording about "iat" and "nbf" (but not "exp") from FAPI 2.0:
|
I would not put |
Note that for DPoP, "iat" is the value used to check the validity of the DPoP proof.
I'm wondering if there is something missing here (?):
So this should be something like:
|
What about something like:
or
|
From last 2 proposals I prefer the first one. This "honors" feels a bit out of context, we need to use a strong and clear term such as "must" from https://datatracker.ietf.org/doc/html/rfc2119.
consumer - it can be there, but I think it is not necessary. If something is going to use the content from the token, is is consuming the content and is consumer by nature. Is there any other interpretation that we need to clarify this? |
Rechecking it again, I think this one good enough:
@randomstuff - any changes or improvement to apply from your last proposal comment taking into account my last comment? |
Some more versions:
|
I'd like your second version better. The two other looks somewhat ambiguous to me. Analysis of the third propositionFor example,
I think this is ambiguous about the scope of the condition. This might be understood as:
whereas we mean:
This would be clearer:
But actually, something seems to be missing to me and we mean:
What about:
or
I removed "stateless" here because this can apply to stateful tokens as well (i.e. when using OAuth token introspection), right? |
May I suggest wording that favours rejection over acceptance? For example, rather than "accepts a token only if.." what about "rejects the token if..."? |
I'm a bit lost now what is the latest proposal here :) @randomstuff - just in case, it is a V3 issue. If we want to have OAuth mentioned, it sounds like a specific requirement for V51. By content at the moment I see it as general requirement. Is OAuth Introspection defines nbf and exp or it uses the definitions from JWT? |
@elarlang, the token introspection part can be skipped if needed. The definitions of nbf and exp from token introspection reference the definition from JWT (but use them in a separate context):
|
Those definitions I referenced in the issue description. My point here is that we should make "in general" valid requirements for (JWT) tokens. If there is a more specific case to cover with some specific, then there is a need to make a separate requirement for the related paragraph. |
A suggestion, as part of This is part of "cleaning up 3.5" see #1917 (comment), is to have:
|
I would not include this. It's usually OK to use your access token many times while it's still valid. Some tokens are supposed to be used only once (ID token, DPoP proofs) but this is not the case for all tokens (such as access tokens). |
This is a separate test and problem to solve. Let this requirement only focus on the time window. I would like the second part / example as it is:
But I did not find any solution for first part that I'm happy with. For a starter:
|
I agree, good to split this.
Is this better?
|
Some changes, including removed 'iat' claim, as it is not meant for time-window validation by JWT own spec. It can be used if the application logic works that way and the requirement is still valid for "validity must be checked" and for example, for JWT those claims must (I changed should to must) be used:
|
Spin-off from #1917
Current requirement:
It should be more abstract and cover "time window" when the token is valid.
To check the expiration, we need to require
exp
to be present and set. It is not set for example for refresh tokens whenoffline_access
is used.Technically it should also cover to check
nbf
(Not Before).Related RFC https://datatracker.ietf.org/doc/html/rfc7519
exp
- optionalnbf
- optionalSo the requirement need to validate the "time-window", and it can be validated, if
nbf
and/orexp
claims are provided in the token (both are optional).The text was updated successfully, but these errors were encountered: