Skip to main content
Version: Next

Configuration

In this section, the configuration of the wallet is explained. Configuration is used based on a config.yaml file which should be placed in the apps/backend folder. This config.yaml file is loaded when booting the application. The values get type checked, and it gives a clear error message if there is a configuration field missing or provided incorrectly. Next to the config.yaml file, you can also set environment variables. These override the values that are listed in the config.yaml file.

Databases

By default, the development database is sqlite. We use postgres databases for production type instances of the wallets.

Authentication

Authentication for frontend services can be done via OAuth. This helps users who need to login to several components to authenticate themselves faster. The wallet is tested against the SSO Bridge, with an Helm chart provided alongside the Helm chart of the wallet, but other OAuth services should be usable (e.g. Keycloak, or hosted OAuth services).

DID Method

Two DID methods are currently supported: did:web and did:tdw. A comparison between the two is given below. The decision of which configuration to select should be made based on the specific use case of the wallet.

did:webdid:tdwdid:key
TSG Configuration value:did:web:did:tdw:- (DID Key is only supported for DID resolution but not for creation)
Specification link:W3C internal documentBCGov specification draftW3C internal document
Supported version:Unofficial draftDraft v1Unofficial draft v0.7
Underlying technology:Web-based DID method that serves the DID Document as a JSON under a certain endpoint (.well-known path) of a web domain that is accessible by the public.Web-based DID method that utilizes a public JSON Lines file hosted under a web domain to store each change (create, update, delete) that occurs on a DID Document. The DID Document is then resolved by fetching and processing the JSON Lines file.Multibase Multicodec public key, with generated DID document
Identifier format:did:web:{{public web domain}}
e.g. did:web:example.com
did:tdw:{{public web domain}}:{{generated self-certifying identifier}}
e.g. did:tdw:example.com:b7ep277b2mvxdpcrbja3iergubfy
did:key:{{ Public key }}
Advantages:Straightforward implementation with no additional processing other than hosting DID Document on web server.Additional security and validation mechanisms contained in the JSON Lines file that increases trustworthiness of DID Document.No server implementation required, so very suitable for mobile wallets
Disadvantages:Easily compromisable without notice by resolving parties when malicious access is gained to the web server.DID Document is not directly available as extra processing to verify signatures and validate entry hashes retrieved from the JSON Lines file needs to be performed to resolve the DID Document.DID document only contains the verification method, so additional properties like service are not supported

Possible configuration parameters

