Skip to content

Conversation

@rflechtner
Copy link
Contributor

@rflechtner rflechtner commented Mar 19, 2024

fixes https://github.com/KILTprotocol/ticket/issues/3179

Backporting the use of DataIntegrity proofs for DID configuration resources from #31.
Cleans up a bit of duplication in the types files as well.

How to test:

Create credentials using the CLI.

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)
    • Either PR or Ticket to update the Docs
    • Link the PR/Ticket here

Comment on lines +69 to 72
"@kiltprotocol/es256k-jcs-2023": "latest-rc",
"@kiltprotocol/sr25519-jcs-2023": "latest-rc",
"@kiltprotocol/eddsa-jcs-2022": "latest-rc",
"@polkadot/keyring": "^12.3.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

packages are ready to be released if no issues are found.

Copy link
Member

@Dudleyneedham Dudleyneedham left a comment

Choose a reason for hiding this comment

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

Some questions to be answered

origin: string,
did: DidUri,
{
expirationDate = new Date(Date.now() + 1000 * 60 * 60 * 24 * 365 * 5),
Copy link
Member

Choose a reason for hiding this comment

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

Is this a default of a year?

Copy link
Member

Choose a reason for hiding this comment

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

Does this have any purpose or is it for show? E.g. Does the chain reflect this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this solution is completely off-chain. but credential verification checks this. And it's 5 years by default, I didn't change this.

credential: DomainLinkageCredential,
expectedOrigin: string,
expectedDid?: DidUri
{ expectedDid, allowUnsafe = false }: { expectedDid?: DidUri; allowUnsafe?: boolean } = {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

allowUnsafe is a flag that switches whether verification allows any data to be signed, supporting the credentials that are currently being used by socialKYC and the like, or whether it requires the JSON-stringified credential to be signed, securing the credential contents against manipulation.

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good. Do we need to document this? Considering the naming people may consider it, well frankly, unsafe.

Copy link
Member

@Dudleyneedham Dudleyneedham left a comment

Choose a reason for hiding this comment

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

LGTM

@rflechtner rflechtner marked this pull request as draft April 10, 2024 16:05
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

Successfully merging this pull request may close these issues.

3 participants