{
  "schemaVersion": "1.0",
  "contractVersion": "1.0.0",
  "sourceSha256": "e09186d626b034a524b7cdf78f1e4bb6adbc112975b3baf4fd6194b1c1abd771",
  "principles": {
    "secretsNeverCommitted": true,
    "failFastOnInvalidRuntimeConfiguration": true,
    "productionUnsafeDefaultsForbidden": true,
    "staticConfigurationSeparatedFromDynamicRuntimeState": true,
    "databaseMigrationsArePreDeployInProduction": true,
    "providerEndpointOverridesForbiddenInProduction": true,
    "configurationFingerprintExcludesSecrets": true,
    "generatedExamplesNeverContainSecretValues": true,
    "environmentPromotionUsesTheSameArtifact": true,
    "runtimeConfigMustNotReplaceDomainRules": true
  },
  "sourcePrecedence": [
    "defaults",
    "appsettings",
    "environment-specific-appsettings",
    "environment",
    "secret-store",
    "command-line"
  ],
  "settingCount": 33,
  "environmentCount": 4,
  "settings": [
    {
      "key": "Kbx:Runtime:Environment",
      "env": "KBX__Runtime__Environment",
      "category": "runtime",
      "type": "enum",
      "allowedValues": [
        "Development",
        "Test",
        "Staging",
        "Production"
      ],
      "default": "Development",
      "secret": false,
      "restartRequired": true,
      "requiredIn": [
        "Development",
        "Test",
        "Staging",
        "Production"
      ]
    },
    {
      "key": "Kbx:Runtime:ReadOnly",
      "env": "KBX__Runtime__ReadOnly",
      "category": "runtime",
      "type": "boolean",
      "default": false,
      "secret": false,
      "restartRequired": false,
      "requiredIn": []
    },
    {
      "key": "ConnectionStrings:Main",
      "env": "ConnectionStrings__Main",
      "category": "database",
      "type": "connection-string",
      "secret": true,
      "restartRequired": true,
      "requiredIn": [
        "Development",
        "Test",
        "Staging",
        "Production"
      ],
      "allowedSources": [
        "environment",
        "secret-store",
        "user-secrets"
      ]
    },
    {
      "key": "Kbx:Database:MigrationsMode",
      "env": "KBX__Database__MigrationsMode",
      "category": "database",
      "type": "enum",
      "allowedValues": [
        "validate",
        "startup-apply",
        "predeploy"
      ],
      "default": "validate",
      "secret": false,
      "restartRequired": true,
      "requiredIn": [
        "Development",
        "Test",
        "Staging",
        "Production"
      ]
    },
    {
      "key": "Kbx:Database:CommandTimeoutSeconds",
      "env": "KBX__Database__CommandTimeoutSeconds",
      "category": "database",
      "type": "integer",
      "default": 30,
      "minimum": 1,
      "maximum": 300,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Hangfire:Enabled",
      "env": "KBX__Hangfire__Enabled",
      "category": "background-jobs",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Hangfire:WorkerCount",
      "env": "KBX__Hangfire__WorkerCount",
      "category": "background-jobs",
      "type": "integer",
      "default": 4,
      "minimum": 1,
      "maximum": 64,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:SignalR:Enabled",
      "env": "KBX__SignalR__Enabled",
      "category": "realtime",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Outbox:DispatcherEnabled",
      "env": "KBX__Outbox__DispatcherEnabled",
      "category": "messaging",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Inbox:CleanupEnabled",
      "env": "KBX__Inbox__CleanupEnabled",
      "category": "messaging",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Integration:DispatcherEnabled",
      "env": "KBX__Integration__DispatcherEnabled",
      "category": "integration",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:ExternalData:RefreshEnabled",
      "env": "KBX__ExternalData__RefreshEnabled",
      "category": "external-data",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:ExternalData:ObservationRetentionEnabled",
      "env": "KBX__ExternalData__ObservationRetentionEnabled",
      "category": "external-data",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Experiments:Enabled",
      "env": "KBX__Experiments__Enabled",
      "category": "experiments",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": false,
      "requiredIn": []
    },
    {
      "key": "Kbx:Logging:MinimumLevel",
      "env": "KBX__Logging__MinimumLevel",
      "category": "logging",
      "type": "enum",
      "allowedValues": [
        "Debug",
        "Information",
        "Warning",
        "Error"
      ],
      "default": "Information",
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Logging:JsonConsoleEnabled",
      "env": "KBX__Logging__JsonConsoleEnabled",
      "category": "logging",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Telemetry:Enabled",
      "env": "KBX__Telemetry__Enabled",
      "category": "observability",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Telemetry:OtlpEndpoint",
      "env": "KBX__Telemetry__OtlpEndpoint",
      "category": "observability",
      "type": "uri",
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Telegram:Enabled",
      "env": "KBX__Telegram__Enabled",
      "category": "alerting",
      "type": "boolean",
      "default": false,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Telegram:BotToken",
      "env": "KBX__Telegram__BotToken",
      "category": "alerting",
      "type": "string",
      "secret": true,
      "restartRequired": true,
      "requiredWhen": {
        "key": "Kbx:Telegram:Enabled",
        "equals": true
      },
      "allowedSources": [
        "environment",
        "secret-store",
        "user-secrets"
      ]
    },
    {
      "key": "Kbx:Telegram:ChatId",
      "env": "KBX__Telegram__ChatId",
      "category": "alerting",
      "type": "string",
      "secret": true,
      "restartRequired": true,
      "requiredWhen": {
        "key": "Kbx:Telegram:Enabled",
        "equals": true
      },
      "allowedSources": [
        "environment",
        "secret-store",
        "user-secrets"
      ]
    },
    {
      "key": "ExternalProviders:Krx:Enabled",
      "env": "ExternalProviders__Krx__Enabled",
      "category": "provider",
      "type": "boolean",
      "default": false,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "ExternalProviders:Krx:AuthKey",
      "env": "ExternalProviders__Krx__AuthKey",
      "category": "provider",
      "type": "string",
      "secret": true,
      "restartRequired": true,
      "requiredWhen": {
        "key": "ExternalProviders:Krx:Enabled",
        "equals": true
      },
      "allowedSources": [
        "environment",
        "secret-store",
        "user-secrets"
      ]
    },
    {
      "key": "ExternalProviders:OpenDart:Enabled",
      "env": "ExternalProviders__OpenDart__Enabled",
      "category": "provider",
      "type": "boolean",
      "default": false,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "ExternalProviders:OpenDart:ApiKey",
      "env": "ExternalProviders__OpenDart__ApiKey",
      "category": "provider",
      "type": "string",
      "secret": true,
      "restartRequired": true,
      "requiredWhen": {
        "key": "ExternalProviders:OpenDart:Enabled",
        "equals": true
      },
      "allowedSources": [
        "environment",
        "secret-store",
        "user-secrets"
      ]
    },
    {
      "key": "ExternalProviders:Kis:Enabled",
      "env": "ExternalProviders__Kis__Enabled",
      "category": "provider",
      "type": "boolean",
      "default": false,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "ExternalProviders:Kis:Environment",
      "env": "ExternalProviders__Kis__Environment",
      "category": "provider",
      "type": "enum",
      "allowedValues": [
        "sandbox",
        "production"
      ],
      "default": "sandbox",
      "secret": false,
      "restartRequired": true,
      "requiredWhen": {
        "key": "ExternalProviders:Kis:Enabled",
        "equals": true
      }
    },
    {
      "key": "ExternalProviders:Kis:AppKey",
      "env": "ExternalProviders__Kis__AppKey",
      "category": "provider",
      "type": "string",
      "secret": true,
      "restartRequired": true,
      "requiredWhen": {
        "key": "ExternalProviders:Kis:Enabled",
        "equals": true
      },
      "allowedSources": [
        "environment",
        "secret-store",
        "user-secrets"
      ]
    },
    {
      "key": "ExternalProviders:Kis:AppSecret",
      "env": "ExternalProviders__Kis__AppSecret",
      "category": "provider",
      "type": "string",
      "secret": true,
      "restartRequired": true,
      "requiredWhen": {
        "key": "ExternalProviders:Kis:Enabled",
        "equals": true
      },
      "allowedSources": [
        "environment",
        "secret-store",
        "user-secrets"
      ]
    },
    {
      "key": "Kbx:Security:RequireHttps",
      "env": "KBX__Security__RequireHttps",
      "category": "security",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Health:ReadinessEnabled",
      "env": "KBX__Health__ReadinessEnabled",
      "category": "runtime",
      "type": "boolean",
      "default": true,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Import:MaxUploadBytes",
      "env": "KBX__Import__MaxUploadBytes",
      "category": "import",
      "type": "integer",
      "default": 52428800,
      "minimum": 1048576,
      "maximum": 209715200,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    },
    {
      "key": "Kbx:Import:MaxRows",
      "env": "KBX__Import__MaxRows",
      "category": "import",
      "type": "integer",
      "default": 100000,
      "minimum": 1,
      "maximum": 1000000,
      "secret": false,
      "restartRequired": true,
      "requiredIn": []
    }
  ],
  "environments": [
    {
      "id": "Development",
      "artifactPromotion": false,
      "secretSources": [
        "user-secrets",
        "environment"
      ],
      "migrationStrategy": "startup-apply-allowed",
      "providerNetwork": "opt-in",
      "requireHttps": false,
      "providerEndpointOverrideAllowed": true,
      "requiredGates": [
        "static-governance"
      ]
    },
    {
      "id": "Test",
      "artifactPromotion": false,
      "secretSources": [
        "environment"
      ],
      "migrationStrategy": "ephemeral-apply",
      "providerNetwork": "forbidden",
      "requireHttps": false,
      "providerEndpointOverrideAllowed": true,
      "requiredGates": [
        "static-governance",
        "build",
        "unit",
        "integration",
        "scenario"
      ]
    },
    {
      "id": "Staging",
      "artifactPromotion": true,
      "secretSources": [
        "secret-store",
        "environment"
      ],
      "migrationStrategy": "predeploy",
      "providerNetwork": "opt-in",
      "requireHttps": true,
      "providerEndpointOverrideAllowed": false,
      "requiredGates": [
        "static-governance",
        "build",
        "unit",
        "integration",
        "scenario",
        "migration-dry-run"
      ]
    },
    {
      "id": "Production",
      "artifactPromotion": true,
      "secretSources": [
        "secret-store",
        "environment"
      ],
      "migrationStrategy": "predeploy",
      "providerNetwork": "opt-in",
      "requireHttps": true,
      "providerEndpointOverrideAllowed": false,
      "requiredGates": [
        "static-governance",
        "build",
        "unit",
        "integration",
        "scenario",
        "migration-dry-run",
        "configuration-validation",
        "release-governance"
      ]
    }
  ]
}
