Skip to main content
Version: 2.x (upcoming)

Backend configuration

The API service, the core backend of OpenCDMP, reads the settings below from app.env and app-<PROFILE>.env in the service's config folder (config-files/opencdmp/backend/config/app-test.env in the Docker example) or from the container's environment. The supplementary services and the plugins have their own pages.

API service​

Authentication & security​

Env VariableDescriptionRequiredDefault ValueExample
IDP_ISSUER_URIKeycloak realm URL, exactly as Keycloak writes it in the issuer (iss) of its tokens. It includes Keycloak's relative path, if any: the Docker example serves Keycloak under /auth.Yes-https://<keycloak-host>/auth/realms/<realm-name>
IDP_CLAIMS_ROLES_PATHPath of the installation-wide roles in the token's resource_access claim: the roles of the api client.Yes-api.roles
SECURITY_AUDIENCEAudience that tokens must carry, added by the api client scope.Yes-api
CORS_ALLOWED_ORIGINOrigin of the webapp (scheme, host, and port) that may call the API and open its WebSocket connection. One origin.Yes-https://opencdmp.example.org

Database configuration​

Env VariableDescriptionRequiredDefault ValueExample
DB_URLJDBC address of the opencdmp database.Yes-jdbc:postgresql://opencdmp.postgres:5432/opencdmp
DB_USERDatabase user. The user must be allowed to create and alter tables in the database, because the API service migrates the schema at startup.Yes-opencdmp
DB_PASSPassword of that user.Yes-<db-password>

The API service creates and migrates its database schema automatically at startup, recording the applied migrations in the DBMigrationHistory table. An empty database gets the full schema and the default seed data; a database of version 1.2 or later is upgraded in place. See Database migrations.

Elasticsearch configuration​

Env VariableDescriptionRequiredDefault ValueExample
ELASTIC_ENABLEDBoolean value to index plans and assets in Elasticsearch and run the listings against it.Yes-true
ELASTIC_HOSTHost and port of Elasticsearch, without the scheme.Yes¹-opencdmp.elasticsearch:9200
ELASTIC_USE_SSLBoolean value to connect to Elasticsearch over HTTPS.Yes¹-false
ELASTIC_USERElasticsearch user of the API service.Yes¹-opencdmp-api
ELASTIC_PASSPassword of that user. The Docker example sets it from ELASTIC_API_PASSWORD in .env (see Elasticsearch).Yes¹-<opencdmp-elastic-password>
ELASTIC_PLAN_INDEXIndex of the plans. The API service creates it.Yes¹-opencdmp-plans
ELASTIC_DESCRIPTION_INDEXIndex of the assets. The API service creates it.Yes¹-opencdmp-descriptions
ELASTIC_ENABLE_DB_FALLBACKWhen a plan or asset listing fails in Elasticsearch, run it against the database instead (and log the error). When false, the listing fails.Notruefalse

¹ Required only if ELASTIC_ENABLED is set to true

RabbitMQ configuration​

Env VariableDescriptionRequiredDefault ValueExample
QUEUE_ENABLEDBoolean value to connect to RabbitMQ and publish and consume messages. When false, the API sends no events to the notification and annotation services.Notruetrue
QUEUE_APP_IDRabbitMQ application id of the API service.Yes-opencdmp-api
QUEUE_NAMEQueue of the API service.Yes-opencdmp_api_inbox_queue
QUEUE_EXCHANGEExchange shared with the notification and annotation services.Yes-opencdmp_queue
RABBIT_HOSTRabbitMQ host.Yes-opencdmp.rabbitmq
RABBIT_PORTRabbitMQ port.Yes-5672
RABBIT_USERRabbitMQ user.Yes-opencdmp
RABBIT_PASSPassword of that user.Yes-<rabbitmq-password>

Keycloak API configuration​

