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

Key Delegation needs a protocol check #4

Open
dnpotter opened this issue Aug 25, 2023 · 0 comments
Open

Key Delegation needs a protocol check #4

dnpotter opened this issue Aug 25, 2023 · 0 comments

Comments

@dnpotter
Copy link
Contributor

dnpotter commented Aug 25, 2023

Key Delegation has the 'all-permissions' permission type, which gives the delegated key the same rights to all bubbles as the signing wallet key. This is clearly a security risk since an attacker could trick the user into unknowingly signing the hash of an all-permissions delegation giving the attacker full access to the user's bubbles.

Possible ways this could be prevented:

Firstly, remove the 'all-permissions' type. This is essential but means the Key Delegation becomes extremely restrictive without other changes, such as those below.

  1. Add an 'application-protocol' code to each access control contract and have the Guardian check that the delegation includes that code, perhaps in a new 'application-permission' permission type. This could be implemented by:
    a) having getAccessPermissions return the code in every call, using most of the spare bits in the returned permissions field.
    b) add a new 'protocol' parameter to getAccessPermissions, which would allow the contract to restrict access itself.

  2. Consider a replacement for Key Delegation, such as ProxyIds https://github.com/Bubble-Protocol/bubble-contracts#bubble-id

  3. Encourage users to create a different wallet key for each application. Means the SDK does not need to be modified.

  4. Any others?

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

No branches or pull requests

1 participant