KeyRequiredTypeDescriptionDefault
DatabaseConfig
dbYesDatabaseConfigDatabase configuration
db.typeYes"sqlite" | "postgres"Type of database
db.databaseYesStringName of the database
db.synchronizeBooleanSynchronize database schema
db{type=sqlite}YesSQLiteConfigDatabase configuration
db{type=sqlite}.type"sqlite" | "postgres"Type of database"sqlite"
db{type=sqlite}.databaseYesStringName of the database
db{type=sqlite}.synchronizeBooleanSynchronize database schema
db{type=postgres}YesPostgresConfigDatabase configuration
db{type=postgres}.hostYesStringHost of the database
db{type=postgres}.portYesNumberPort of the database
db{type=postgres}.usernameYesStringUsername of the database
db{type=postgres}.passwordYesStringPassword of the database
db{type=postgres}.sslUnknownSSL configuration of the database
db{type=postgres}.type"sqlite" | "postgres"Type of database"postgres"
db{type=postgres}.databaseYesStringName of the database
db{type=postgres}.synchronizeBooleanSynchronize database schema
ServerConfig
serverServerConfigServer configuration
server.listenStringIP address the server listens on"0.0.0.0"
server.portNumberPort the server listens on3000
server.publicDomainStringPublic domain of the server"localhost"
server.publicAddressStringPublic address of the server"http://localhost:3000"
server.subPathStringSub path of the server
AuthConfig
authYesAuthConfigManagement authentication configuration
auth.enabledBooleanEnable authenticationtrue
auth.openIdConfigurationURLStringOpenID configuration URL
auth.callbackURLURLCallback URL the auth service will redirect users
auth.redirectURLURLRedirect URL to UI after login/logout
auth.clientIdStringClient ID
auth.clientSecretStringClient secret
auth.rolePathStringJSON path to extract roles from the token"$.roles[*]"
NodemailerConfiguration
emailNodemailerConfigurationEmail configuration
email.enabledYesBooleanEnable email sending
email.smtpFromStringEmail address to send emails from
email.smtpPortNumberSMTP port465
email.smtpSecureBooleanSMTP secure connectiontrue
email.smtpServerStringSMTP server
email.smtpUserStringSMTP user
email.smtpPasswordStringSMTP password
email.titleStringTitle
InitKeyConfig
initKeysInitKeyConfig[]Initial key configurations
initKeys[].typeYes"EdDSA" | "ES384" | "X509"Type of key
initKeys[].idYesStringID of the key
initKeys[].defaultBooleanDefault key
initKeys[].existingKeyUnknownExisting PKCS#8 encoded key
initKeys[].existingCertificateUnknownExisting PEM encoded certificate
InitCredentialConfig
initCredentialsInitCredentialConfig[]Initial credential configurations
initCredentials[].contextStringJSON-LD contexts for the credential[]
initCredentials[].typeStringTypes of the verifiable credential[]
initCredentials[].idYesStringID of the credential
initCredentials[].keyIdStringID of key signing the credential
initCredentials[].revocableBooleanRevocable credentialtrue
initCredentials[].credentialSubjectYesObjectCredential subject
TrustAnchorConfig
trustAnchorsTrustAnchorConfig[]Trust anchor configurations
trustAnchors[].identifierYesStringDID of the trust anchor
trustAnchors[].credentialTypesStringCredential types trusted of the trust anchor[]
JsonLdContextConfig
contextsYesJsonLdContextConfig[]JSON-LD context configurations
contexts[].idYesStringID of the context
contexts[].credentialTypeYesStringCredential type associated with the context
contexts[].issuableYesBooleanCan be issued by this wallet
contexts[].documentUrlURLURL of the JSON-LD context
contexts[].documentObjectJSON-LD context body
contexts[].schemaObjectJSON-Schema of the JSON-LD context
IssuanceConfig
issuanceYesIssuanceConfigIssuance configuration
IssuerConfig
issuance.issuerYesIssuerConfig[]Issuer configuration
issuance.issuer[].holderIdYesStringDID of the holder
issuance.issuer[].credentialTypeYesStringCredential type to be issued
issuance.issuer[].credentialSubjectYesObjectCredential subject
issuance.issuer[].preAuthorizedCodeStringPre-authorized code
DCPHolderConfig
issuance.dcpYesDCPHolderConfig[]DCP Holder configuration
issuance.dcp[].preAuthorizedCodeYesStringPre-authorized code
issuance.dcp[].issuerIdYesStringDID identifier of the issuer
issuance.dcp[].credentialTypeYesStringCredential type to be issued
OID4VCIHolderConfig
issuance.oid4vciYesOID4VCIHolderConfig[]OID4VCI Holder configuration
issuance.oid4vci[].preAuthorizedCodeYesStringPre-authorized code
issuance.oid4vci[].issuerUrlYesURLRoot URL of the issuer
issuance.oid4vci[].credentialTypeYesStringCredential type(s) to be issued
DidServiceConfig
didServicesYesDidServiceConfig[]DID service configurations
didServices[].idYesStringID of the service
didServices[].typeYesStringType of the service
didServices[].serviceEndpointYesURLService endpoint
PresentationConfig
presentationYesPresentationConfigPresentation configuration
presentation.types"DIRECT" | "DCP" | "OID4VP"Types of presentation protocols supported["DIRECT","DCP"]
RuntimeConfig
runtimeYesRuntimeConfigRuntime configuration
runtime.gaiaXSupportBooleanEnable Gaia-X support
runtime.titleStringTitle of the wallet
runtime.acceptUnauthenticatedCredentialRequestsBooleanAccept unauthenticated credential requests
runtime.issueMobileCredentialsBooleanIssue mobile credentials
runtime.colorStringPrimary color of the wallet"#3B8BF6"
runtime.lightThemeUrlStringLight theme logo URL
runtime.darkThemeUrlStringDark theme logo URL
DidConfig
didDidConfigDID configuration
did.method"did:web:" | "did:tdw:"Provided DID method"did:web:"
did.keyFormat"JWK" | "Multikey"Provided key format"JWK"
SignatureConfig
signatureSignatureConfigSignature configuration
signature.default"DATA_INTEGRITY_PROOF" | "JSON_WEB_SIGNATURE_2020"Default signature type"DATA_INTEGRITY_PROOF"
signature.credentials"DATA_INTEGRITY_PROOF" | "JSON_WEB_SIGNATURE_2020"Signature type for credentials"DATA_INTEGRITY_PROOF"
signature.presentations"DATA_INTEGRITY_PROOF" | "JSON_WEB_SIGNATURE_2020"Signature type for presentations"DATA_INTEGRITY_PROOF"