-
Notifications
You must be signed in to change notification settings - Fork 15
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
Consider adding a 'nonce' param to WWW-Authenticate response header #3
Comments
what to name it will depend on whether we keep the current POP token scheme or do something different (such as my proposal). a "nonce" should only be used once. if the challenge will be included in every POP token (and be verified that it was given by the RS), then it shouldn't be called a "nonce". something like in my proposal, it's only used once when requesting the access token, so calling it |
having a challenge in the POP token can also provide a reasonable way for the server to implement POP token revocation, by either forgetting the challenge from a table of valid ones, or (if #10 is implemented too) adding it to a table of revoked ones until it expires, which will be in a time determined to be reasonable to remember stuff for by the server. |
I think UMA uses https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html#permission-success-to-client
HTTP/1.1 401 Unauthorized
WWW-Authenticate: UMA realm="example",
as_uri="https://as.example.com",
ticket="016f84e8-f9b9-11e0-bd6f-0021cc6004de"
... |
DPoP uses
I think it serves the same purpose as in cases where client creates nonce to prevent someone replying it requests. I still don't understand which threats nonce created by RS should address. In UMA 2.0 we can find
Which seems related to asynchronous claims gathering and need for some notion of transaction. I don't see exactly where we would have similar requirement in solid. |
an RS-chosen nonce forces the client to perform a cryptographic signature over a value that the RS has control over. there are multiple reasons this is important:
any proof of possession should also use a client-chosen nonce (like |
@zenomt could you share an example of a threat which RS provided nonce mitigates? |
the canonical threat is if a (large, possibly nation-state) adversary discovers a weakness in a cryptographic hash (for example, one used in a signature algorithm) that decreases the time to find a collision from essentially ∞ to, say, days-to-weeks-to-months. if the time to find a collision is on the order of days or weeks or months, such an adversary could spend that time to forge a credential (like a POPToken) ahead of time to be used at just the right time to access a restricted resource. a server-provided nonce reduces the amount of time an adversary has to find a collision from "unlimited" to the lifetime of the nonce, which should be on the order of minutes (EDIT and for a true single-use nonce, such as in my proposal: provided the nonce hasn't already been used/redeemed). |
Thank you for clarifying @zenomt ! Looking at sequence diagram in https://github.com/zenomt/webid-auth-protocol#webid-oidc-proof-of-possession-operation It looks that RS includes nonce in response which later client uses in request to https://docs.kantarainitiative.org/uma/wg/rec-oauth-uma-grant-2.0.html#rs-tokenless-response
In cases like your proposal with |
correct. as i mentioned above (#3 (comment) ) if this RS-provided challenge was going to be used in today's POPToken, it would more appropriately be called "challenge" because the expectation is it could be used more than once (until it expired or was revoked). calling it "nonce" is appropriate to my proposal because it's only used once. |
As mentioned by @zenomt in #1, it may be advantageous to:
nonce
param to the Resource Server's 401WWW-Authenticate
response headers.Specifically, on a 401 Unauthorized http response, the Resource Server would include the authenticate header that would look something like:
WWW-Authenticate: Bearer realm="..." scope="..." nonce="abcd123"
Opening this issue as a reminder to discuss:
nonce
orchallenge
or something else)The text was updated successfully, but these errors were encountered: