Configuring the Registry
This article explains how the registry work and how you can change the registry used by your instance of the Credential Verification Service (CVS).
1. Understand the role of the registry
My Data Activation implements its registry as a smart contract running on an instance of a Partisia Platform.
The registry in My Data Activation serves as a system for mapping identifiers to cryptographic public keys. For example, the identifier of a credential-issuing institution, such as a university, is linked to the public key it uses to sign the credentials it provides.
The registry in My Data Activation serves as a system for mapping identifiers to cryptographic public keys. For instance, the identifier of a credential-issuing institution, such as University X, is linked to the public key it uses to sign the credentials it issues. When the CVS validates a presentation containing a credential issued by University X, it retrieves the public key associated with University X’s identifier from the registry and uses this key to verify the credential’s signature.
2. Use the Partisia testnet for testing
The server.json
configuration file used in the installation guide for the CVS is
set to use Partisia Blockchain's testnet as a convenient way to test the CVS installation.
This testnet, operated by the Partisia Foundation, provides a practical environment
for
understanding how My Data Activation functions prior to deploying the service in a production setting.
3. Prepare for production
However, before going live with your CVS you need to use a production ready deployment of Partisia Platform's blockchain and integrate it to your CVS. One option would be to use Partisia Blockchain's mainnet.
Another alternative would be to deploy your own instance of the Partisia Platform. For more information on Partisia Platform deployments, and how to setup and run your own see the guide here.
4. Update your CVS' configuration file
To integrate your CVS instance with your private Partisia Platform deployment update your server.json
configuration
file. Provide the url of your deployment in the baseUrl
field and the address of your registry contract in the
registry
field:
{
"port": 8081,
"baseUrl": "http://docker:8081",
"registryConfig": {
"baseUrl": "https://node1.testnet.partisiablockchain.com",
"shards": 3,
"addresses": {
"registry": "027f3a703fe38cf0525ceaaa3815ffb4140efd8d9a"
}
},
"stateConfig": {
"..."
},
"claimsConfig": {
"..."
}
}
registryConfig
Configures which blockchain registry should be usedbaseUrl
The url of a node in the blockchain?shards
Number of shards in the blockchainaddresses
Contract addresses used by the systemregistry
Registry of public keys
5. Restart your CVS instance using Docker
After updating your server.json
file you must update your CVS instance.
To do this, stop any docker container using your specified port
and run the following command:
docker run -d -p 8000:8081 -v PATH_TO_YOUR_SERVER.JSON:/conf/server.json registry.gitlab.com/secata/platform/did/did-verifier-backend:latest
6. Verify your new configuration
The only way to test the registry is to successfully verify a credential, which requires a credentials issuer and a wallet.