Closed sisyphusSmiling closed 1 year ago
Quick update on this to everyone following along. Based on the feedback received so far, I'm working to include the following changes in the next iteration of this contract:
ChildAccount
to LinkedAccounts
ChildAccountCreator
resourceMy plan is to get this implementation done and reflected in this FLIP by EOD today. If interested, you can follow along in this branch of the onflow/linked-accounts repo
Quick update on progress over the week as it's not visible in the contents of this FLIP:
We responded to concerns raised by community developers related to sharing user-controlled access on app-custodied accounts. The proposed solution builds on this FLIP, though works to separate concerns between user and developer side of the house with this FLIP solving the user side of the equation.
Essentially, the proposed solution, outlined in this forum post, enables developers to define restricted access on the linked account which takes effect in the same transaction which links user and app accounts. The user then has unrestricted access while the app retains access to only the Capabilities needed to act on behalf of the user in the context of the dapp.
Moving forward, the focus for this week is increasing test coverage of the implementation contract & supporting transactions to ensure sound security. Additionally, I'll be working to break down concepts related to account linking & hybrid custody that will help devs get up to speed quickly.
Please check out the linked forum post, appreciate it all!
Adding another quick update here now that we've aligned on an access model:
After lots of great discussion, the proposal for an unrestricted user/restricted app access model is being flipped in favor of a restricted user/unrestricted app access model. Check out the flowtyio/restricted-child-account repo for work implementation level details and work on this front moving forward.
This is due to a number of factors including:
You can find the discussion in the previously linked forum post and meeting notes.
Remaining open questions:
Next steps:
Thanks for the added summary @sisyphusSmiling! Adding some notes about the current PR as it pertains to outstanding issues
Rules around multi-tenancy (IOW managing multiple parents & rule sharing)
How it works in the active PR is that a ChildAccount
resource creates and manages underlying ProxyAccount
resources which each have their own rules managed by the account's owner. Parents are shared a capability to a proxy only meant for them. Even if the mechanisms in place are complex, the owner of the child account only needs to know about a few methods to add, revoke, or edit existing parents (edits aren't done yet)
Decide how we want to handle access promotion from restricted -> unrestricted user access
The ChildAccount
has a few methods to change an account's ownership which would then alter restricted -> unrestricted access. Mainly, there are two forms of modified ownership:
Here is a diagram for how the current PR works:
Some thoughts and implementation from my side.
https://github.com/onflow/hybrid-custody/pull/140
Feel free to further discuss.
FYI This FLIP has been updated to reflect the current state of HybridCustody contracts currently deployed to Testnet and proposed for Mainnet.
Please take a look and leave your thoughts/reviews.
Forum Post: https://forum.onflow.org/t/account-linking-authaccount-capabilities-management/4314
This FLIP introduces a proposed standard for how AuthAccount Capabilities are managed and brings into discussion a number of open questions around the topic of account linking.