Configuration Overview
All configuration is loaded throughapplication.properties, which maps environment variables to Spring Boot properties using the ${VAR_NAME} syntax. Variables are organized by functional area.
Required Variables
App and Server Configuration
Logical name of the application displayed in logs and Spring context.
HTTP port where Spring Boot will listen for incoming requests.
Maximum session inactivity timeout. Accepts duration format (e.g.,
30m, 1h).Database Configuration
Complete JDBC connection string for MySQL database.Format:
jdbc:mysql://<HOST>:<PORT>/<DATABASE_NAME>?<PARAMETERS>Example: jdbc:mysql://localhost:3306/ccdigital?useSSL=false&serverTimezone=UTCDatabase user with full permissions on the application database.
Password for the database user.
Hibernate schema management strategy.Options:
none: No schema management (production)validate: Validate schema matches entitiesupdate: Update schema automatically (development only)create: Drop and recreate schema (testing only)
Enable SQL query logging. Set to
false in production for performance.Pretty-print SQL queries in logs. Set to
false in production.File Storage Configuration
Absolute directory path where document files are stored.This directory must:
- Exist and be writable by the application process
- Have sufficient disk space for document storage
- Be backed up regularly
ccdigital.fs.base-pathapp.user-files-base-dir
/home/ccdigital/CCDigitalBlock/storageOptional legacy base directory for migrated files. Used for backward compatibility.
ACA-Py / Indy Configuration
ACA-Py (Aries Cloud Agent Python) is used for Hyperledger Indy credential verification during user authentication.
Admin API endpoint of the ACA-Py verifier agent.Example:
http://localhost:8021Admin API endpoint of the ACA-Py holder agent.Example:
http://localhost:8031Credential definition ID used for proof verification.Example:
WgWxqztrNooG92RXvxSTWv:3:CL:20:tagPolling interval in milliseconds when waiting for proof presentation completion.
Maximum timeout in milliseconds for proof presentation.
Issuer agent admin URL. Defaults to
ACAPY_VERIFIER_ADMIN_URL if not set.Holder agent admin URL for administrative operations. Defaults to
ACAPY_HOLDER_ADMIN_URL if not set.Connection ID for holder agent. Use
auto to automatically find active connection by label.Label used to identify the holder connection when
INDY_HOLDER_CONNECTION_ID is set to auto.Credential definition ID for Indy operations. Defaults to
ACAPY_CRED_DEF_ID if not set.API key for securing admin API endpoints (if ACA-Py is configured with API key protection).
Enable synchronization of user access state to ACA-Py connection metadata.
API path template for updating connection metadata.
{conn_id} is replaced with actual connection ID.Hyperledger Fabric Configuration
Fabric is used for document audit trail and access event logging on distributed ledger.
Working directory containing Fabric client scripts and configuration.Example:
/home/ccdigital/fabric-clientPath to Node.js binary used to execute Fabric client scripts.Example:
/usr/bin/node or /home/ccdigital/.nvm/versions/node/v18.16.0/bin/nodeNode.js script that lists documents for a person from the Fabric ledger.Example:
list-docs.jsScript that reads block details by reference from Fabric ledger.Example:
read-block-by-ref.jsScript that records access events (verification/consultation) to the ledger.Example:
record-access-event.jsScript that lists audit events from the ledger (by person or globally).Example:
list-access-events.jsScript for bulk synchronization of database documents to Fabric ledger.Example:
sync-db-to-ledger.jsScript for synchronizing a specific person’s documents to Fabric ledger.Example:
sync-person-to-ledger.jsIndy Tools Configuration
Working directory containing Python scripts for credential issuance.Example:
/home/ccdigital/indy-toolsCommand to activate Python virtual environment before running Indy scripts.Example:
source /home/ccdigital/indy-tools/venv/bin/activateMain Python script for credential issuance from database.Example:
issue_credentials_from_db.pyGlobal timeout for external script execution (Fabric and Indy scripts).
Mail Configuration
SMTP configuration is required for OTP delivery, email verification, and password recovery.
SMTP server hostname.Examples:
- Gmail:
smtp.gmail.com - Office365:
smtp.office365.com
SMTP server port.Common ports:
587: STARTTLS (recommended)465: SSL/TLS25: Unencrypted (not recommended)
SMTP authentication username (usually the email address).
SMTP authentication password or app-specific password.
Enable SMTP authentication.
Enable STARTTLS encryption.
Require STARTTLS encryption (fail if not available).
Sender email address for password recovery emails.Example:
[email protected]Test SMTP connection on application startup. Useful for early detection of mail configuration issues.
Security Configuration (Optional)
Enforce HTTPS-only access. Enable in production behind reverse proxy.
Secret key for signing document access URLs. Generate a strong random string.
Time-to-live for signed URLs in seconds.
Enable rate limiting on sensitive endpoints.
Time window for rate limiting in seconds.
Maximum requests allowed per time window.
Login OTP Configuration (Optional)
Length of OTP codes for login second factor.
Time-to-live for login OTP codes in minutes.
Maximum OTP verification attempts before lockout.
Cooldown period between OTP resend requests.
Sender email address for login OTP emails.
Registration Email OTP Configuration (Optional)
Length of OTP codes for email verification during registration.
Time-to-live for registration OTP codes in minutes.
Maximum verification attempts during registration.
Cooldown period between registration OTP resend requests.
Sender email address for registration verification emails.
Password Recovery Configuration (Optional)
Length of password recovery codes.
Time-to-live for password recovery codes in minutes.
Maximum password recovery verification attempts.
Cooldown period between password recovery code resend requests.
TOTP (Authenticator App) Configuration (Optional)
Issuer identifier for TOTP tokens (displayed in authenticator apps).
Human-readable issuer name for TOTP.
Number of digits in TOTP codes (typically 6).
Alias for TOTP_DIGITS.
TOTP code refresh period in seconds (typically 30).
Number of time steps to check for TOTP validation (allows clock drift).
Size of TOTP secret in bytes.
Environment Template
Use this template to create your environment configuration file:Loading Environment Variables
Option 1: Environment File
Create an environment file (e.g.,ccdigital.env) and source it before starting:
Option 2: Systemd Service
For systemd services, useEnvironmentFile directive:
Option 3: Docker
Pass environment variables using--env-file flag:
Validation
Verify your configuration by checking application logs during startup:Verify File Storage Path
Ensure the base path exists and is writable. Check for
FileStorageService initialization logs.Test Mail Configuration
If
MAIL_TEST_CONNECTION=true, the application will test SMTP connection on startup.