Env VariableDescriptionRequiredDefault ValueExample
KEYCLOAK_API_SERVER_URLKeycloak server URL, including its relative path, used to call the Keycloak admin API.Yes-https://<keycloak-host>/auth
KEYCLOAK_API_REALMKeycloak realm.Yes-OpenCDMP
KEYCLOAK_API_CLIENT_IDClient that the API service signs in to the admin API with, together with the user below.Yes-api
KEYCLOAK_API_CLIENT_SECRETSecret of that client.Yes-<api-client-secret>
KEYCLOAK_API_USERNAMEKeycloak user with the realm-management > realm-admin role, used to manage group memberships.Yes-dmp-keycloak-api
KEYCLOAK_API_PASSWORDPassword of that user.Yes-<keycloak-password>

Keycloak group IDs (role mapping)​

Each variable holds the id (UUID) of a role group of the realm, not its name; the group names below are those of the shipped realm, and the examples are its group ids. The API service adds users to these groups and removes them when roles change in OpenCDMP. For the organisation roles, it creates a tenant-<tenant-code> subgroup under each group when an organisation is created; only the tenant-default subgroups must exist beforehand.

Env VariableDescriptionRequiredDefault ValueExample
KEYCLOAK_API_GLOBAL_USER_GROUP_IDId of the role-user group: the User role (Signed-in User in the UI).Yes-011269bd-9eec-445f-926d-1ebd1f45b5aa
KEYCLOAK_API_GLOBAL_ADMIN_GROUP_IDId of the role-admin group: the Admin role (System Administrator in the UI).Yes-935ab34d-700a-407f-bb7b-8a00ddcef1d8
KEYCLOAK_API_GLOBAL_INSTALLATION_ADMIN_GROUP_IDId of the role-installation-admin group: the InstallationAdmin role (Installation Manager in the UI).Yes-146561bf-ef12-41f4-a9b1-5f6dc9872a19
KEYCLOAK_API_TENANT_ADMIN_GROUP_IDId of the tenant-role-admin group: the TenantAdmin role (Organisation Admin in the UI).Yes-01195be1-f754-415b-8225-3cc470744d62
KEYCLOAK_API_TENANT_USER_GROUP_IDId of the tenant-role-user group: the TenantUser role (Member in the UI).Yes-64c07220-0d92-44e5-be6e-d9edf6c10a56
KEYCLOAK_API_TENANT_CONFIG_MANAGER_GROUP_IDId of the tenant-role-config-manager group: the TenantConfigManager role (Content & Workflow Manager in the UI).Yes-1bfe8064-4e44-4ec1-a69e-836364a36e37
KEYCLOAK_API_TENANT_PLAN_MANAGER_GROUP_IDId of the tenant-role-manager group: the TenantPlanManager role (Template Manager in the UI).Yes-735f22f1-a0cc-4afd-af4c-dba6bb2e7415

File transformer service authentication​

The API service signs in to the plugins with the client below, usually api with the plugins scope. These variables are referenced from the plugin registrations; see Registering plugin services.

Env VariableDescriptionRequiredDefault ValueExample
FILE_TRANSFORMER_AUTH_TOKEN_ENDPOINTURL to get keycloak auth token for file transformer services.Yes²-https://opencdmp.example.org/auth/realms/OpenCDMP/protocol/openid-connect/token
FILE_TRANSFORMER_AUTH_CLIENT_IDKeycloak client id string to get auth token for file transformer services.Yes²-api
FILE_TRANSFORMER_AUTH_CLIENT_SECRETKeycloak client secret string to get auth token for file transformer services.Yes²-<api-client-secret>
FILE_TRANSFORMER_AUTH_SCOPEKeycloak client scope string for file transformer services.Yes²-plugins

² Required if using file transformer services

Deposit service authentication​

