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

Add option of including context information in construction of UN #259

Open
jot2re opened this issue May 13, 2022 · 5 comments
Open

Add option of including context information in construction of UN #259

jot2re opened this issue May 13, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@jot2re
Copy link
Collaborator

jot2re commented May 13, 2022

Currently a UN can be used multiple times within its validity.
This is a feature that allows it to be used repeatedly in short sessions without needing the user to sign a new UN.
However, this can also be a security risk in some contexts.
This task is about allowing an optional extra parameter to be used in the cryptographic process of constructing a UN, which can be used to link the UN to a specific context, which can also locally be verified by a verifier.

@jot2re jot2re self-assigned this May 13, 2022
@SmartLayer
Copy link
Collaborator

Unclear. Do you mean the UN should contain the hash of the current website domain or URL?

@jot2re jot2re added the enhancement New feature or request label May 23, 2022
@jot2re
Copy link
Collaborator Author

jot2re commented May 23, 2022

This is more a "nice to have".
I talked with @oleggrib about this, and currently a UN can be reused during its entire validity. We discussed that this is generally not the functionality we actually want. We generally want it to just work a single time. However, this does not seem to currently be a big security issue.

@oleggrib
Copy link
Collaborator

@jot2re ,
Current UN limited by:

  • TTL
  • domain

in most cases UN will be used in useEthKey object inside website session. So we can replace domain with session nonce and use UN as is. If no session then we can use domain, not nonce.
But websites, who can allow access to something or sell something with discount use cookie-sessions to stay user cart, auth, etc syncronized., so we can get nonce and pass it to UN instead domain, because domain is just string.

@jot2re
Copy link
Collaborator Author

jot2re commented May 24, 2022

Yes, it is a nice "hack" of how to do it. Because basically it is all a question of optionally adding an extra parameter which gets hashed, but since the domain is already getting hashed, this can be done implicitly through the domain string.
But it is a bit more pretty and easier to read/understand using parametrisation.

@oleggrib
Copy link
Collaborator

But it is a bit more pretty and easier to read/understand using parametrisation.

If single param enough for use then we can rename domain to nonce and sometime pass session nonce, sometime domain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants