-
Notifications
You must be signed in to change notification settings - Fork 59
DRAFT: CN credential standard #3416
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
base: main
Are you sure you want to change the base?
Conversation
| deriving (Eq, Show) | ||
|
|
||
| -- | A view of a credential record stored in a credential registry. | ||
| data CredentialRecordView = CredentialRecordView with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: make this a CredentialView and remove the usage of Record in this file.
e87590c to
8d02ed0
Compare
| format: date-time | ||
| required: false | ||
| description: | | ||
| If provided, only return credential records that are valid at the given time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the semantics if I don't specify a time? is it validAsOf=now or is it all credentials even ones no longer active? If so, I assume I wonder if you should jus tbe able to specify a range in the query as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assuming you can query stuff that is no longer active what guarantees are registries expected to provide? Probably up to them to decide how long they want to store historic data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point on range. Will adjust.
I would expect that the queries should return contracts in their ACS.
| - in: query | ||
| name: holder | ||
| schema: | ||
| type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the motivation for not supporting an array here? Bulk queries across multiple holders seem potentially useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. I was worried that the query plans would not be good enough. However it should be OK. will adjust.
meiersi-da
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add notes from self-review
| and querying credential records. | ||
| version: 1.0.0 | ||
| paths: | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add bulk retrieval APIs for explorers
| $ref: "#/components/schemas/CredentialRegistryLimits" | ||
| required: | ||
| - adminId | ||
| - supportedVersions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: switch to the supportedApis construction used in the token standard for increased flexibility
| - in: query | ||
| name: holder | ||
| schema: | ||
| type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. I was worried that the query plans would not be good enough. However it should be OK. will adjust.
| format: date-time | ||
| required: false | ||
| description: | | ||
| If provided, only return credential records that are valid at the given time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point on range. Will adjust.
I would expect that the queries should return contracts in their ACS.
| -- ^ The time from which this credential is valid. | ||
| validUntil : Optional Time | ||
| -- ^ The time until which this credential is valid. | ||
| meta : Metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: also limit maximal size of metadata
| explode: true | ||
| required: false | ||
| description: | | ||
| Only return credential records issued by one of the specified issuers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: allow filtering for self-published tokens; e.g., using self as an issuer, or by adding a separate flag that allows self-published tokens.
Draft code for a CN credential standard built in a similar fashion to how the CN token standard is built. The CIP text for it has not yet been written. The high-level idea is that:
The standard defines APIs for
CredentialRegistryinterface)CredentialRecordinterface)The SVs run a credential registry as part of their Amulet Name Service (see the
AnsCredentialRegistryimplementation of the interface)Third-parties are welcome to run registries as well. Their off-ledger APIs can be discovered in the ANS registry from a self-published credential by their party with a well-known key.
Concrete sets of claims for specific use-cases are defined as part of additional CIPs, as outlined in https://docs.google.com/presentation/d/1PXVwQU98dPo4hhIrXt1U5pAutWa4YUlvS61xIiBMhgc/edit?slide=id.g328343e708d_0_468#slide=id.g328343e708d_0_468
Pull Request Checklist
Cluster Testing
/cluster_teston this PR to request it, and ping someone with access to the DA-internal system to approve it./hdm_teston this PR to request it, and ping someone with access to the DA-internal system to approve it.PR Guidelines
Fixes #n, and mention issues worked on using#nMerge Guidelines