Skip to content
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

Nonce endpoint when making multiple calls to the credential endpoint #413

Open
TimoGlastra opened this issue Nov 7, 2024 · 8 comments
Open

Comments

@TimoGlastra
Copy link
Member

Previously when requesting multiple credentials from a credential issuer the flow we used is that every credential response contained a new nonce for the next request.

With the new nonce endpoint that doesn't seem possible, so for a server/wallet perspective on implementation I'm curious when you want to request issuance of say 5 different credentials types (so 5 requests to credential endpoint), would you do:

  • request nonce 5x, request credential 5x
  • request nonce 1x, request credential 5x

In this case all credentials would be requested within the nonces active timeframe (so not expired). Is it ok for the "number used once" to be used for multiple requests?

@jogu
Copy link
Contributor

jogu commented Nov 29, 2024

Is it ok for the "number used once" to be used for multiple requests?

That seems the current expectation, yes.

#394 (and the associated PR) are suggesting some tweaks in that area.

@Sakurann
Copy link
Collaborator

there is this sentence in section 12.5 that I hope clarifies the question: A Wallet can continue using a given nonce until it either expires or is rejected by the Credential Issuer.

@Sakurann
Copy link
Collaborator

closing in a week, unless objections

@andprian
Copy link

@Sakurann , regarding the sentence you quoted in from section 12.5, how is the nonce related to a specific wallet? Is it accurate to say that Any wallet can continue using a given nonce ... instead of A wallet ... ?

@Sakurann
Copy link
Collaborator

Sakurann commented Feb 4, 2025

@andprian but it is a specific wallet that is interacting with the issuer in each session, right..?

@TimoGlastra
Copy link
Member Author

I guess what is being asked (might be wrong) is whether you need to bind the nonce to a specific wallet session after it's first use?

Previously in our implementation we generated the nonce for a specific session, but with the new unauthenticated nonce endpoint this is not possible beforehand.

So you then have two choices how to implement this:

  • stateless nonce, can be used for the time it is valid by any wallet
  • stateful nonce, after it's first use you store the session associated with the nonce and other wallets cannot use this nonce amymore

Only one wallet will get the specific nonce from the nonce endpoint, so it's more about a malicious attack i guess?

@andprian
Copy link

andprian commented Feb 5, 2025

Yes, @TimoGlastra that is exactly my point. The statement in section 12.5 might lead to believe that only one wallet would be able to use a nonce, while I don't see a technical binding there. First of all I would like to know what we intend to have. Is it a stateless nonce or a stateful nonce, like you very well put it.

@andprian
Copy link

@Sakurann I opened an issue with a request to protect the endpoint (#461) so that this pending closing issue can be dealt with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants