decentralized-identity / confidential-storage

Confidential Storage Specification and Implementation
https://identity.foundation/confidential-storage/
Apache License 2.0
79 stars 23 forks source link

Request & Remove Permissions #15

Closed csuwildcat closed 4 years ago

csuwildcat commented 7 years ago

The act of requesting permissions should follow a defined flow, and leverage/reuse existing Hub functions wherever possible.

Requesting Permission

The requesting entity shall perform the following steps to request a permission:

  1. Create a Schema.org Message object, with a potentialAction value of the AuthorizeAction object type
  2. Add the permission object, in the format described in the Hub Permissions spec, as result field of the AuthorizeAction
  3. Wrap the Message object with a JWT and sign with a key matching the requesting entity's DID
  4. Create a request and set the Message object as the body
  5. Send the request to a Hub of the target identity

In response, the target identity shall:

  1. Validate the signature on the permission request
    • If valid, send the requesting entity a 202 Accepted response
  2. Wait for the identity owner to consent (if applicable to entity type, ex: human)
    • A Hub connected device of the owner will receive the Message in a change set sync operation
    • The device and user will interact to acquire any consent via appropriate UI
    • If the owning entity accepts the request, the Message object will be sent back with its actionStatus updated with a CompletedActionStatus value
  3. Upon reception of owning entity consent, the Hub shall add the permission.
  4. To inform the requesting entity of the outcome, the Hub shall send a 201 Created request to the Hub of the requesting entity with the target identity's consenting response object
cvan commented 7 years ago

I preface this with apologies for lacking context: what are the expected timings for request/response lifecycles? Acceptable timeouts? Ballpark ranges?

csuwildcat commented 7 years ago

@cvan not sure about timing, but I was reading about one strategy where all requests/responses are async, in the sense that you should not expect a response on the same request loop.

Open to suggestions, what do you think?

csuwildcat commented 6 years ago

@thedoctor should we add this to the Capability area/spec, or just the main explainer?

thedoctor commented 6 years ago

@csuwildcat This should go in the auth section (which is still to be created, and still pending somewhat on the DID-auth work)

ajunge commented 5 years ago

Is this in the auth section of the spec now?

tplooker commented 4 years ago

Resolved on 07/05/2020 call