Documentation on claim definition


#1

Is there a documentation onwhat is being stored in a claim definition and how it is related to a particular schema?

My understanding is that claim definitions contain the keys to verify and revoke claims that are issued by a particular issuer?

The claim definition on the ledger can be used to verify the authenticity of the claims and check to see if they have they have been revoked.

Furthermore looking at the Sovrin code does the following code accomplishes the creation of claim definition on the ledger?

schema_id = run_async(
            bank_agent.publish_schema('basic',
                                      schema_name='Bank Membership',
                                      schema_version='1.0'))

        issuer_pub_key, revocation_pub_key = run_async(
            bank_agent.publish_issuer_keys(schema_id,
                                           p_prime=primes["prime1"][0],
                                           q_prime=primes["prime1"][1]))
        print(issuer_pub_key)

#2

The claim definition contains three things:

  • the DID of the issuer of the claims using this claim definition.
  • the sequence number on the ledger of the schema that will be used for the claims to be issued
  • a link (not certain of the details here - still to be implemented) to a revocation registry for the claims to be issued

Using the DID of the issuer, you can get from the ledger the Public Key and endpoints to contact the Claim Issuer.

Using the schema_seq_no (schema_id in your code example above), you can find the details of the schema. There is a move to allow the use of the “schema_key” in place of the schema_seq_no. The schema key is the name/version/DID_of_Schema_Creator triplet that resolves to a particular schema_seq_no. Note that Schema Creator DID may be the same as the DID in the Claim Definition - if the same entity defined and is using the schema, but could be different if it is a commonly used schema (e.g. one from an industry association). As an aside - it is a goal of Sovrin to incentivize the organic use of shared schema as a way to put de facto standards in place vs. waiting on standards bodies to formalize schema definitions.

Using the revocation information, you can check to see if a claim that you (as a verifier) are given during the verification process has been revoked. There is crypto magic in that process so you can check to see if the claim you are verifying is in the list without being able to see what other claims have been revoked. I’ll leave it for others to go down that rabbit hole.

Hope that helps.