Env VariableDescriptionRequiredDefault ValueExample
DEPOSIT_AUTH_TOKEN_ENDPOINTURL to get keycloak auth token for deposit services.Yes³-https://opencdmp.example.org/auth/realms/OpenCDMP/protocol/openid-connect/token
DEPOSIT_AUTH_CLIENT_IDKeycloak client id string to get auth token deposit services.Yes³-api
DEPOSIT_AUTH_CLIENT_SECRETKeycloak client secret string to get auth token for deposit services.Yes³-<api-client-secret>
DEPOSIT_AUTH_SCOPEKeycloak client scope string for deposit services.Yes³-plugins

³ Required if using deposit services

Evaluator service authentication​

Env VariableDescriptionRequiredDefault ValueExample
EVALUATOR_AUTH_TOKEN_ENDPOINTURL to get keycloak auth token for evaluator services.Yes⁴-https://opencdmp.example.org/auth/realms/OpenCDMP/protocol/openid-connect/token
EVALUATOR_AUTH_CLIENT_IDKeycloak client id string to get auth token evaluator services.Yes⁴-api
EVALUATOR_AUTH_CLIENT_SECRETKeycloak client secret string to get auth token for evaluator services.Yes⁴-<api-client-secret>
EVALUATOR_AUTH_SCOPEKeycloak client scope string for evaluator services.Yes⁴-plugins

⁴ Required if using evaluator services

Plugin registration​

The file transformers, deposit services, and evaluators of the installation are registered in file-transformer-<profile>.yml, deposit-<profile>.yml, and evaluator-<profile>.yml in the config folder, with the client settings above. The keys, examples, and the per-organisation alternative are described in Registering plugin services.

File storage configuration​

Env VariableDescriptionRequiredDefault ValueExample
FILE_STORAGEFolder of the files of the API service: uploaded files (main), temporary files (temp), and files exchanged with plugins (transformer, deposit). Back it up with the database, and share it between several API instances.Yes-/storage

Upload limits​

Maximum size of a single uploaded file and of a whole multipart request accepted by the API (plan and asset file uploads, template and blueprint imports, Data Transfer bundles). Values use Spring data-size notation (MB, GB). A reverse proxy in front of the API must allow at least the same request size.

Env VariableDescriptionRequiredDefault ValueExample
MULTIPART_MAX_FILE_SIZEMaximum size of one uploaded file.No100MB500MB
MULTIPART_MAX_REQUEST_SIZEMaximum size of one multipart request (all files of the request together).No100MB500MB

Supportive material paths​

Env VariableDescriptionRequiredDefault ValueExample
SUPPORTIVE_MATERIAL_USER_GUIDE_PATHFolder with the built-in User Guide texts of the help pages, one file per language named UserGuide_<lang>.html. A classpath: or file: location ending in /.Noclasspath:/material/user-guide/file:/material/user-guide/
SUPPORTIVE_MATERIAL_ABOUT_PATHFolder with the built-in About texts of the help pages, one file per language named About_<lang>.html. A classpath: or file: location ending in /.Noclasspath:/material/about/file:/material/about/
SUPPORTIVE_MATERIAL_TERM_OF_SERVICE_PATHFolder with the built-in Terms of Service texts of the help pages, one file per language named TermsOfService_<lang>.html. A classpath: or file: location ending in /.Noclasspath:/material/terms-of-service/file:/material/terms-of-service/
SUPPORTIVE_MATERIAL_GLOSSARY_PATHFolder with the built-in Glossary texts of the help pages, one file per language named Glossary_<lang>.html. A classpath: or file: location ending in /.Noclasspath:/material/glossary/file:/material/glossary/
SUPPORTIVE_MATERIAL_FAQ_PATHFolder with the built-in FAQ texts of the help pages, one file per language named Faq_<lang>.html. A classpath: or file: location ending in /.Noclasspath:/material/faq/file:/material/faq/
SUPPORTIVE_MATERIAL_COOKIE_POLICY_PATHFolder with the built-in Cookie Policy texts of the help pages, one file per language named CookiePolicy_<lang>.html. A classpath: or file: location ending in /.Noclasspath:/material/cookie-policy/file:/material/cookie-policy/

