Skip to content

Configuration Reference

Every onec.* configuration property, by module, with type and default. Each integration starter is auto-configured on the classpath and gated by its own onec.<module>.enabled flag (default true, except Kafka inbound). Standard Spring keys (spring.datasource.*, spring.mail.*, spring.security.oauth2.client.*) are used where noted and are not repeated here.

You don't edit the tables below. They are generated from each starter's @ConfigurationProperties Javadoc via spring-configuration-metadata.json. To change a row, edit the property's Javadoc (description) or add a default in that module's META-INF/additional-spring-configuration-metadata.json, then run ./gradlew generateConfigDocs. Editorial prose lives in docs/_config/.

Core — onec-framework-starter (OnecProperties, prefix onec)

PropertyTypeDefaultMeaning
onec.scan-packagesList<String>Packages scanned for @Catalog, @Document, @AccumulationRegister, @InformationRegister, @Enumeration, and @Constant types. Leave unset to scan from your @SpringBootApplication package. This is the core scan property — not onec.base-packages (which only exists for mail/print templates).
onec.schema.allow-destructiveBooleanfalseAllow apply to execute data-losing changes (dropped tables/columns, narrowing type changes). Off by default: such changes are logged and skipped.
onec.schema.modeStringapplyWhat to do about differences between the metadata model and the database at startup: apply (default — execute safe changes, report destructive ones), plan (log the plan, change nothing), validate (fail startup on any difference or unapplied migration), or off.
onec.security.secret-keyStringEncryption key for @Attribute(secret = true) values. Any passphrase works (it is hashed to a 256-bit AES key). Required only when an entity declares a secret attribute; supply it from an environment variable, never hard-code it.

UI — onec-ui-starter (UiProperties prefix onec.ui, MediaProperties prefix onec.media)

