server:
  port: 8080

spring:
  codec:
    max-in-memory-size: 10MB
  application:
    name: manage-gateway
  cloud:
    gateway:
      routes:
        - id: manage-app
          uri: http://localhost:8084
          predicates:
            - Path=/api/**

jwt:
  secret: test-secret-key-for-e2e-testing-novalon-manage-system-2026
  expiration: 86400000
  key:
    encryption:
      password: test-encryption-password
    rotation:
      enabled: false
      interval:
        days: 30

rate:
  limit:
    enabled: false
    global:
      limit-for-period: 10000
      limit-refresh-period: 1s
      timeout-duration: 0
    ip:
      limit-for-period: 1000
      limit-refresh-period: 1s
      timeout-duration: 0
    user:
      limit-for-period: 2000
      limit-refresh-period: 1s
      timeout-duration: 0

signature:
  enabled: false
  secret: TestSecretKey2026
  max-age-minutes: 30
  nonce-cache-size: 10000
  whitelist:
    paths: /actuator/health,/actuator/info,/api/auth/login,/api/auth/register

resilience:
  enabled: true
  circuit-breaker:
    enabled: true
    failure-rate-threshold: 50
    slow-call-rate-threshold: 100
    slow-call-duration-threshold: 2s
    permitted-number-of-calls-in-half-open-state: 10
    sliding-window-type: COUNT_BASED
    sliding-window-size: 100
    minimum-number-of-calls: 10
    wait-duration-in-open-state: 10s
  retry:
    enabled: true
    max-attempts: 3
    wait-duration: 500ms
  timeout:
    enabled: true
    duration: 5s

user:
  service:
    url: http://localhost:8084

permission:
  cache:
    expiry:
      minutes: 1

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics
      base-path: /actuator
  endpoint:
    health:
      show-details: always
  health:
    livenessstate:
      enabled: true
    readinessstate:
      enabled: true

logging:
  level:
    cn.novalon.manage: DEBUG
    org.springframework.cloud.gateway: DEBUG