The Docker example mounts config-files/opencdmp/backend/material/ at /material and sets the variables to file:/material/<folder>/, so the API service serves the mounted files. Edit them there to change the built-in texts of the example.

Semantics​

Env VariableDescriptionRequiredDefault ValueExample
SEMANTICS_PATHJSON file with the list of semantics that the blueprint and asset template editors suggest.Noclasspath:Semantics.jsonfile:/config/Semantics.json

Logging configuration​

Env VariableDescriptionRequiredDefault ValueExample
LOGGING_CONFIG_PATHLogback configuration file.Noclasspath:logging/logback.xmlfile:/config/logback.xml
LOGGING_DEFAULT_LOG_LEVELLevel of the framework loggers: ERROR, WARN, INFO, or DEBUG. OpenCDMP's own code logs at INFO.NoWARNINFO
LOGGING_PATHFolder of the log files logging.log and auditing.log, and of their rolled files.No/logs/logs

See Logging and monitoring for the log files, finer log levels, and the health and metrics endpoints.

Encryption configuration​

Change the shipped key before you store plugin secrets

The default key and IV below are published in the source code and in this documentation, so anyone can decrypt secrets encrypted with them. Set your own random TENANT_CONFIG_ENCRYPTION_AES_KEY (32 characters) and TENANT_CONFIG_ENCRYPTION_AES_IV (16 characters) before anyone saves plugin credentials, such as the repository access tokens and passwords of the organisation settings or of user profiles. Secrets saved with one key cannot be read after the key changes and must be entered again.

Env VariableDescriptionRequiredDefault ValueExample
TENANT_CONFIG_ENCRYPTION_AES_KEY32-character AES key used to encrypt the secrets stored for file transformer, deposit, and evaluator plugins: client secrets of plugins added by an organisation, and credentials in organisation settings and user profiles.Yes (in production)rmpTvZnRWzyisUtFADBcZCn0q7Z75Xdz (public; change it)<32-character random string>
TENANT_CONFIG_ENCRYPTION_AES_IV16-character AES IV used with the key above.Yes (in production)ec05d521a23f80ad (public; change it)<16-character random string>

Data Transfer configuration​

The Data Transfer page exports, imports, copies, and purges the content of a tenant (organisation). Comments (annotations) live in the annotation service; they are transferred together with the plans only when the API knows where that service is.

