Skip to content

Configuration

Aperture is configured via Spring Boot's application.yml. All properties under aperture.* are Aperture-specific. Standard Spring Boot properties (spring.datasource.*, spring.jpa.*, spring.liquibase.*) work as normal.

Database

yaml
spring:
  datasource:
    url: ${DB_URL:jdbc:postgresql://localhost:5432/aperture}
    username: ${DB_USER:aperture}
    password: ${DB_PASS:password}
    driver-class-name: org.postgresql.Driver
  jpa:
    open-in-view: false
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect
  liquibase:
    change-log: classpath:db/changelog/db.changelog-master.xml

Aperture requires PostgreSQL. spring.liquibase.change-log must point to the root changelog generated by the build.

JWT authentication (aperture.auth.jwt)

PropertyTypeDefaultDescription
aperture.auth.jwt.secretstringRequired. HMAC signing key. Use ${APERTURE_JWT_SECRET}. Minimum 32 bytes.
aperture.auth.jwt.issuerstringJWT iss claim value
aperture.auth.jwt.audiencestringJWT aud claim value
aperture.auth.jwt.access-durationISO 8601 durationPT15MAccess token lifetime
aperture.auth.refresh-durationISO 8601 durationPT720HRefresh token lifetime (30 days)
aperture.auth.simple.enabledbooleantrueSet false to disable all simple-auth endpoints (when using a custom CredentialValidator)

Production warning: never use a hardcoded jwt.secret. Always read from an environment variable or secrets manager.

yaml
aperture:
  auth:
    jwt:
      secret: ${APERTURE_JWT_SECRET}
      issuer: my-app
      audience: my-api
      access-duration: PT15M
    refresh-duration: PT720H

CORS (aperture.cors)

PropertyTypeDefaultDescription
aperture.cors.enabledbooleanfalseEnable CORS support
aperture.cors.allowed-originslist of strings[]Exact origins (e.g. https://app.example.com)
aperture.cors.allowed-origin-patternslist of strings[]Wildcard patterns (e.g. https://*.example.com)
aperture.cors.max-agelong (seconds)3600Preflight cache duration

Note: aperture.cors.enabled=true requires at least one origin or pattern. Aperture will refuse to start if CORS is enabled with no origins configured.

yaml
aperture:
  cors:
    enabled: true
    allowed-origins:
      - https://app.example.com

Field encryption (aperture.encryption.local)

PropertyTypeDefaultDescription
aperture.encryption.local.keystring (Base64)demo keyMust be overridden in production. 32-byte AES-256 key, Base64-encoded.

Generate a key: openssl rand -base64 32

yaml
aperture:
  encryption:
    local:
      key: ${APERTURE_ENCRYPTION_KEY}

Hooks (aperture.hooks)

PropertyTypeDefaultDescription
aperture.hooks.secretstringdefault-secretShared secret sent in X-Hook-Secret header
aperture.hooks.base-urlstring(empty)Override the host portion of all hook URLs
aperture.hooks.timeout.commitduration string5sTimeout for PRECOMMIT/POSTCOMMIT hooks
aperture.hooks.timeout.asyncduration string5sTimeout for async hooks and PREENRICH
aperture.hooks.timeout.connectduration string2sTCP connect timeout
yaml
aperture:
  hooks:
    secret: ${APERTURE_HOOK_SECRET}
    timeout:
      commit: 10s
      async: 10s
      connect: 3s

MCP (aperture.mcp / spring.ai.mcp)

PropertyTypeDefaultDescription
aperture.mcp.enabledbooleanfalseEnable MCP tool generation and server
spring.ai.mcp.server.protocolstringSTATELESSMCP transport (stateless HTTP)
spring.ai.mcp.server.namestringMCP server name shown to clients
spring.ai.mcp.server.versionstringMCP server version shown to clients

Security (aperture.server)

PropertyTypeDefaultDescription
aperture.server.https-onlybooleanfalseReject HTTP requests and redirect to HTTPS

OpenAPI / Swagger

Aperture includes Springdoc integration. Enable the Swagger UI:

yaml
springdoc:
  swagger-ui:
    enabled: true
    path: /swagger-ui.html
  api-docs:
    enabled: true
    path: /v3/api-docs

When enabled, the generated OpenAPI spec includes all entity endpoints, auth and management endpoints, and request/response schemas derived from the manifests.

Bootstrap admin

The superadmin account used during initial setup:

yaml
aperture:
  bootstrap:
    admin-password: ${APERTURE_BOOTSTRAP_ADMIN_PASSWORD}

This account has SuperAdmin role and is used to provision the first tenant. Set a strong password and change it after initial setup.

Complete example (application.yml)

yaml
spring:
  datasource:
    url: ${DB_URL}
    username: ${DB_USER}
    password: ${DB_PASS}
    driver-class-name: org.postgresql.Driver
  jpa:
    open-in-view: false
  liquibase:
    change-log: classpath:db/changelog/db.changelog-master.xml

aperture:
  cors:
    enabled: true
    allowed-origins:
      - ${FRONTEND_URL}
  auth:
    jwt:
      secret: ${APERTURE_JWT_SECRET}
      issuer: my-app
      audience: my-api
      access-duration: PT15M
    refresh-duration: PT24H
  encryption:
    local:
      key: ${APERTURE_ENCRYPTION_KEY}
  hooks:
    secret: ${APERTURE_HOOK_SECRET}
  bootstrap:
    admin-password: ${APERTURE_BOOTSTRAP_ADMIN_PASSWORD}