acapy: Unable to create anoncreds schema on issuer configured with a qualified did:sov public did

Given I have an issuer agent deployed with acapy 1.2.0 with wallet-type askar-anoncreds

Given I provision on that agent a fully qualified did:sov such as

    {
      "did": "did:sov:AecTm5kThinYH3oXj4d9xd",
      "verkey": "6G1RLkBLvbzrCdYTnFjESR9yV7pVP7Dqx6e81fBpNsn5",
      "posture": "posted",
      "key_type": "ed25519",
      "method": "sov",
      "metadata": {
        "posted": true
      }
    }

Given I assign that DID as public for the issuer agent

When I try to create an anoncreds schema (POST /anoncreds/schema with following body)

{
  "options": {
    "create_transaction_for_endorser": true,
    "endorser_connection_id": "a30f8546-72e4-419d-ae77-1541287ced9b"
  },
  "schema": {
    "attrNames": [
      "auth_key",
      "email"
    ],
    "issuerId": "did:sov:AecTm5kThinYH3oXj4d9xd",
    "name": "test fqdid",
    "version": "1.0"
  }
}

Then I get error :

400: Error creating schema. Failed to register schema. Exception when building get-schema request. Validation error: SchemaId validation failed: “did:sov:AecTm5kThinYH3oXj4d9xd:2:test fqdid:1.0”, doesn’t match pattern.

Then Schema is not created in agent’s wallet and not published on blockchain.

Expected result : schema is created and published to configured blockchain.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 23 (23 by maintainers)

Most upvoted comments

It’s presumably the indy_vdr library that expects schema_id to be prefixed without did:sov