PropertyTypeDefaultMeaning
onec.media.allowed-content-typesList<String>Content types the endpoint accepts. Entries may be exact (image/png) or a wildcard subtype (image/*). Empty means accept any type — fine for an authenticated admin endpoint; set it to lock uploads down to, say, images only.
onec.media.enabledBooleantrueWhether the upload endpoint and the default filesystem storage are wired at all.
onec.media.filesystem.directoryStringDirectory the filesystem backend writes uploads beneath. Defaults to onec-media under the JVM temp dir; set an absolute, persistent path in production.
onec.media.max-file-sizeDataSize10MBLargest single upload accepted. Also raises Spring's 1 MB multipart default to match, so uploads up to this size reach the controller instead of being rejected by the container.
onec.media.public-base-pathString/api/mediaURL prefix the filesystem backend builds stored-media URLs from, and the path GET /api/media/{key} serves from. Other backends (e.g. S3) ignore it.
onec.ui.enabledBooleantrueMaster switch for the UI starter. Also gated on a MetadataRegistry bean being present.
onec.ui.pathString/uiSPA base path, returned as basePath from GET /api/config.
onec.ui.read-onlyBooleanfalseWhen true, every mutating REST call is rejected with 403 UI is in read-only mode.
onec.ui.settings.enabledBooleanfalseWhether to surface the built-in Settings page and its admin nav entry.
onec.ui.themeMap<String,String>Free-form theme key/values served verbatim from GET /api/theme.
onec.ui.update-check.enabledBooleantrueMaster switch. When false no outbound call is ever made and the notice never appears.
onec.ui.update-check.initial-delayDuration1mDelay before the first check, so startup is never blocked on a network round-trip.
onec.ui.update-check.intervalDuration24hHow often to poll after the first check. Floored at 60s.
onec.ui.update-check.urlStringhttps://cloud.onno.su/releases/v1/latestThe onec-cloud endpoint that announces the latest release (see onec-cloud's ReleaseController).

Auth — onec-auth-starter (OnecAuthProperties, prefix onec.auth)

PropertyTypeDefaultMeaning
onec.auth.csrf-ignored-pathsList<String>Request paths exempted from CSRF protection in the cookie-based modes (IN_MEMORY and OIDC). Defaults to just the login endpoint. Add a path here to expose an anonymous, CSRF-free POST (e.g. a public lead/intake form) without having to override the whole SecurityFilterChain (issue #30). Ant patterns are supported (e.g. /api/public/**). Ignored in RESOURCE_SERVER, where CSRF is already disabled.
onec.auth.enabledBooleantrueMaster switch for the auth starter. When false, no SecurityFilterChain is contributed and the application can wire its own.
onec.auth.modeModein-memoryWhich authentication backend the starter wires. Selecting a mode only changes how identities are authenticated — the /api/**-requires-auth model is the same across all of them.
  • IN_MEMORY (default) — username/password against onec.auth.users, session cookie, JSON /api/auth/login. Zero external dependencies.
  • OIDC — server-side OpenID Connect authorization-code login against any standard provider (Keycloak, Zitadel, …). Keeps the session-cookie model; "login" becomes a redirect to /oauth2/authorization/{registrationId}. Configure the provider with the standard spring.security.oauth2.client.* properties.
  • RESOURCE_SERVER — stateless bearer-token validation. The client obtains tokens from the IdP directly and sends Authorization: Bearer .... Configure with spring.security.oauth2.resourceserver.jwt.issuer-uri.
onec.auth.oidc.logout-pathString/logoutPath the SPA navigates to for RP-initiated logout in OIDC mode. A GET here clears the local session and redirects to the IdP's end-session endpoint. Surfaced to the SPA via /api/auth/me as logoutUrl.
onec.auth.oidc.post-logout-redirect-uriString{baseUrl}Where the IdP sends the browser after ending its session. {baseUrl} expands to the app's own origin (scheme://host:port), so the user lands back on the SPA shell. This value must be registered under the IdP client's valid post-logout redirect URIs.
onec.auth.oidc.principal-claimStringToken claim used as the authenticated principal name. Defaults from the preset.
onec.auth.oidc.providerProviderkeycloakProvider preset that supplies default registration id, principal claim, and role sources.
onec.auth.oidc.registration-idStringspring.security.oauth2.client.registration.* id used to build the login URL (/oauth2/authorization/{registrationId}) surfaced to the SPA. Defaults from the preset (e.g. keycloak, zitadel); required for CUSTOM.
onec.auth.oidc.roles.client-idStringKeycloak preset: client id whose roles are mapped; required when clientRoles is true.
onec.auth.oidc.roles.client-rolesBooleanfalseKeycloak preset: also map client-level roles (resource_access.<clientId>.roles).
onec.auth.oidc.roles.prefixStringROLE_Prefix prepended to each mapped role so hasRole(..) works (Spring convention).
onec.auth.oidc.roles.realm-rolesBooleantrueKeycloak preset: map realm-level roles (realm_access.roles).
onec.auth.oidc.roles.sourcesList<RoleSource>Explicit role sources. When empty, the Provider preset supplies defaults. Each source names a claim and the shape of its value.
onec.auth.public-pathsList<String>Public API/config endpoints permitted without authentication so the login screen can render and authenticate. The SPA shell itself (everything outside /api/**) is public by default; only /api/** requires a session.
onec.auth.session.remember-me.allow-ephemeral-keyBooleanfalseWhen key is blank, allow the app to start anyway with a built-in non-secret dev key. Off by default so a multi-node deployment fails fast instead of silently signing cookies a load-balanced peer can't verify. Turn on only for single-node/dev — never with a real secret expectation.
onec.auth.session.remember-me.enabledBooleantrueWhether to issue and honour the persistent remember-me cookie.
onec.auth.session.remember-me.keyStringSecret that signs the remember-me cookie. Set a stable, non-guessable value in production so cookies survive restarts, can't be forged, and validate across every node of a horizontally-scaled deployment. When blank, startup fails fast unless allowEphemeralKey is set (a blank key would otherwise sign cookies with a secret that peer nodes reject, breaking login under a load balancer).
onec.auth.session.remember-me.validityDuration14dHow long the remember-me cookie stays valid. Defaults to 14 days.
onec.auth.session.timeoutDuration8hIdle session timeout for the cookie-based modes, applied to the servlet container. Slides on each request. Defaults to 8 hours (a working day) instead of Spring's 30 minutes so parked-but-open tabs don't silently lose their session. Ignored in RESOURCE_SERVER.
onec.auth.usersList<User>In-memory user accounts. Empty by default — the consuming app supplies them via onec.auth.users[*]. Production deployments should disable in-memory users and configure their own UserDetailsService. Only used in IN_MEMORY.

OIDC and resource-server modes also read the standard spring.security.oauth2.client.* / spring.security.oauth2.resourceserver.* properties.

MCP — onec-mcp-starter (OnecMcpProperties, prefix onec.mcp)

PropertyTypeDefaultMeaning
onec.mcp.enabledBooleantrueMaster switch. When false, no MCP transport, server, or tools are contributed.
onec.mcp.endpointString/mcpServlet path the streamable-HTTP MCP transport is mounted at. MCP clients connect here.
onec.mcp.instructionsString``Optional instructions string sent to clients describing how to use the server. When blank, a sensible default is generated.
onec.mcp.posting-enabledBooleantrueExpose posting tools (post/unpost a document, posting preview). Posting has ledger side-effects, so this is gated separately from ordinary writes.
onec.mcp.server-nameStringonecName advertised to MCP clients in the initialize handshake.
onec.mcp.server-versionString0.1.0Version advertised to MCP clients.
onec.mcp.writes-enabledBooleantrueExpose write tools (create/update catalog and document records).

Import — onec-import-starter (OnecImportProperties, prefix onec.import)

PropertyTypeDefaultMeaning
onec.import.enabledBooleantrueMaster switch for import endpoints and services.
onec.import.max-file-bytesLong0Maximum accepted CSV file size in bytes. Defaults to 5 MiB.
onec.import.max-rowsInteger10000Maximum data rows processed by one import request.
onec.import.preview-rowsInteger20Maximum data rows returned from preview.

Cluster — onec-cluster-starter (OnecClusterProperties, prefix onec.cluster)

PropertyTypeDefaultMeaning
onec.cluster.channelStringonec_cluster_eventsPostgres LISTEN/NOTIFY channel carrying cross-node entity-change notices. Must be a bare identifier ([A-Za-z0-9_]); an invalid value falls back to the default.
onec.cluster.enabledBooleantrueMaster switch for the cross-node event bus. When false, a local-only no-op bus is used and live-UI (SSE) updates do not propagate between nodes.
onec.cluster.max-payload-bytesInteger7000Soft cap (bytes) kept below Postgres's 8000-byte NOTIFY limit. A larger event first drops its natural key, then degrades to a coarse "something changed" notice rather than failing.
onec.cluster.node-idStringStable id identifying this node when filtering out its own NOTIFY echoes. Defaults to a random per-JVM UUID; set it only if you want a deterministic id in logs.
onec.cluster.poll-timeoutDuration5sHow long the listener blocks waiting for notifications before looping to re-check for shutdown. Bounds shutdown latency; does not affect delivery speed.
onec.cluster.reconnect-backoff-maxDuration30sUpper bound on the exponential backoff between reconnect attempts after the listener drops.

Kafka — onec-kafka-starter (OnecKafkaProperties, prefix onec.kafka)

PropertyTypeDefaultMeaning
onec.kafka.enabledBooleantrueMaster switch for the outbound relay beans.
onec.kafka.inbound.auto-offset-resetStringlatestKafka offset reset policy applied when no committed offset exists (latest / earliest).
onec.kafka.inbound.concurrencyInteger1Listener container concurrency (number of consumer threads).
onec.kafka.inbound.dead-letter-topicStringWhen set, messages that fail handling (or are malformed) are published here instead of being redelivered.
onec.kafka.inbound.enabledBooleanfalseOpt-in switch for the inbound consumer. Off by default.
onec.kafka.inbound.group-idStringConsumer group id. When blank, defaults to <serviceName>-inbound.
onec.kafka.inbound.topicsList<String>Topics to consume. When empty, defaults to the outbound onec.kafka.topic.
onec.kafka.relay-batch-sizeInteger100Maximum number of outbox rows drained per relayPending() call.
onec.kafka.remote-servicesMap<String,String>Service name to base-URL map used by RemoteRefClient to resolve cross-service refs.
onec.kafka.service-nameStringonec-serviceCloudEvent source for emitted events; also the prefix for the default inbound group id.
onec.kafka.topicStringonec.domain-eventsOutbound topic events are published to (and the inbound default when no inbound topics are set).

The outbound relay is not auto-scheduled — call OutboxRelay.relayPending() from your own @Scheduled bean. Requires a KafkaTemplate and an OutboxWriter (from the core).

Mail — onec-mail-starter (MailProperties, prefix onec.mail)

PropertyTypeDefaultMeaning
onec.mail.base-packagesList<String>Packages scanned for MailTemplate. Defaults to the application's base packages.
onec.mail.default-fromStringDefault From: address when a MailMessage doesn't set one.
onec.mail.derive-plain-textBooleantrueWhen true and a template renders HTML only, a plain-text alternative is derived so mail is multipart.
onec.mail.enabledBooleantrueMaster switch for the mail starter.
onec.mail.encodingStringUTF-8Charset used when rendering templates and building the MIME message.
onec.mail.failover.providersList<String>Ordered provider names to try, e.g. [ses, smtp]. Active when provider=failover.
onec.mail.file.directoryStringbuild/mailDirectory where .eml files are written.
onec.mail.http.body-templateStringThymeleaf body template producing the provider-specific JSON payload. Resolved by the resource loader; the MailMessage is exposed as msg. Example: classpath:/mail/http/sendgrid.json.
onec.mail.http.headersMap<String,String>Static headers added to every request, e.g. Authorization: Bearer xxx.
onec.mail.http.methodStringPOSTHTTP method (defaults to POST).
onec.mail.http.success-status-maxInteger299Highest HTTP status (inclusive) still treated as success.
onec.mail.http.urlStringEndpoint URL the message is POSTed to.
onec.mail.preview.enabledBooleanfalseEnables the dev-only template preview endpoints. Off by default.
onec.mail.preview.pathString/onec/mail/previewBase path for the preview endpoints.
onec.mail.providerStringsmtpSelects which MailDispatcher bean is active by its name().
onec.mail.relay-batch-sizeInteger50Outbox relay batch size.
onec.mail.relay.enabledBooleantrueWhether the scheduled relay is active. Requires an outbox (DataSource).
onec.mail.relay.interval-msLong30000Delay between relay runs, in milliseconds.
onec.mail.relay.lease-timeout-msLong300000How long a message claimed by a relay may stay in SENDING before another worker reclaims it. Guards against a worker that crashed mid-send; set comfortably above the slowest provider send time.
onec.mail.relay.max-attemptsInteger5Max delivery attempts before a message is marked FAILED.
onec.mail.use-outboxBooleantrueWhether MailService.queue(...) writes to the outbox (true) or dispatches synchronously (false).
onec.mail.webhook.enabledBooleanfalseEnables the inbound delivery-event webhook that feeds the suppression list. Off by default.
onec.mail.webhook.pathString/onec/mail/eventsPath the provider posts delivery events to.

Also reads Spring Boot's spring.mail.* (host/port/credentials) for the SMTP dispatcher.

PropertyTypeDefaultMeaning
onec.print.base-packagesList<String>Packages scanned for PrintTemplate. Defaults to the application's base packages.
onec.print.enabledBooleantrueMaster switch for the print starter (PDF rendering endpoints and services).
onec.print.encodingStringUTF-8Character encoding used when rendering HTML templates.

Desktop — onec-desktop-starter (DesktopProperties, prefix onec.desktop)

PropertyTypeDefaultMeaning
onec.desktop.enabledBooleantrueWhether the desktop endpoints and data relocation are active.
onec.desktop.homeString``Per-user data home the shell passes at launch (via --onec.desktop.home). When set, an embedded H2 file datasource is relocated under <home>/data so the database lives in the OS app-data directory rather than next to the binary. Left unset during bootRun/dev, so normal runs are untouched.

Window appearance is configured in code via a DesktopApp bean (DesktopSpec), not properties. The onec-desktop-gradle-plugin is configured through the onecDesktop { … } Gradle extension (productName, identifier, bundleTargets, iconSource, macOS signing) — see onec-desktop-starter/README.md.

Enterprise connectors (com.onec.enterprise, separate repo)

Gated by onec.guesty.enabled / onec.hospedajes.enabled / onec.tochka.enabled. Each reads its own onec.<connector>.* block (base URL, credentials/tokens, timeouts, retry, token cache). See the onec-enterprise module READMEs.

Released under the Apache-2.0 License.