logging:
  level:
    web: trace
    core: trace
spring:
  profiles:
    active: ${PROFILE}
  data:
    redis:
      host: ${REDIS_HOST}
      port: ${REDIS_PORT}
  security:
    oauth2:
      client:
        registration:
          authentik:
            client-id: ${AUTHENTIK_CLIENT_ID}
            client-secret: ${AUTHENTIK_CLIENT_SECRET}
            redirect-uri: "{baseUrl}/login/oauth2/code/authentik"
        provider:
          authentik:
            back-channel-logout-url: ${AUTHENTIK_BACK_CHANNEL_LOGOUT_URL} # spring doesn't support back-channel logouts by default
            issuer-uri: ${AUTHENTIK_ISSUER_URL}
  cloud:
    gateway:
      set-status:
        original-status-header-name: Original-Status
      routes:
        - id: statements-api
          uri: ${STATEMENTS_API_URI}
          order: 1
          predicates:
            - Path=/api/statements/**
          filters:
            - RewritePath=/api/(?<segment>.*), /$\{segment}
            - TokenRelay=
        - id: widgets-api
          uri: ${WIDGETS_API_URI}
          order: 2
          predicates:
            - Path=/api/widgets/**
          filters:
            - RewritePath=/api/(?<segment>.*), /$\{segment}
            - TokenRelay=
        - id: core-api
          uri: ${CORE_API_URI}
          order: 3
          predicates:
            - Path=/api/**
          filters:
            - RewritePath=/api/(?<segment>.*), /$\{segment}
            - TokenRelay=

server:
  ssl:
    enabled: ${SSL_ENABLED}
    key-store-type: ${SSL_KEY_STORE_TYPE}
    key-store: ${SSL_KEY_STORE}
    key-store-password: ${SSL_KEY_STORE_PASSWORD}
    key-alias: ${SSL_KEY_ALIAS}
  reactive:
    session:
      cookie:
        http-only: true
        secure: true
        same-site: lax
        max-age: 30m
        path: "/"