Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Structure CACAO statement to contain actions #3

Merged
merged 1 commit into from
Apr 21, 2022
Merged

Conversation

clehner
Copy link
Contributor

@clehner clehner commented Apr 13, 2022

Re: spruceid/cacao-zcap-rs#9 (comment), spruceid/cacao-zcap-rs#9 (comment)

Make the statement string match a format. The format begins with a string "Authorize action ". Following that is an optional part with the list of actions (allowedAction delegation property). Finally, the remainder of the string is an optional unstructured part, which is used as the cacaoZcapSubstatement delegation property).

Preview: https://demo.didkit.dev/2022/04/14/cacao-zcap-action-substmt.html#statement-actions-mapping
Preview with Respec (#1): https://demo.didkit.dev/2022/04/14/cacao-zcap-action-substmt-respec.html#statement-actions-mapping (branch feat/action-substmt-respec)

@cobward
Copy link

cobward commented Apr 19, 2022

Mostly LGTM. I'm just wondering whether we want the colon or not. It does restrict how the substatement can be used. For example, we might want to have something that reads more naturally:

Authorize action (read, write) on your Kepler orbit for the duration of the session.

vs.

Authorize action (read, write): Allow access to your Kepler orbit for the duration of the session.

Copy link

@chunningham chunningham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks super reasonable, re: the colon I think its ok either way, omitting can still allow services to add it, but I do appreciate a clear separator in this position

Copy link

@awoie awoie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but i think we should sync with the 3box/Ceramic folks on this, especially if we wanna create something that can be used by different projects following CACAO/CASA specs. But we can merge this.

@clehner
Copy link
Contributor Author

clehner commented Apr 21, 2022

The colon separator is supposed to signify the separation between the part of the statement that is structured by this specification, and the part that is unstructured (although it could be structured by an application, but this specification just treats it as a string.
My concern about removing the separator is that it could be ambiguous and someone signing a statement might think that the whole statement has a particular meaning based on its text, when in fact the first part does but the remainder is arbitrary.
Agreed that it would be good to discuss with CASA, Ceramic/3Box, and/or other implementers.

Replace cacaoStatement with cacaoZcapSubstatement
@clehner clehner force-pushed the feat/action-substmt branch from 213be58 to b174de3 Compare April 21, 2022 15:54
@clehner clehner merged commit b174de3 into main Apr 21, 2022
@cobward
Copy link

cobward commented Apr 22, 2022

That makes a lot of sense!

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

Successfully merging this pull request may close these issues.

4 participants