This guide explains how to manage (add, update, view, and delete) credential configurations in the Inji Certify service. These configurations tell Inji Certify how to issue different types of Verifiable Credentials using various formats and settings.
A credential configuration defines the rules and details for issuing a specific type of digital credential. For example, it specifies the format, signing method, and any templates or types needed for the credential.
Before Inji Certify can issue a new type of credential, you need to define its configuration using the API endpoints described below. Additionally, this configuration will be used in openid-credential-issuer metadata to help clients understand how to interact with the credential issuer. This is crucial for ensuring that the credentials are issued correctly and can be verified by other systems.
You can use these endpoints to manage your credential configurations:
-
Add a New Configuration
- POST
/credential-configurations - Use this to create a new credential configuration.
- You must provide all required details in the request body.
- POST
-
Get a Configuration by ID
- GET
/credential-configurations/{credentialConfigKeyId} - Use this to view the details of a specific configuration.
- GET
-
Update an Existing Configuration
- PUT
/credential-configurations/{credentialConfigKeyId} - Use this to change the details of an existing configuration.
- PUT
-
Delete a Configuration
- DELETE
/credential-configurations/{credentialConfigKeyId} - Use this to remove a configuration you no longer need.
- DELETE
When adding or updating a configuration, you need to send a JSON object with details related to the credential format you are configuring. The required fields depend on the credential format (e.g., ldp_vc, mso_mdoc, dc+sd-jwt). For more details regarding the API fields and examples, refer to the Inji Certify API docs.
The Inji Certify uses several configuration properties to control how credential configurations work. These are typically set in your application.properties or application.yml file.
| Property Name | Description | Example Value |
|---|---|---|
mosip.certify.data-provider-plugin.credential-status.allowed-status-purposes |
List of supported credential status purposes. Default value 'revocation'. | ["suspension", "revocation"] |
mosip.certify.credential-config.cryptographic-binding-methods-supported |
Supported cryptographic binding methods per credential format. | { 'ldp_vc': {'did:jwk','did:key'}, 'mso_mdoc': {'cose_key'},'dc+sd-jwt': {'did:jwk','did:key'} } |
mosip.certify.credential-config.credential-signing-alg-values-supported |
Supported signing algorithms per crypto suite, used to validate the signatureAlgo of an ldp_vc configuration. |
{ 'RsaSignature2018': {'RS256'}, 'Ed25519Signature2018': {'EdDSA'}, 'Ed25519Signature2020': {'EdDSA'}, 'EcdsaKoblitzSignature2016': {'ES256K'}, 'EcdsaSecp256k1Signature2019': {'ES256K'}, 'EcdsaSecp256r1Signature2019': {'ES256'}, 'ecdsa-rdfc-2019': {'ES256'}, 'ecdsa-jcs-2019': {'ES256'}} |
mosip.certify.credential-config.proof-types-supported |
Supported proof types for credentials. | {'jwt': {'proof_signing_alg_values_supported': {'RS256', 'PS256', 'ES256', 'EdDSA'}}} |
mosip.certify.signature-algo.key-alias-mapper |
Maps signature algorithms to list of key-aliases in key_alias table. | {'EdDSA': {{'CERTIFY_VC_SIGN_ED25519', ''}, {'CERTIFY_VC_SIGN_ED25519', 'ED25519_SIGN'}} |
Note :
In case of VCIssuance plugin mode, ldp_vc and mso_mdoc formats are supported by credential-configurations endpoints.
In case of DataProviderPlugin mode, ldp_vc and dc+sd-jwt formats are supported by credential-configurations endpoints.
Inji Certify checks your configuration for required fields and possible duplicates:
-
Required fields depend on the credential format.
-
No duplicate configurations: You cannot add two configurations with the same key details. For example,
- for
ldp_vcformat, combination of context & type should be unique. - for
mso_mdocformat, docType value should be unique. - for
dc+sd-jwtformat, sdJwtVct value should be unique.
- for
-
Validation for
signatureCryptoSuite,signatureAlgo,keyManagerAppId,keyManagerRefId.- In DataProvider plugin mode,
signatureAlgois mandatory for every credential format, on Add and on Update. It is the algorithm the credential is signed with, and nothing is filled in for it from the properties: a request that leaves it out is rejected with the format's mandatory-fields code,ldp_vc_mandatory_fields_missing,mso_mdoc_mandatory_fields_missingordc_sd_jwt_mandatory_fields_missing. - In VCIssuance plugin mode the plugin signs the credential, so
signatureAlgois optional. A value that is sent is validated as below, in both modes. Anmso_mdocordc+sd-jwtconfiguration withoutsignatureAlgoleavescredential_signing_alg_values_supportedout of the credential issuer metadata; anldp_vcone still advertises its crypto suite. ldp_vc:signatureCryptoSuiteis mandatory and must be declared inmosip.certify.credential-config.credential-signing-alg-values-supported(unsupported_crypto_suiteotherwise), andsignatureAlgomust be one of the algorithms declared for that suite (unsupported_signature_algootherwise).mso_mdoc: an mdoc's issuerAuth is signed withsignatureAlgoalone, sosignatureCryptoSuiteis optional. If one is sent, its value is not validated, and it is not stored. The deployment must hold a signing key forsignatureAlgoinmosip.certify.signature-algo.key-alias-mapper(key_chooser_config_not_foundotherwise), and it must beES256, the only algorithm supported for an mdoc's issuerAuth.EdDSA,RS256andES256Kare rejected withunsupported_credential_signing_alg.dc+sd-jwt: the deployment must hold a signing key forsignatureAlgoinmosip.certify.signature-algo.key-alias-mapper(key_chooser_config_not_foundotherwise).keyManagerAppIdandkeyManagerRefIdmust refer to the correct keys defined inmosip.certify.signature-algo.key-alias-mapper.
- In DataProvider plugin mode,
-
signatureAlgoandsignatureCryptoSuiteby format and plugin mode.Format Plugin mode signatureAlgosignatureCryptoSuitecredential_signing_alg_values_supportedldp_vcDataProvider Required Required The suite, e.g. ["Ed25519Signature2020"]ldp_vcVCIssuance Not required, validated if sent Required The suite, e.g. ["Ed25519Signature2020"]mso_mdocDataProvider Required Not required, ignored and not stored COSE number of the algorithm, e.g. [-7]forES256mso_mdocVCIssuance Not required, validated if sent Not required, ignored and not stored COSE number if set, e.g. [-7]. Omitted if null.dc+sd-jwtDataProvider Required Must not be sent (the request is rejected) The algorithm, e.g. ["ES256"]dc+sd-jwtVCIssuance Not required, validated if sent Must not be sent The algorithm if set. Omitted if null. The plugin mode comes from
mosip.certify.plugin-mode, not from the request. -
What the credential issuer metadata advertises in
credential_signing_alg_values_supported.- It is derived from the credential configuration; the Add and Update requests no longer take a
credentialSigningAlgValuesSupportedlist, and a request that still sends it is rejected withinvalid_requestas an unrecognised field, storing nothing. Each configuration advertises the one value it is signed with, so what is advertised can never differ from how the credential is signed. ldp_vcadvertises itssignatureCryptoSuite, for exampleEd25519Signature2020oreddsa-rdfc-2022, as OpenID4VCI 1.0 Appendix A.1.2.2 requires (#1110). A JWS algorithm such asEdDSAstands for more than one suite, so a wallet could not act on it.dc+sd-jwtadvertises itssignatureAlgo, for exampleES256, andmso_mdocadvertises the COSE identifier of itssignatureAlgo,-7forES256.- Nothing is resolved from the properties for it, in the issuer metadata or the Get response. Existing configurations advertise their own signing algorithm (or crypto suite for
ldp_vc) without being re-submitted.
- It is derived from the credential configuration; the Add and Update requests no longer take a
-
Per-configuration selection of
cryptographicBindingMethodsSupportedandproofTypesSupported.- Both are mandatory in the Add and Update Credential Configuration requests, and are always returned by the Get response. A request that leaves one out, sends it as
nullor sends it empty is rejected withinvalid_request, naming the attribute. - The configuration properties above are the allow-list, and only the allow-list. A request can select from or narrow what the deployment declares; it can never exceed it, and nothing is filled in from the properties when a value is missing.
cryptographicBindingMethodsSupportedis validated against the methods declared for the credential format inmosip.certify.credential-config.cryptographic-binding-methods-supported.proofTypesSupportedis validated againstmosip.certify.credential-config.proof-types-supported. Each proof type must be declared there and must carry a non-emptyproof_signing_alg_values_supported, which must be a subset of the algorithms declared for that proof type.proof_signing_alg_values_supportedis the only recognised attribute within a proof type entry. A proof type sent asnull, withoutproof_signing_alg_values_supported, or with an empty list is rejected withinvalid_request.- A deployment may declare a proof type with no proof signing algorithms. It still starts and serves requests; only a request naming that proof type is rejected.
- On Update both are sent again and replace what is stored. Any valid selection may be changed to any other valid selection.
- If several values across the attributes and the signing algorithm are invalid, all of them are reported together so the payload can be corrected in a single pass.
- A value listed more than once, in either attribute or in a proof type's
proof_signing_alg_values_supported, is stored once, in the order first given. The request is not rejected for it; for example,["did:jwk", "did:jwk"]is stored as["did:jwk"]. - Whatever is stored against a credential configuration is what the Get response returns and the credential issuer metadata advertises for it.
- Configurations created before these attributes were stored need not be re-submitted. Where nothing is stored for the binding methods or proof types, the Get response and the issuer metadata keep resolving them from the properties as before.
- Upgrading existing automation: every Update request must now send both attributes, and
signatureAlgoin DataProvider plugin mode, even one that only changes an unrelated field such as the display name. A script or client that omits any of them receives an error.credentialSigningAlgValuesSupportedmust be removed from every request body. - An empty
cryptographicBindingMethodsSupportedorproofTypesSupportedis rejected for now.
- Both are mandatory in the Add and Update Credential Configuration requests, and are always returned by the Get response. A request that leaves one out, sends it as
-
Purpose of
didUrlincredential_config:didUrlincredential_configcan be different from the issuer did url specified by the propertymosip.certify.data-provider-plugin.did-url.- It is used to point to temporary
didUrlwhich is specific to a VC type. The did document fetched from the./well-known/did.jsonendpoint can be copied and hosted on the credentialConfig didUrl. - Example:
mosip.certify.data-provider-plugin.did-url=did:mosip:12345 credential_config.didUrl=did:mosip:12345:driver_license- In this case, the did document for
did:mosip:12345:driver_licensecan be copied fromdid:mosip:12345and hosted on this url.
If you miss a required field or try to add a duplicate, Certify will return an error.