description |
---|
Understanding cheqd's API product offering, cheqd Studio |
cheqd Studio is a set of guides, tutorials and APIs to help users establish an end-to-end trusted ecosystem for digital credentials.
Using REST APIs, customers can build cheqd's trust infrastructure into existing applications. All of cheqd’s existing open-source libraries remain available, and cheqd Studio does not necessitate developers to switch their SSI stack in their entirety, but allows them to build into their existing tooling, for example alongside APIs such as the Universal Resolver.
Set up your account | Begin your cheqd Studio set up, creating your account, creating an API key and authenticating with our APIs. | set-up-account.md |
Advanced config options | Run cheqd Studio yourself or utilise your own external database. | advanced.md |
cheqd Studio directly leverages our Veramo SDK Plugin, making a wide array of features available from launch, including:
DIDs and Identity Keys | Create did:cheqd DIDs for credential issuers and for DID-Linked Resources | create-did.md |
Trust Registries | Create an end-to-end trusted ecosystem, using Trust Chains to build a full Trust Registry. | trust-registries |
Payments | Create commercial models for verifiable credentials, such as verifier-pays-issuer | payments |
Status Lists | Create status lists, including Status List v2021 and Token Status List | status-lists |
Credentials | Issue any type of credential, including SD-JWT, VCDM and AnonCreds via our partners, including trust registries, status lists and payments. | credentials |
Resources | Create custom resources for policies, presentation definitions, schemas and visual representations of credentials | did-linked-resources |
With cheqd Studio, there are multiple ways it can be deployed and hosted to support clients with different requirements.
This mode is the most simple for users, allowing cheqd to custody both Cosmos AND Identity keys in Veramo KMS. This means that manages both ledger-writes and signing identity transactions on behalf of the customer.
To ensure this is highly secure, we have deployed an instance of a Veramo Key Management Store (KMS) which uses a Postgress DB (TypeOrm) to store Cosmos AND identity keys in one encrypted table, so it cannot be read in plaintext. This design allows us to segment different customers' keys securely and efficiently.
We use similar techniques to Password Managers such as 1Password and Bitwarden to ensure that even if the database were to be compromised, the keys would remain encrypted and unusable.
Within Custodian mode, we also enable clients to toggle
External Database
Clients are able to choose whether to use our default database for storing keys or utilise their own database.
By default, ENABLE_EXTERNAL_DB
is set to off/false
. To enable external Veramo KMS database, set ENABLE_EXTERNAL_DB
to true
, then define below environment variables in .env
file:
EXTERNAL_DB_CONNECTION_URL
: PostgreSQL database connection URL, e.g.postgres://<user>:<password>@<host>:<port>/<database>
.EXTERNAL_DB_ENCRYPTION_KEY
: Secret key used to encrypt the Veramo key-specific database tables. This adds a layer of protection by not storing the database in plaintext.EXTERNAL_DB_CERTIFICATE
: Custom CA certificate required to connect to the database (optional).
API Authentication using LogTo
By default, the application has API authentication disabled (which can be changed in configuration). If, however, you'd like to run the app with API authentication features, the following variables need to be configured.
We use a self-hosted version of LogTo, which supports OpenID Connect. Theoretically, these values could also be replaced with LogTo Cloud or any other OpenID Connect identity provider.
By default, ENABLE_AUTHENTICATION
is set to off/false
. To enable external Veramo KMS database, set ENABLE_AUTHENTICATION
to true
, then define below environment variables in .env
file:
- Endpoints
LOGTO_ENDPOINT
: API endpoint for LogTo serverLOGTO_DEFAULT_RESOURCE_URL
: Root of API resources in this application to be guarded. (Default:http://localhost:3000/api
on localhost.)LOGTO_MANAGEMENT_API
: URL of management API for LogTo (default ishttps://default.logto.app/api
)CORS_ALLOWED_ORIGINS
: CORS allowed origins used in the app
- User-facing APIs
LOGTO_APP_ID
: Application ID for the Credential Service application in LogTo. This can be set up as type "Traditional Web"LOGTO_APP_SECRET
: Application secret associated with App ID above.
- Machine-to-machine backend APIs
LOGTO_M2M_APP_ID
: Application ID for machine-to-machine application in LogTo. This is used for elevated management APIs within LogTo.LOGTO_M2M_APP_SECRET
: Application secret
- Default role update using LogTo webhooks: LogTo supports webhooks to fire of requests to an API when it detects certain actions/changes. If you want to automatically assign a role to users, a webhook is recommended to be setup for firing off whenever there's a new account created, or a new sign-in.
LOGTO_DEFAULT_ROLE_ID
: LogTo Role ID for the default role to put new users into.LOGTO_WEBHOOK_SECRET
: Webhook secret to authenticate incoming webhook requests from LogTo.
- Miscellaneous
DEFAULT_CUSTOMER_ID
: Customer/user in LogTo to use for unauthenticated usersCOOKIE_SECRET
: Secret for cookie encryption.
Client-managed mode gives the cheqd Studio user the ability to utilise their own identity keys for signing identity transactions, while still allowing cheqd Studio to manage the CHEQ account keys for writing to the cheqd network. This mode is intended to be used for more production environments where the user signs each identity transaction independently, affording a greater level of security and control to the client.
{% hint style="info" %} Full client-managed mode is still in development and we will update this documentation as and when it becomes available {% endhint %}
Under the hood, cheqd Studio leverages our Veramo SDK Plugin for its identity functionality. Check out our guide on supported SDKs to understand how cheqd Studio fits together with our other Open Source packages.
Below are a list of alternatives for integrating with cheqd. Each offers a different set of protocols and underlying technical capabilities.
Veramo | The Veramo SDK Plugin supports JSON, JSON-LD credentials as well as cheqd Credential Payments in an SDK. | veramo-plugin |
Credo | Credo is an SDK which supports the European Architecture and Reference Framework (ARF) standards as well as AnonCreds with full cheqd support for DIDs. | credo.md |
Walt.id Community Stack | Walt.id Community Stack is an SDK that supports the European Architecture and Reference Framework (ARF) standards for identity, with full cheqd support. | ssi-kit.md |