Repository navigation
feat!: directed community grants, context-v3 salting (Working Draft 0.7.0) - #50
Merged
Merged
Conversation
….7.0) - A community-issued VMC is `directed` at minimum and `public` where the community is open to outsiders (dtgwg-cred-spec#86): only `pairwise` is refused. `new_vmc` and `new_community_role_vac` take an `IssuerScope`; the role VAC refuses `pairwise`. `new_member_vmc_for` acknowledges a `directed` grant. - Salting under context v3 (dtgwg-cred-spec#87) behind the off-by-default `context-v3` feature: constructors list DTG_CONTEXT_V3 and draw a fresh 32-byte base58btc salt at build time (kept on re-proof, redrawn on re-issue); v3 without a 32-byte salt is refused. A `salt` under v1/v2 is refused in every build. - README: Working Draft 0.7.0, contexts v1/v2 supported, v3 pending; 0.16 upgrade ordering (verifiers before issuers emit `directed`). - "member VTC" wording reads VTC or VTN (dtgwg-cred-spec#83). BREAKING CHANGE: `new_vmc` and `new_community_role_vac` gain an `issuer_scope` parameter; `DTGCommon` gains `salt`; a `salt` under v1/v2 is now refused. Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
…alts Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements DTG Core Credentials Working Draft 0.7.0 for the VTI Fig release.
Directed community identifiers (trustoverip/dtgwg-cred-spec#86)
A community-issued VMC declares
directedat minimum,publicwhere the community is open to outsiders. Onlypairwiseis refused now (IssuerScopeTooNarrow { minimum: Directed }, at parse and invalidate()/sign()), andnew_member_vmc_foracknowledges adirectedgrant.Breaking API:
new_vmc(issuer, issuer_scope, subject, …)andnew_community_role_vac(community, issuer_scope, member, …)take the community's declaration.new_community_role_vacrefusespairwise. PassIssuerScope::Publicto keep the 0.15 behaviour. VIC docs state the same minimum. It isn't enforced there, because a VIC doesn't say whether its issuer is the community.Salting under context v3 (trustoverip/dtgwg-cred-spec#87), behind
context-v3(off by default)The registry hasn't published
contexts/v3.jsonld, and until its digest is recorded the spec says issuers MUST NOT emitsalt. With the feature on:DTG_CONTEXT_V3(https://registry.trustoverip.org/dtg/context/v3) and draw a 32-byte base58btcz…salt inbuild(), not insign(), so a re-proof keeps it (including signing via another backend aftervalidate()) and a re-issue redraws it.InvalidSalt).with_purposeskeeps v3.In every build, feature on or off, a
saltunder v1/v2 is refused (InvalidSalt). Before this change it passed throughDTGCommon::extra. The crate has no selective-disclosure path, and the field docs saysaltmust be mandatory-disclosure.The salt is drawn with
rand0.10. It's already in the normal dependency graph through the affinidi crates and is now an optional dependency of the feature, so the feature adds no new crate.Docs
directed, and before any issuer enablescontext-v3.Tests
tests/salt.rscovers v1/v2 salt refusal in every build, v3 unrecognized when the feature is off, v3 issue/parse, fresh salt per issue, refusal of a missing, short, long or wrong-base salt, salted acknowledgement, and re-proof keeping the salt.context-v3.