Env VariableDescriptionRequiredDefault ValueExample
ANNOTATION_SERVICE_URLBase URL of the annotation service, used to export, import, copy, and purge the comments of transferred plans through its /api/annotation/transfer/* endpoints. The annotation service must run the release matching the API. When empty, tenant transfer operations run without comments and report a warning.No- (annotation transfer disabled)http://opencdmp.annotation:8080

Notification expiration settings​

Env VariableDescriptionRequiredDefault ValueExample
MERGE_ACCOUNT_EXPIRATIONExpiration time (in seconds) for link account notification.No1440014400
REMOVE_CREDENTIAL_EXPIRATIONExpiration time (in seconds) for unlink account notification.No1440014400
TENANT_SPECIFIC_INVITATION_EXPIRATIONExpiration time (in seconds) for invitations to an organisation.No25920002592000
PLAN_INVITATION_EXTERNAL_USER_EXPIRATIONExpiration time (in seconds) for notification of invitation of external users to a plan.No25920002592000

Locale configuration​

Env VariableDescriptionRequiredDefault ValueExample
LOCALE_TIMEZONEDefault time zone of the API service.NoUTCEurope/Athens
LOCALE_LANGUAGEDefault language of the API service.Noenen
LOCALE_CULTUREDefault culture (number and date formats) of the API service.Noenen

Contact configuration​

Env VariableDescriptionRequiredDefault ValueExample
CONTACT_SUPPORT_EMAIL_ADDRESSAddress that receives the messages of the Contact support form.Yes-support@example.org

Swagger configuration​

Env VariableDescriptionRequiredDefault ValueExample
SWAGGER_ENABLEDBoolean value to serve the Swagger UI (/api/swagger-ui) and the OpenAPI document (/api/v3/api-docs).Notruefalse
SWAGGER_AUTH_CLIENT_IDId of the swagger Keycloak client that the Swagger UI signs in with.Yes⁶-swagger
SWAGGER_AUTH_REDIRECT_URLSwagger UI redirect URL. It must be one of the Valid redirect URIs of the swagger Keycloak client.Yes⁶-https://<app-hostname>/api/swagger-ui/oauth2-redirect.html
SWAGGER_SERVER_URLAddress that the Swagger UI sends requests to, without /api (the endpoint paths include it).Yes⁶-https://<app-hostname>

⁶ Required only if SWAGGER_ENABLED is true

Integration event configuration​

Integration events are outbox events (for example, plan touched and plan removal events) that the API Service publishes to the message broker so that external integrations can react to changes in plans. When disabled, the API emits no integration events.

Env VariableDescriptionRequiredDefault ValueExample
INTEGRATION_EVENT_ENABLEDBoolean value to enable publishing of integration events (such as plan touched and plan removal events) to the message broker for external integrations.Nofalsetrue

Webhooks configuration​

Webhooks let organisation administrators register HTTP endpoints that receive signed callbacks when plans and assets change (plan finalized, status changed, unfinalized, deposited, and asset finalized). See Webhooks for the administration guide and Webhooks for developers for the payload format and signature verification. The WebhookSubscription and WebhookDelivery tables that the feature uses are created by the database migrations at startup.

Env VariableDescriptionRequiredDefault ValueExample
WEBHOOKS_ENABLEDBoolean value to enable webhooks. When false, no events are recorded and the delivery task does not start; subscriptions can still be managed in the admin UI.Nofalsetrue
WEBHOOKS_MAX_ATTEMPTSMaximum number of delivery attempts per event before the delivery is marked Failed.No88
WEBHOOKS_TIMEOUT_SECONDSConnect and response timeout in seconds for each delivery attempt.No1010
WEBHOOKS_DENY_PRIVATE_ADDRESSESBoolean value to refuse deliveries to URLs that resolve to loopback, link-local, or private network addresses (SSRF guard). Refused deliveries fail immediately.Notruetrue
WEBHOOKS_TASK_ENABLEDBoolean value to run the delivery task on this instance. In clustered deployments enable it on a single instance only, because delivery rows are not locked across processes.Notruetrue
WEBHOOKS_TASK_INTERVAL_SECONDSInterval in seconds between delivery task runs.No3030
WEBHOOKS_TASK_BATCH_SIZEMaximum number of due deliveries processed in one task run.No5050

Reports configuration​

Reports count how a question of an asset template or plan blueprint was answered across a tenant (organisation), and export the answers behind the counts. See Research Insights for the administration guide and Reports for developers for the endpoints. A report reads every matching item in one pass, so the limits below keep a single request bounded.

Env VariableDescriptionRequiredDefault ValueExample
REPORT_MAX_SUBJECTSMaximum number of plans or assets one report may read. Above it the request is refused with error 191, so a report never returns a partial count.No2000050000
REPORT_MAX_SUBJECTS_INSTALLATIONThe same limit for installation-wide reports, which read across every tenant. Items are read in batches, so this limit bounds the duration of a report, not its memory use.No100000200000
REPORT_MAX_QUESTIONSMaximum number of questions per report request.No1010
REPORT_MAX_DIMENSIONSMaximum number of breakdown levels per report request.No33
REPORT_TEXT_TOP_NDistinct free-text answers listed before the remainder is folded into Other text (n). Callers may pass a different textTopN per request.No2050
REPORT_SEARCH_CACHE_SECONDSHow long the parsed question index of a tenant is kept for the question search, which otherwise re-parses the current version of every template and blueprint on each keystroke. A template published inside the window appears in search results once it expires. 0 disables the cache.No60300

See also​


Supplementary services​

The notification and annotation services and the plugins are configured separately: