Skip to content
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

Veramo CLI throws error when creating a SDR response #415

Closed
simibac opened this issue Mar 11, 2021 · 0 comments · Fixed by #512
Closed

Veramo CLI throws error when creating a SDR response #415

simibac opened this issue Mar 11, 2021 · 0 comments · Fixed by #512
Assignees
Labels
bug Something isn't working triage

Comments

@simibac
Copy link

simibac commented Mar 11, 2021

Bug severity
3

Describe the bug
Veramo CLI throws error when creating a SDR response.

To Reproduce
Steps to reproduce the behaviour:

  1. create DID:
{
  credentialSubject: {
    name: 'Alice',
    id: 'did:ethr:0x69fb362b8bcc73714072169e3bffb54a3bf0fe1c'
  },
  issuer: { id: 'did:ethr:0x69fb362b8bcc73714072169e3bffb54a3bf0fe1c' },
  type: [ 'VerifiableCredential', 'Profile' ],
  '@context': [ 'https://www.w3.org/2018/credentials/v1' ],
  issuanceDate: '2021-03-04T08:54:21.000Z',
  proof: {
    type: 'JwtProof2020',
    jwt: 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJ2YyI6eyJjcmVkZW50aWFsU3ViamVjdCI6eyJuYW1lIjoiQWxpY2UifSwiQGNvbnRleHQiOlsiaHR0cHM6Ly93d3cudzMub3JnLzIwMTgvY3JlZGVudGlhbHMvdjEiXSwidHlwZSI6WyJWZXJpZmlhYmxlQ3JlZGVudGlhbCIsIlByb2ZpbGUiXX0sInN1YiI6ImRpZDpldGhyOjB4NjlmYjM2MmI4YmNjNzM3MTQwNzIxNjllM2JmZmI1NGEzYmYwZmUxYyIsIm5iZiI6MTYxNDg0ODA2MSwiaXNzIjoiZGlkOmV0aHI6MHg2OWZiMzYyYjhiY2M3MzcxNDA3MjE2OWUzYmZmYjU0YTNiZjBmZTFjIn0.udZEvJDZoXg3upALyt8WSx_26DYf-MNzZt_RiSTvStZQvea550D_dPKFepagrRsPSEdT3EoOnx4walfisbQTuQ'
  }
}
  1. create SDR:
$veramo sdr create
? Issuer DID did:ethr:0x69fb362b8bcc73714072169e3bffb54a3bf0fe1c
? Subject DID
? Tag (threadId)
? Claim type name
? Reason We need this to comply with local law
? Is essential Yes
? Add accepted issuer? Yes
? Issuer DID did:ethr:0x69fb362b8bcc73714072169e3bffb54a3bf0fe1c
? URL https://uport.me
? Add another accepted issuer? No
? Add another claim? No
? Add profile credentials? No
? Send No
{
  claims: [
    {
      issuers: [
        {
          did: 'did:ethr:0x69fb362b8bcc73714072169e3bffb54a3bf0fe1c',
          url: 'https://uport.me'
        }
      ],
      essential: true,
      claimType: 'name',
      reason: 'We need this to comply with local law'
    }
  ],
  credentials: []
}
jwt: eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NkstUiJ9.eyJpYXQiOjE2MTQ4NDgxMzgsInR5cGUiOiJzZHIiLCJjbGFpbXMiOlt7Imlzc3VlcnMiOlt7ImRpZCI6ImRpZDpldGhyOjB4NjlmYjM2MmI4YmNjNzM3MTQwNzIxNjllM2JmZmI1NGEzYmYwZmUxYyIsInVybCI6Imh0dHBzOi8vdXBvcnQubWUifV0sImVzc2VudGlhbCI6dHJ1ZSwiY2xhaW1UeXBlIjoibmFtZSIsInJlYXNvbiI6IldlIG5lZWQgdGhpcyB0byBjb21wbHkgd2l0aCBsb2NhbCBsYXcifV0sImNyZWRlbnRpYWxzIjpbXSwiaXNzIjoiZGlkOmV0aHI6MHg2OWZiMzYyYjhiY2M3MzcxNDA3MjE2OWUzYmZmYjU0YTNiZjBmZTFjIn0.OoesYc1nZGB5LN6CWDXgfta6Er3_4oIjDZuqYc6fFtKCsmwLro85g-mejoGX2GKt2zNXJEWTTEQlPqzHKesoLgE
  1. Create SDR response:
$veramo sdr respond
? Selective disclosure request less than a minute did:ethr..fe1c asking to share: name
? name (essential)We need this to comply with local law: Alice (VerifiableCredential,Profile) issued by: did:ethr:0x69fb362b8bcc73714072169e3bffb54a3bf0fe1c 2 minutes ago
(node:4437) UnhandledPromiseRejectionWarning: Error: [veramo:data-store:identifier-store] Get requires did or (alias and provider)
    at DIDStore.<anonymous> (/usr/local/lib/node_modules/@veramo/cli/node_modules/@veramo/data-store/build/identifier/did-store.js:38:23)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/@veramo/cli/node_modules/@veramo/data-store/build/identifier/did-store.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/@veramo/cli/node_modules/@veramo/data-store/build/identifier/did-store.js:4:12)
    at DIDStore.get (/usr/local/lib/node_modules/@veramo/cli/node_modules/@veramo/data-store/build/identifier/did-store.js:29:16)
    at DIDManager.<anonymous> (/usr/local/lib/node_modules/@veramo/cli/node_modules/@veramo/did-manager/build/id-manager.js:61:31)
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/@veramo/cli/node_modules/@veramo/did-manager/build/id-manager.js:8:71
    at new Promise (<anonymous>)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:4437) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:4437) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Observed behaviour
Throws error in during SDR response creation.

Expected behaviour
Veramo CLI should produce a signed Json object with the requested claims.

Versions (please complete the following information):

  • Veramo: 1.1
  • Node Version: 14.9.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants