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

Self-provisioned keys #606

Closed
sabineschaller opened this issue Sep 19, 2022 · 4 comments · Fixed by #638
Closed

Self-provisioned keys #606

sabineschaller opened this issue Sep 19, 2022 · 4 comments · Fixed by #638
Assignees

Comments

@sabineschaller
Copy link
Member

When a Rafiki instance calls out to other open payment endpoints, it needs to provide a key for getting a grant. This is required to identify itself. Hence, the Rafiki instance needs to provision its own key(s).

@wilsonianb
Copy link
Contributor

Is there any reason to use unique keys for different auth servers / Open Payments servers?
i.e. should Open Payments server A use one key when acting as a client of Open Payments server B and a different key as a client of Open Payments server C (assuming they all have different auth servers)?

@wilsonianb
Copy link
Contributor

Oh
https://datatracker.ietf.org/doc/html/draft-ietf-gnap-core-protocol#section-2.3

A client instance that is capable of talking to multiple AS's SHOULD
use a different key for each AS to prevent a class of mix-up attacks
as described in Section 12.29.

This makes me think that either:

  • keys should be provisioned on the fly when interacting with an auth server for the first time
  • we support (out of band?) client key pre-registration at the AS (also section 2.3):

The client instance's key MAY be pre-registered with the AS ahead of
time and associated with a set of policies and allowable actions
pertaining to that client.

@wilsonianb
Copy link
Contributor

What if we still generate a single secret/key at startup, but use it to deterministically generate keys for individual auth servers?
https://crypto.stackexchange.com/questions/75614/securely-derive-aes-and-ed25519-keys-from-a-ed25519-seed

@wilsonianb
Copy link
Contributor

We had a look at the attack that is described in the GNAP spec: https://elib.uni-stuttgart.de/bitstream/11682/12220/1/Security_Analysis_GNAP.pdf
We don’t think that Open Payments is susceptible to this attack as we bind the AS and RS (i.e. the RS tells the client which AS to use)
Nonetheless, we do think supporting multiple keys in future is good practice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants