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

services providers need to take delegations they can use #265

Open
Gozala opened this issue Dec 7, 2022 · 3 comments
Open

services providers need to take delegations they can use #265

Gozala opened this issue Dec 7, 2022 · 3 comments

Comments

@Gozala
Copy link
Contributor

Gozala commented Dec 7, 2022

There is some background story here storacha/specs#7, but general idea is that we want to have a chain of command

flowchart TB
   root>"📜 did:web:web3.storage"]-->| rotate on compromise  |manager("🔑 did:key:zManager")

manager-->|rotate regularly|access("🤖 did:key:zAccessWorker")
manager-->|rotate regularly|upload("🤖 did:key:zUploadWorker")
Loading

Where top key is in the safe deposit box, manager key(s) are only used to delegate to individual workers. This implies that our services will only have worker keys, however they may need to act on behalf of the root meaning they should be able to issue following capability to the user when they authenticate

{ with: 'did:web:web3.storage', can: './update' }

In other words services need a to be given authority to do so in form of delegation chain which they can utilize

{
  iss: "did:key:zManager",
  aud: "did:key:zAccessWorker",
  att: [{ with: 'did:web:web3.storage', can: "*" }],
  prf: [{
    iss: 'did:web:web3.storage',
    aud: 'did:key:zManager',
    with: 'did:web:web3.storage',
    att: [{ with: "did:web:web3.storage", can: "*" }],
  }]
}

So they can utilize it when performing delegations like those. These will also become necessary for invocation receipts

@Gozala
Copy link
Contributor Author

Gozala commented Dec 7, 2022

/cc @hugomrdias

@Gozala
Copy link
Contributor Author

Gozala commented Dec 7, 2022

In the short term we can just put root keys into workers, but we should plan to do something along the lines of above down the line.

@Gozala
Copy link
Contributor Author

Gozala commented Dec 15, 2022

I've updated example such that only root DID is did:web and rest are did:key that is because use of did:web in other positions implies more lookups or coordination for no obvious benefit, which is why I think in those cases we should use did:key's instead. That's not to say we don't publish them in DID document, we probably should. Even then we should probably refer to them in a form that does not requires resolution which is did:key

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