WebOfTrust / vLEI

Public Open Specifications for GLEIF vLEI (verifiable Legal Entity Identifiers)
Apache License 2.0
28 stars 12 forks source link

We need an ECR credential schema that can be issued by a Legal Entity #73

Open rc-provenant opened 1 year ago

rc-provenant commented 1 year ago

There is only one ACDC schema in the vLEI repo for issuing an ECR credential: "legal-entity-engagement-context-role-vLEI-credential.json" with a SAID of "EEy9PkikFcANV1l7EHukCeXqrzT1hNZjGlUk7wuMO5jw"; it assumes that the ECR vLEI will be issued by a QVI and the Legal Entity has issued the QVI an ECR AUTH. The 'auth' property is required in the edges block.

We need a version of the schema that can be used when a Legal Entity wants to issue the ECR vLEI itself and no ECR AUTH is required.

m00sey commented 1 year ago

The edges object does not require anything:

image

What it does say is it needs to contain one of:

The auth value in the required array here: https://github.com/WebOfTrust/vLEI/blob/3ce1dea84820d820a3de5c428c4e9e2ed296a225/schema/acdc/legal-entity-engagement-context-role-vLEI-credential.json#L130-L134

is for the object contained within the e object. Likewise with the le object. If the e object contains and object vs a string, then that object must either have a property named auth or le

So something like:

  "e": {
    "d": "EBDmgKOAEwnMGsofWg2m0l63J1awfJafqJyCzTnVkdSw",
    "auth": {
      "n": "Et2DOOu4ivLsjpv89vgv6auPntSLx4CvOhGUxMhxPS24",
      "s": "EH6ekLjSr8V32WyFbGe1zXjTzFs9PkTYmupJ9H65O14g",
      "o": "I2I"
    }
  },

is valid.

or

  "e": {
    "d": "EBDmgKOAEwnMGsofWg2m0l63J1awfJafqJyCzTnVkdSw",
    "le": {
      "n": "Et2DOOu4ivLsjpv89vgv6auPntSLx4CvOhGUxMhxPS24",
      "s": "ENPXp1vQzRF6JwIuS-mp2U8Uf1MoADoP_GqQ62VsDZWY"
    }
  },

is valid.

I've added tests for each of the valid formats here: https://github.com/WebOfTrust/vLEI/pull/74/files