{
  "openapi": "3.1.0",
  "info": {
    "title": "Nauthilus Management API",
    "version": "v1",
    "description": "Contract for the stable protected machine-facing HTTP API subset. Dynamic custom hook aliases remain runtime configuration. Public IdP protocol and browser routes are documented by the public IdP contract.\n"
  },
  "servers": [
    {
      "url": "{baseUrl}",
      "description": "Nauthilus deployment base URL.",
      "variables": {
        "baseUrl": {
          "default": "https://nauthilus.example.com",
          "description": "Absolute base URL of the Nauthilus deployment to call."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "OpenAPI",
      "x-displayName": "/api/v1/openapi",
      "description": "Embedded API contract documents."
    },
    {
      "name": "Authentication",
      "x-displayName": "/api/v1/auth",
      "description": "Structured authentication and account listing endpoints."
    },
    {
      "name": "BruteForce",
      "x-displayName": "/api/v1/bruteforce",
      "description": "Backchannel brute-force administration endpoints."
    },
    {
      "name": "Cache",
      "x-displayName": "/api/v1/cache",
      "description": "Backchannel cache administration endpoints."
    },
    {
      "name": "Config",
      "x-displayName": "/api/v1/config",
      "description": "Backchannel configuration inspection endpoint."
    },
    {
      "name": "Async",
      "x-displayName": "/api/v1/async",
      "description": "Asynchronous backchannel job status endpoint."
    },
    {
      "name": "MFA",
      "x-displayName": "/api/v1/mfa",
      "description": "Session-bound MFA management endpoints."
    },
    {
      "name": "OIDCSessions",
      "x-displayName": "/api/v1/oidc/sessions",
      "description": "Backchannel OIDC session administration endpoints."
    },
    {
      "name": "Policy",
      "x-displayName": "/api/v1/policy/decisions",
      "description": "Unary Policy decision evaluation endpoint."
    },
    {
      "name": "Reputation",
      "x-displayName": "/api/v1/custom/reputation",
      "description": "Optional authenticated native reputation administration."
    },
    {
      "name": "SupportHistory",
      "x-displayName": "/api/v1/support",
      "description": "Read-only historical authentication diagnosis from recorded ClickHouse evidence. Requires a backchannel caller (bearer token or scoped Basic credential) holding nauthilus:history_read; nauthilus:history_detail widens the projection. The unrestricted Basic credential and nauthilus:admin alone grant no access."
    },
    {
      "name": "SupportOperations",
      "x-displayName": "/api/v1/support/operations",
      "description": "Read-only operational diagnostics of this instance (current runtime state) and, when configured, of recorded Loki log evidence and Prometheus metric counts through fixed query profiles. Requires a backchannel caller (bearer token or scoped Basic credential) holding nauthilus:operations_read. Findings, hypotheses, and completeness are separate; missing data is unknown, and a local view is never a cluster statement."
    }
  ],
  "paths": {
    "/api/v1/custom/reputation/allocation": {
      "post": {
        "tags": [
          "Reputation"
        ],
        "operationId": "manageReputationAllocation",
        "summary": "Inspect or fence the current allocation generation.",
        "description": "Requires backchannel bearer nauthilus:admin. Status reads the primary and all 16 shard fences without mutation. Drain requires audit fields and fences writers before starting the retained maximum event lifetime. Retry uses the identical audit fields and actor; a different in-progress change conflicts. After a process restart, allocation_maintenance must be explicitly enabled with the original key and generation to retain administration without activating writers. Status and retry remain available while writers are unready. Do not rotate before every shard is fenced and observed_at is at least drained_at plus retention. This API never changes keys, generations, retention or learned evidence.",
        "security": [
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReputationAllocationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified current generation, shard fences and optional durable operator receipt.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationAllocationView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or duplicate fields, unsupported subject, or query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid backchannel access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "403": {
            "description": "Administrative authority or suitable authenticated actor missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "404": {
            "description": "Reputation plugin or custom hook surface unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "409": {
            "description": "Selected override revision changed; read current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 4096 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "500": {
            "description": "Host execution failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "503": {
            "description": "Primary state or verified readback unavailable; a mutation outcome may be unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "504": {
            "description": "Management timeout; inspect current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/custom/reputation/lookup": {
      "post": {
        "tags": [
          "Reputation"
        ],
        "operationId": "lookupReputation",
        "summary": "Inspect one exact reputation subject.",
        "description": "Optional native reputation management endpoint. Requires a backchannel access token with nauthilus:admin, even when additional hook scopes are configured. Subjects are accepted only in the JSON body; enumeration and query parameters are prohibited. Actor identity is host-derived and cannot be supplied in the body. Reads use primary Redis and conservative active/previous key merging. Override changes target one named slot; they do not erase other slots or learned evidence. The latest per-slot operator receipt is retained for 90 days; this is not a complete audit history.",
        "security": [
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReputationLookupRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sanitized primary-backed state. Mutation success includes the independently verified change receipt.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or duplicate fields, unsupported subject, or query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid backchannel access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "403": {
            "description": "Administrative authority or suitable authenticated actor missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "404": {
            "description": "Reputation plugin or custom hook surface unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "409": {
            "description": "Selected override revision changed; read current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 4096 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "500": {
            "description": "Host execution failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "503": {
            "description": "Primary state or verified readback unavailable; a mutation outcome may be unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "504": {
            "description": "Management timeout; inspect current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/custom/reputation/override": {
      "put": {
        "tags": [
          "Reputation"
        ],
        "operationId": "putReputationOverride",
        "summary": "Create or replace one audited operator override.",
        "description": "Optional native reputation management endpoint. Requires a backchannel access token with nauthilus:admin, even when additional hook scopes are configured. Subjects are accepted only in the JSON body; enumeration and query parameters are prohibited. Actor identity is host-derived and cannot be supplied in the body. Reads use primary Redis and conservative active/previous key merging. Override changes target one named slot; they do not erase other slots or learned evidence. The latest per-slot operator receipt is retained for 90 days; this is not a complete audit history.",
        "security": [
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReputationOverridePutRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sanitized primary-backed state. Mutation success includes the independently verified change receipt.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or duplicate fields, unsupported subject, or query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid backchannel access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "403": {
            "description": "Administrative authority or suitable authenticated actor missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "404": {
            "description": "Reputation plugin or custom hook surface unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "409": {
            "description": "Selected override revision changed; read current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 4096 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "500": {
            "description": "Host execution failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "503": {
            "description": "Primary state or verified readback unavailable; a mutation outcome may be unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "504": {
            "description": "Management timeout; inspect current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Reputation"
        ],
        "operationId": "deleteReputationOverride",
        "summary": "Remove one selected operator override revision.",
        "description": "Optional native reputation management endpoint. Requires a backchannel access token with nauthilus:admin, even when additional hook scopes are configured. Subjects are accepted only in the JSON body; enumeration and query parameters are prohibited. Actor identity is host-derived and cannot be supplied in the body. Reads use primary Redis and conservative active/previous key merging. Override changes target one named slot; they do not erase other slots or learned evidence. The latest per-slot operator receipt is retained for 90 days; this is not a complete audit history.",
        "security": [
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReputationOverrideDeleteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sanitized primary-backed state. Mutation success includes the independently verified change receipt.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "const": "no-store"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationView"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or duplicate fields, unsupported subject, or query parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid backchannel access token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "403": {
            "description": "Administrative authority or suitable authenticated actor missing.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "404": {
            "description": "Reputation plugin or custom hook surface unavailable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "409": {
            "description": "Selected override revision changed; read current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "413": {
            "description": "Body exceeds 4096 bytes.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "415": {
            "description": "Expected application/json.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "500": {
            "description": "Host execution failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "503": {
            "description": "Primary state or verified readback unavailable; a mutation outcome may be unknown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          },
          "504": {
            "description": "Management timeout; inspect current state before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReputationManagementError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/policy/decisions": {
      "post": {
        "tags": [
          "Policy"
        ],
        "operationId": "evaluatePolicyDecision",
        "summary": "Evaluate one Policy decision.",
        "description": "Evaluates exactly one admitted Policy request. Responses are never cacheable and do not expose retry, replay, cache, or outcome-reporting controls.\n",
        "security": [
          {
            "policyBearer": []
          },
          {
            "policyBasic": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PolicyDecisionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PolicyDecision"
          },
          "400": {
            "$ref": "#/components/responses/PolicyBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/PolicyUnauthorized"
          },
          "403": {
            "$ref": "#/components/responses/PolicyForbidden"
          },
          "413": {
            "$ref": "#/components/responses/PolicyRequestTooLarge"
          },
          "415": {
            "$ref": "#/components/responses/PolicyUnsupportedMediaType"
          },
          "429": {
            "$ref": "#/components/responses/PolicyRateLimited"
          },
          "503": {
            "$ref": "#/components/responses/PolicyUnavailable"
          }
        }
      }
    },
    "/api/v1/openapi.yaml": {
      "get": {
        "tags": [
          "OpenAPI"
        ],
        "operationId": "getOpenAPIYAML",
        "summary": "Get the OpenAPI document as YAML.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OpenAPI document in YAML format.",
            "content": {
              "application/yaml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "tags": [
          "OpenAPI"
        ],
        "operationId": "getOpenAPIJSON",
        "summary": "Get the OpenAPI document as JSON.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "responses": {
          "200": {
            "description": "OpenAPI document in JSON format.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/json": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "getJSONAuth",
        "summary": "Run the JSON authentication endpoint without a JSON body.",
        "description": "The GET form is primarily used for account listing or no-auth probes via the mode query parameter.\n",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthJSONSuccess"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "operationId": "postJSONAuth",
        "summary": "Authenticate with a strict JSON request body.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthJSONSuccess"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/auth/cbor": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "getCBORAuth",
        "summary": "Run the CBOR authentication endpoint without a CBOR body.",
        "description": "The GET form is primarily used for account listing or no-auth probes via the mode query parameter. List-account responses negotiate the response content type from the Accept header.\n",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthCBORSuccess"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "operationId": "postCBORAuth",
        "summary": "Authenticate with a strict CBOR request body.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/cbor": {
              "schema": {
                "$ref": "#/components/schemas/AuthRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthCBORSuccess"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "415": {
            "$ref": "#/components/responses/UnsupportedMediaType"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/auth/header": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "getHeaderAuth",
        "summary": "Authenticate using configured HTTP request headers.",
        "description": "Reads credentials and connection metadata from configured request headers. The default header names are documented as parameters; they can be changed through the Nauthilus runtime configuration.\n",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          },
          {
            "$ref": "#/components/parameters/AuthUserHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPassHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPasswordEncodedHeader"
          },
          {
            "$ref": "#/components/parameters/AuthProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/AuthMethodHeader"
          },
          {
            "$ref": "#/components/parameters/AuthLoginAttemptHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIPHeader"
          },
          {
            "$ref": "#/components/parameters/ClientPortHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIDHeader"
          },
          {
            "$ref": "#/components/parameters/ClientHostHeader"
          },
          {
            "$ref": "#/components/parameters/ExternalSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/LocalIPHeader"
          },
          {
            "$ref": "#/components/parameters/LocalPortHeader"
          },
          {
            "$ref": "#/components/parameters/OIDCCIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientVerifyHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientCNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotBeforeHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotAfterHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLCipherHeader"
          },
          {
            "$ref": "#/components/parameters/SSLProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSerialHeader"
          },
          {
            "$ref": "#/components/parameters/SSLFingerprintHeader"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthHeaderSuccess"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/AuthHeaderFailure"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "operationId": "postHeaderAuth",
        "summary": "Authenticate using configured HTTP request headers.",
        "description": "POST form mirrors the GET form for integrations that submit auth checks with POST while still carrying credentials and metadata in request headers.\n",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          },
          {
            "$ref": "#/components/parameters/AuthUserHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPassHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPasswordEncodedHeader"
          },
          {
            "$ref": "#/components/parameters/AuthProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/AuthMethodHeader"
          },
          {
            "$ref": "#/components/parameters/AuthLoginAttemptHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIPHeader"
          },
          {
            "$ref": "#/components/parameters/ClientPortHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIDHeader"
          },
          {
            "$ref": "#/components/parameters/ClientHostHeader"
          },
          {
            "$ref": "#/components/parameters/ExternalSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/LocalIPHeader"
          },
          {
            "$ref": "#/components/parameters/LocalPortHeader"
          },
          {
            "$ref": "#/components/parameters/OIDCCIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientVerifyHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientCNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotBeforeHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotAfterHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLCipherHeader"
          },
          {
            "$ref": "#/components/parameters/SSLProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSerialHeader"
          },
          {
            "$ref": "#/components/parameters/SSLFingerprintHeader"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthHeaderSuccess"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/AuthHeaderFailure"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/auth/nginx": {
      "get": {
        "tags": [
          "Authentication"
        ],
        "operationId": "getNginxAuth",
        "summary": "Authenticate an NGINX auth_http request.",
        "description": "Reads NGINX mail auth_http-compatible headers and returns the decision through Auth-* response headers. NGINX mode intentionally returns HTTP 200 for authentication failures and communicates the result via Auth-Status.\n",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          },
          {
            "$ref": "#/components/parameters/AuthUserHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPassHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPasswordEncodedHeader"
          },
          {
            "$ref": "#/components/parameters/AuthProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/AuthMethodHeader"
          },
          {
            "$ref": "#/components/parameters/AuthLoginAttemptHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIPHeader"
          },
          {
            "$ref": "#/components/parameters/ClientPortHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIDHeader"
          },
          {
            "$ref": "#/components/parameters/ClientHostHeader"
          },
          {
            "$ref": "#/components/parameters/ExternalSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/LocalIPHeader"
          },
          {
            "$ref": "#/components/parameters/LocalPortHeader"
          },
          {
            "$ref": "#/components/parameters/OIDCCIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientVerifyHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientCNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotBeforeHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotAfterHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLCipherHeader"
          },
          {
            "$ref": "#/components/parameters/SSLProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSerialHeader"
          },
          {
            "$ref": "#/components/parameters/SSLFingerprintHeader"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthNginxResult"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      },
      "post": {
        "tags": [
          "Authentication"
        ],
        "operationId": "postNginxAuth",
        "summary": "Authenticate an NGINX auth_http request.",
        "description": "POST form mirrors the GET form for deployments that submit NGINX auth checks with POST while still carrying credentials and metadata in request headers.\n",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/AuthMode"
          },
          {
            "$ref": "#/components/parameters/InMemoryFlag"
          },
          {
            "$ref": "#/components/parameters/CacheFlag"
          },
          {
            "$ref": "#/components/parameters/AuthUserHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPassHeader"
          },
          {
            "$ref": "#/components/parameters/AuthPasswordEncodedHeader"
          },
          {
            "$ref": "#/components/parameters/AuthProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/AuthMethodHeader"
          },
          {
            "$ref": "#/components/parameters/AuthLoginAttemptHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIPHeader"
          },
          {
            "$ref": "#/components/parameters/ClientPortHeader"
          },
          {
            "$ref": "#/components/parameters/ClientIDHeader"
          },
          {
            "$ref": "#/components/parameters/ClientHostHeader"
          },
          {
            "$ref": "#/components/parameters/ExternalSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/LocalIPHeader"
          },
          {
            "$ref": "#/components/parameters/LocalPortHeader"
          },
          {
            "$ref": "#/components/parameters/OIDCCIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSessionIDHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientVerifyHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientCNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotBeforeHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientNotAfterHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientSubjectDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLClientIssuerDNHeader"
          },
          {
            "$ref": "#/components/parameters/SSLCipherHeader"
          },
          {
            "$ref": "#/components/parameters/SSLProtocolHeader"
          },
          {
            "$ref": "#/components/parameters/SSLSerialHeader"
          },
          {
            "$ref": "#/components/parameters/SSLFingerprintHeader"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/AuthNginxResult"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/api/v1/bruteforce/list": {
      "get": {
        "tags": [
          "BruteForce"
        ],
        "operationId": "listBruteForceEntries",
        "summary": "List active brute-force bans and blocked accounts.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PageLimit"
          },
          {
            "$ref": "#/components/parameters/PageOffset"
          }
        ],
        "responses": {
          "200": {
            "description": "Brute-force list result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BruteForceListResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "BruteForce"
        ],
        "operationId": "listFilteredBruteForceEntries",
        "summary": "List active brute-force data with optional account and IP filters.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PageLimit"
          },
          {
            "$ref": "#/components/parameters/PageOffset"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BruteForceFilterRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Brute-force list result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BruteForceListResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/bruteforce/flush": {
      "delete": {
        "tags": [
          "BruteForce"
        ],
        "operationId": "flushBruteForceRule",
        "summary": "Flush brute-force data for a configured rule.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BruteForceFlushRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Brute-force flush result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BruteForceFlushResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/bruteforce/flush/async": {
      "delete": {
        "tags": [
          "BruteForce"
        ],
        "operationId": "enqueueBruteForceRuleFlush",
        "summary": "Enqueue an asynchronous brute-force rule flush.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BruteForceFlushRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/AsyncAccepted"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/cache/flush": {
      "delete": {
        "tags": [
          "Cache"
        ],
        "operationId": "flushUserCache",
        "summary": "Flush authentication cache entries for a user.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CacheFlushRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Cache flush result.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CacheFlushResult"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/cache/flush/async": {
      "delete": {
        "tags": [
          "Cache"
        ],
        "operationId": "enqueueUserCacheFlush",
        "summary": "Enqueue an asynchronous user cache flush.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CacheFlushRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "$ref": "#/components/responses/AsyncAccepted"
          },
          "400": {
            "$ref": "#/components/responses/JSONValidationError"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/async/jobs/{jobId}": {
      "get": {
        "tags": [
          "Async"
        ],
        "operationId": "getAsyncJobStatus",
        "summary": "Get the status of an asynchronous backchannel job.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Async job status.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncJobStatusResult"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/oidc/sessions/{user_id}": {
      "get": {
        "tags": [
          "OIDCSessions"
        ],
        "operationId": "listOIDCSessions",
        "summary": "List active OIDC sessions for a user.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Active sessions without raw token material.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OIDCSessions"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "tags": [
          "OIDCSessions"
        ],
        "operationId": "deleteOIDCSessions",
        "summary": "Delete all OIDC sessions for a user.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "All sessions were deleted."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/oidc/sessions/{user_id}/{token}": {
      "delete": {
        "tags": [
          "OIDCSessions"
        ],
        "operationId": "deleteOIDCSession",
        "summary": "Delete one OIDC session for a user.",
        "security": [
          {
            "backchannelBasic": []
          },
          {
            "backchannelBearer": []
          }
        ],
        "parameters": [
          {
            "name": "user_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Session was deleted."
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/v1/support/authentication-attempts/search": {
      "post": {
        "tags": [
          "SupportHistory"
        ],
        "operationId": "searchAuthenticationAttempts",
        "summary": "Search the recorded authentication attempts of one subject in a bounded window.",
        "description": "Requires nauthilus:history_read. Filters are accepted only in the JSON body; query parameters are refused. HTTP 200 means the query was processed; `history` states which evidence was readable and `result_basis` the match state. An empty `attempts` list never proves that no login happened. Attempts are ordered by their latest subject-matching activity, newest first; pages carry no snapshot isolation, so clients deduplicate by attempt_id.",
        "security": [
          {
            "backchannelBearer": []
          },
          {
            "backchannelBasic": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportHistoryAttemptSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed search; evidence may be partial.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/SupportHistoryNoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportHistoryAttemptSearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/SupportHistoryBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/SupportHistoryForbidden"
          },
          "422": {
            "$ref": "#/components/responses/SupportHistoryQueryTooBroad"
          },
          "429": {
            "$ref": "#/components/responses/SupportHistoryBusy"
          },
          "500": {
            "$ref": "#/components/responses/SupportHistoryInternal"
          },
          "503": {
            "$ref": "#/components/responses/SupportHistoryUnavailable"
          }
        }
      }
    },
    "/api/v1/support/authentication-attempts/detail": {
      "post": {
        "tags": [
          "SupportHistory"
        ],
        "operationId": "getAuthenticationAttempt",
        "summary": "Return every recorded event of one diagnostic attempt id.",
        "description": "Requires nauthilus:history_read and a subject; with nauthilus:history_detail the subject is optional. The attempt is returned only when one of its rows belongs to the subject; a guessed or foreign id yields the same `attempt: null` as an unknown one. `around` is any instant of the attempt, for example its started_at.",
        "security": [
          {
            "backchannelBearer": []
          },
          {
            "backchannelBasic": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportHistoryAttemptDetailRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed lookup; `attempt` is null when nothing visible to the caller was found.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/SupportHistoryNoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportHistoryAttemptDetailResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/SupportHistoryBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/SupportHistoryForbidden"
          },
          "422": {
            "$ref": "#/components/responses/SupportHistoryQueryTooBroad"
          },
          "429": {
            "$ref": "#/components/responses/SupportHistoryBusy"
          },
          "500": {
            "$ref": "#/components/responses/SupportHistoryInternal"
          },
          "503": {
            "$ref": "#/components/responses/SupportHistoryUnavailable"
          }
        }
      }
    },
    "/api/v1/support/bruteforce-bans/search": {
      "post": {
        "tags": [
          "SupportHistory"
        ],
        "operationId": "searchBruteForceBans",
        "summary": "Explain the recorded brute-force bans of one IP or network in a window of at most 31 days.",
        "description": "Requires nauthilus:history_read; a subject is accepted only with nauthilus:history_detail. Candidate networks are computed from rule prefixes, never scanned; the latest activation before the window start is included. The activating request is never a culprit and `crossed` is a heuristic.",
        "security": [
          {
            "backchannelBearer": []
          },
          {
            "backchannelBasic": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportHistoryBanSearchRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed ban search; evidence may be partial or aggregate-only.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/SupportHistoryNoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportHistoryBanSearchResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/SupportHistoryBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/SupportHistoryForbidden"
          },
          "422": {
            "$ref": "#/components/responses/SupportHistoryQueryTooBroad"
          },
          "429": {
            "$ref": "#/components/responses/SupportHistoryBusy"
          },
          "500": {
            "$ref": "#/components/responses/SupportHistoryInternal"
          },
          "503": {
            "$ref": "#/components/responses/SupportHistoryUnavailable"
          }
        }
      }
    },
    "/api/v1/support/operations/diagnostics": {
      "post": {
        "tags": [
          "SupportOperations"
        ],
        "operationId": "diagnoseOperations",
        "summary": "Diagnose the support-relevant components from runtime state and recorded log evidence.",
        "description": "Requires nauthilus:operations_read. Filters are accepted only in the JSON body; query parameters are refused. HTTP 200 means the call was processed; every source states its completeness in `sources`. The runtime source reports the current state of this instance only; log evidence covers the instances and window stated in its coverage. Nothing is changed.",
        "security": [
          {
            "backchannelBearer": []
          },
          {
            "backchannelBasic": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SupportOperationsDiagnosticsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Processed diagnosis; sources may be partial, unavailable, or not configured.",
            "headers": {
              "Cache-Control": {
                "$ref": "#/components/headers/SupportHistoryNoStore"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportOperationsDiagnosticsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/SupportOperationsBadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/SupportOperationsForbidden"
          },
          "429": {
            "$ref": "#/components/responses/SupportOperationsBusy"
          },
          "500": {
            "$ref": "#/components/responses/SupportOperationsInternal"
          },
          "503": {
            "$ref": "#/components/responses/SupportOperationsUnavailable"
          }
        }
      }
    }
  },
  "components": {
    "headers": {
      "SupportHistoryNoStore": {
        "description": "Support history answers are never cached.",
        "schema": {
          "type": "string",
          "const": "no-store"
        }
      }
    },
    "securitySchemes": {
      "policyBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "Dedicated Policy client credentials; never management Basic credentials."
      },
      "policyBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Policy-resource Bearer token with nauthilus:policy_evaluate scope."
      },
      "backchannelBasic": {
        "type": "http",
        "scheme": "basic",
        "description": "Backchannel Basic authentication. The unrestricted credential (auth.backchannel.basic_auth.username) passes every management scope check and holds no support scope. A scoped credential (auth.backchannel.basic_auth.users) is authorized like a bearer token carrying the scopes configured for it."
      },
      "backchannelBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Backchannel OIDC bearer token. Every route family asks for its own scopes: nauthilus:authenticate for the authentication endpoints and these OpenAPI documents, nauthilus:security_read for brute-force and OIDC session listings, nauthilus:security_write for cache and brute-force flushes and OIDC session deletion (either of them for the status of an asynchronous job), the MFA and WebAuthn scopes for the MFA backchannel, and the support scopes for /api/v1/support. nauthilus:security includes both security scopes, and nauthilus:admin is accepted on the security and MFA routes as well; neither opens the authentication endpoints or the support routes."
      }
    },
    "parameters": {
      "AuthMode": {
        "name": "mode",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "no-auth",
            "list-accounts"
          ]
        },
        "description": "Optional authentication operation mode."
      },
      "InMemoryFlag": {
        "name": "in-memory",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "0"
          ]
        },
        "description": "Disable in-memory monitoring for this request when set to 0."
      },
      "CacheFlag": {
        "name": "cache",
        "in": "query",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "0"
          ]
        },
        "description": "Disable cache monitoring for this request when set to 0."
      },
      "AuthUserHeader": {
        "name": "Auth-User",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Username header. Required for authentication unless mode is no-auth or list-accounts."
      },
      "AuthPassHeader": {
        "name": "Auth-Pass",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "format": "password"
        },
        "description": "Password header. The configured header is removed from the request after it is read."
      },
      "AuthPasswordEncodedHeader": {
        "name": "X-Auth-Password-Encoded",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "1"
          ]
        },
        "description": "Set to 1 when Auth-Pass carries URL-safe base64 encoded password bytes."
      },
      "AuthProtocolHeader": {
        "name": "Auth-Protocol",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "enum": [
            "smtp",
            "imap",
            "pop3"
          ]
        },
        "description": "Mail protocol of the upstream authentication attempt."
      },
      "AuthMethodHeader": {
        "name": "Auth-Method",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Authentication mechanism such as LOGIN or PLAIN."
      },
      "AuthLoginAttemptHeader": {
        "name": "Auth-Login-Attempt",
        "in": "header",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0
        },
        "description": "One-based login attempt hint from the caller."
      },
      "ClientIPHeader": {
        "name": "Client-IP",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client source IP address."
      },
      "ClientPortHeader": {
        "name": "X-Client-Port",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client source TCP port."
      },
      "ClientIDHeader": {
        "name": "X-Client-ID",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Optional upstream client identifier."
      },
      "ClientHostHeader": {
        "name": "X-Client-Host",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Optional upstream client hostname."
      },
      "ExternalSessionIDHeader": {
        "name": "X-External-Session-ID",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Optional upstream session correlation identifier."
      },
      "LocalIPHeader": {
        "name": "X-Local-IP",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Local listener IP address."
      },
      "LocalPortHeader": {
        "name": "X-Auth-Port",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Local listener TCP port."
      },
      "OIDCCIDHeader": {
        "name": "X-OIDC-CID",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Optional OIDC client identifier associated with the request."
      },
      "PageLimit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 1000
        },
        "description": "Maximum number of records to return per brute-force list section."
      },
      "PageOffset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 0
        },
        "description": "Zero-based offset for brute-force list paging."
      },
      "SSLHeader": {
        "name": "X-SSL",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "SSL/TLS state hint from the caller."
      },
      "SSLSessionIDHeader": {
        "name": "X-SSL-Session-ID",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "SSL session identifier."
      },
      "SSLClientVerifyHeader": {
        "name": "X-SSL-Client-Verify",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate verification status."
      },
      "SSLClientDNHeader": {
        "name": "X-SSL-Client-DN",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate subject DN."
      },
      "SSLClientCNHeader": {
        "name": "X-SSL-Client-CN",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate common name."
      },
      "SSLIssuerHeader": {
        "name": "X-SSL-Issuer",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate issuer."
      },
      "SSLClientNotBeforeHeader": {
        "name": "X-SSL-Client-NotBefore",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate validity start."
      },
      "SSLClientNotAfterHeader": {
        "name": "X-SSL-Client-NotAfter",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate validity end."
      },
      "SSLSubjectDNHeader": {
        "name": "X-SSL-Subject-DN",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "SSL subject distinguished name."
      },
      "SSLIssuerDNHeader": {
        "name": "X-SSL-Issuer-DN",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "SSL issuer distinguished name."
      },
      "SSLClientSubjectDNHeader": {
        "name": "X-SSL-Client-Subject-DN",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate subject distinguished name."
      },
      "SSLClientIssuerDNHeader": {
        "name": "X-SSL-Client-Issuer-DN",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate issuer distinguished name."
      },
      "SSLCipherHeader": {
        "name": "X-SSL-Cipher",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "TLS cipher suite."
      },
      "SSLProtocolHeader": {
        "name": "X-SSL-Protocol",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "TLS protocol version."
      },
      "SSLSerialHeader": {
        "name": "Auth-SSL-Serial",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate serial number."
      },
      "SSLFingerprintHeader": {
        "name": "Auth-SSL-Fingerprint",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string"
        },
        "description": "Client certificate fingerprint."
      }
    },
    "responses": {
      "SupportHistoryBadRequest": {
        "description": "Malformed request, window above 31 days, foreign cursor, malformed attempt id, or query parameters.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportHistoryError"
            }
          }
        }
      },
      "SupportHistoryForbidden": {
        "description": "The verified caller lacks the required history permission.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportHistoryError"
            }
          }
        }
      },
      "SupportHistoryQueryTooBroad": {
        "description": "The read exceeded the server-side budget; narrow the window or add filters.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportHistoryError"
            }
          }
        }
      },
      "SupportHistoryBusy": {
        "description": "The shared history concurrency gate is full; retry later.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportHistoryError"
            }
          }
        }
      },
      "SupportHistoryInternal": {
        "description": "Unexpected service failure.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportHistoryError"
            }
          }
        }
      },
      "SupportHistoryUnavailable": {
        "description": "No history source configured, the primary source could not be read completely, the reader account is not read-only or does not enforce budgets, or the time budget expired. Never an empty history.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportHistoryError"
            }
          }
        }
      },
      "SupportOperationsBadRequest": {
        "description": "Malformed request, unknown component or source, window above 24 hours, or query parameters.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportOperationsError"
            }
          }
        }
      },
      "SupportOperationsForbidden": {
        "description": "The verified caller lacks nauthilus:operations_read.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportOperationsError"
            }
          }
        }
      },
      "SupportOperationsBusy": {
        "description": "The diagnostics concurrency gate is full; retry later.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportOperationsError"
            }
          }
        }
      },
      "SupportOperationsInternal": {
        "description": "Unexpected service failure.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportOperationsError"
            }
          }
        }
      },
      "SupportOperationsUnavailable": {
        "description": "Operational diagnostics are not configured on this instance.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/SupportOperationsError"
            }
          }
        }
      },
      "PolicyDecision": {
        "description": "Completed Policy evaluation, including an indeterminate effect when safe to construct.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyDecisionResponse"
            }
          }
        }
      },
      "PolicyBadRequest": {
        "description": "Strict JSON or public-field validation failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyError"
            }
          }
        }
      },
      "PolicyForbidden": {
        "description": "The authenticated Policy caller is not admitted for this request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyError"
            }
          }
        }
      },
      "PolicyRequestTooLarge": {
        "description": "The request or a submitted value exceeded an admitted limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyError"
            }
          }
        }
      },
      "PolicyRateLimited": {
        "description": "The admitted client exceeded concurrency or rate limits.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyError"
            }
          }
        }
      },
      "PolicyUnauthorized": {
        "description": "Policy credentials are missing or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyError"
            }
          }
        }
      },
      "PolicyUnsupportedMediaType": {
        "description": "The Policy endpoint accepts application/json only.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyError"
            }
          }
        }
      },
      "PolicyUnavailable": {
        "description": "The Policy service was unavailable before evaluation began.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PolicyError"
            }
          }
        }
      },
      "AuthHeaderFailure": {
        "description": "Header-mode authentication failure. The response body is JSON null; Auth-Status carries the status message.",
        "headers": {
          "Auth-Status": {
            "schema": {
              "type": "string"
            }
          },
          "Auth-Wait": {
            "schema": {
              "type": "string"
            }
          },
          "X-Nauthilus-Session": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "null"
            }
          }
        }
      },
      "AuthHeaderSuccess": {
        "description": "Header-mode authentication result. Successful requests return headers such as Auth-Status, Auth-User, X-Nauthilus-Session, and dynamic X-Nauthilus-* attribute headers.\n",
        "headers": {
          "Auth-Status": {
            "schema": {
              "type": "string"
            }
          },
          "Auth-User": {
            "schema": {
              "type": "string"
            }
          },
          "X-Nauthilus-Memory-Cache": {
            "schema": {
              "type": "string",
              "enum": [
                "Hit",
                "Miss"
              ]
            }
          },
          "X-Nauthilus-Session": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "AuthNginxResult": {
        "description": "NGINX auth_http result. HTTP status is 200 for both success and authentication failure; Auth-Status carries OK or the failure message.\n",
        "headers": {
          "Auth-Status": {
            "schema": {
              "type": "string"
            }
          },
          "Auth-User": {
            "schema": {
              "type": "string"
            }
          },
          "Auth-Server": {
            "schema": {
              "type": "string"
            }
          },
          "Auth-Port": {
            "schema": {
              "type": "string"
            }
          },
          "Auth-Wait": {
            "schema": {
              "type": "string"
            }
          },
          "Auth-Error-Code": {
            "schema": {
              "type": "string"
            }
          },
          "X-Nauthilus-Memory-Cache": {
            "schema": {
              "type": "string",
              "enum": [
                "Hit",
                "Miss"
              ]
            }
          },
          "X-Nauthilus-Session": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "type": "null"
            }
          }
        }
      },
      "AuthJSONSuccess": {
        "description": "Authentication result, account list, or no-auth result.",
        "headers": {
          "Auth-Status": {
            "schema": {
              "type": "string"
            }
          },
          "X-Nauthilus-Session": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AuthSuccess"
                },
                {
                  "$ref": "#/components/schemas/AuthError"
                },
                {
                  "$ref": "#/components/schemas/AccountList"
                }
              ]
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          },
          "application/x-www-form-urlencoded": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "AuthCBORSuccess": {
        "description": "Authentication result, account list, or no-auth result.",
        "headers": {
          "Auth-Status": {
            "schema": {
              "type": "string"
            }
          },
          "X-Nauthilus-Session": {
            "schema": {
              "type": "string"
            }
          }
        },
        "content": {
          "application/cbor": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/AuthSuccess"
                },
                {
                  "$ref": "#/components/schemas/AuthError"
                },
                {
                  "$ref": "#/components/schemas/AccountList"
                }
              ]
            }
          },
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AccountList"
            }
          },
          "text/plain": {
            "schema": {
              "type": "string"
            }
          },
          "application/x-www-form-urlencoded": {
            "schema": {
              "type": "string"
            }
          }
        }
      },
      "AsyncAccepted": {
        "description": "Async job was queued.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AsyncAcceptedResult"
            }
          }
        }
      },
      "Error": {
        "description": "Error response.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Forbidden": {
        "description": "Request is authenticated but lacks the required scope.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "JSONValidationError": {
        "description": "Invalid JSON or request validation failure.",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                {
                  "$ref": "#/components/schemas/FieldErrorResponse"
                }
              ]
            }
          }
        }
      },
      "NotFound": {
        "description": "Resource was not found.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "Unauthorized": {
        "description": "Authentication is missing or invalid.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      },
      "UnsupportedMediaType": {
        "description": "Requested or submitted media type is not supported.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        }
      }
    },
    "schemas": {
      "SupportHistoryResultBasis": {
        "type": "string",
        "description": "Match state of an answer. matches_found wins over every condition; an answer without matches names the state of its primary source (logins for attempts, bruteforce_lifecycle for bans: missing table, no rows, failed read, expired or partially expired window), then truncated evidence, then an unresolved identity, then no_matches. Secondary sources only appear in history.conditions. Never read as \"nothing happened\".",
        "enum": [
          "matches_found",
          "no_matches",
          "identity_unresolved",
          "source_not_installed",
          "source_without_rows",
          "source_read_failed",
          "window_expired",
          "window_partially_expired",
          "evidence_truncated"
        ],
        "x-enum-varnames": [
          "SupportHistoryBasisMatchesFound",
          "SupportHistoryBasisNoMatches",
          "SupportHistoryBasisIdentityUnresolved",
          "SupportHistoryBasisSourceNotInstalled",
          "SupportHistoryBasisSourceWithoutRows",
          "SupportHistoryBasisSourceReadFailed",
          "SupportHistoryBasisWindowExpired",
          "SupportHistoryBasisWindowPartiallyExpired",
          "SupportHistoryBasisEvidenceTruncated"
        ]
      },
      "SupportHistoryError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "error"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "INVALID_REQUEST",
                  "WINDOW_TOO_LARGE",
                  "INVALID_CURSOR",
                  "INVALID_ATTEMPT_ID",
                  "FORBIDDEN",
                  "QUERY_TOO_BROAD",
                  "HISTORY_BUSY",
                  "HISTORY_NOT_CONFIGURED",
                  "HISTORY_SOURCE_UNAVAILABLE",
                  "HISTORY_READER_UNSAFE",
                  "HISTORY_TIMEOUT",
                  "INTERNAL_ERROR"
                ]
              },
              "message": {
                "type": "string",
                "description": "Fixed English text per code; never parse it."
              }
            }
          }
        }
      },
      "SupportHistorySubject": {
        "type": "object",
        "additionalProperties": false,
        "description": "Login is a claim as typed; account is a canonical account. At least one is required.",
        "properties": {
          "login": {
            "type": "string",
            "maxLength": 256
          },
          "account": {
            "type": "string",
            "maxLength": 256
          }
        }
      },
      "SupportHistoryPageRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          },
          "cursor": {
            "type": "string",
            "maxLength": 512,
            "description": "Opaque position bound to the same query; never authorizing."
          }
        }
      },
      "SupportHistoryAuditReference": {
        "type": "string",
        "pattern": "^[A-Za-z0-9._:/-]{1,64}$",
        "description": "Unverified ticket-like annotation recorded in the audit log only."
      },
      "SupportHistoryAttemptSearchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "subject",
          "filter"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "subject": {
            "$ref": "#/components/schemas/SupportHistorySubject"
          },
          "filter": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "from",
              "until"
            ],
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time",
                "description": "Inclusive lower bound (event time)."
              },
              "until": {
                "type": "string",
                "format": "date-time",
                "description": "Exclusive upper bound; at most 31 days after from."
              },
              "client_ip": {
                "type": "string",
                "maxLength": 64
              },
              "protocol": {
                "type": "string",
                "maxLength": 64
              },
              "oidc_client_id": {
                "type": "string",
                "maxLength": 256
              },
              "saml_entity_id": {
                "type": "string",
                "maxLength": 1024
              }
            }
          },
          "page": {
            "$ref": "#/components/schemas/SupportHistoryPageRequest"
          },
          "audit_reference": {
            "$ref": "#/components/schemas/SupportHistoryAuditReference"
          },
          "include_ban_context": {
            "type": "boolean",
            "description": "Adds ban_contexts and ban_history: every subject request of this page that brute-force protection rejected, linked server-side to the recorded ban instances effective at that time (also bans that began before the window). Absent or false keeps the answer unchanged. Independent of response_mode."
          },
          "response_mode": {
            "$ref": "#/components/schemas/SupportHistoryResponseMode",
            "description": "Presentation only. detailed (the default) returns full attempts; compact returns attempt_summaries and an empty attempts list. Neither mode changes rights: the projection always follows the token scopes."
          }
        }
      },
      "SupportHistoryAttemptDetailRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "attempt_id",
          "around"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "attempt_id": {
            "type": "string",
            "maxLength": 128,
            "description": "fl1.<flow_ref> or rq1.<request id>"
          },
          "around": {
            "type": "string",
            "format": "date-time"
          },
          "subject": {
            "$ref": "#/components/schemas/SupportHistorySubject"
          },
          "audit_reference": {
            "$ref": "#/components/schemas/SupportHistoryAuditReference"
          }
        }
      },
      "SupportHistoryBanSearchRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "target",
          "filter"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "target": {
            "type": "object",
            "additionalProperties": false,
            "description": "Exactly one of ip or network.",
            "properties": {
              "ip": {
                "type": "string",
                "maxLength": 64
              },
              "network": {
                "type": "string",
                "maxLength": 64
              }
            }
          },
          "filter": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "from",
              "until"
            ],
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "until": {
                "type": "string",
                "format": "date-time"
              },
              "ban_ref": {
                "type": "string",
                "pattern": "^[0-9a-f]{32}$"
              }
            }
          },
          "subject": {
            "$ref": "#/components/schemas/SupportHistorySubject"
          },
          "page": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 20
              },
              "cursor": {
                "type": "string",
                "maxLength": 512
              }
            }
          },
          "audit_reference": {
            "$ref": "#/components/schemas/SupportHistoryAuditReference"
          }
        }
      },
      "SupportOperationsWindow": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "from",
          "until"
        ],
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time",
            "description": "Inclusive lower bound."
          },
          "until": {
            "type": "string",
            "format": "date-time",
            "description": "Exclusive upper bound; not in the future."
          }
        }
      },
      "SupportOperationsDiagnosticsRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "window": {
            "$ref": "#/components/schemas/SupportOperationsWindow",
            "description": "Defaults to the last 15 minutes; at most 24 hours."
          },
          "components": {
            "type": "array",
            "maxItems": 7,
            "uniqueItems": true,
            "description": "Components to diagnose; all when absent.",
            "items": {
              "type": "string",
              "enum": [
                "ldap",
                "auth_backend",
                "backend_monitoring",
                "redis",
                "clickhouse_export",
                "auth_event_delivery",
                "policy"
              ]
            }
          },
          "sources": {
            "type": "array",
            "maxItems": 3,
            "uniqueItems": true,
            "description": "Sources to ask; all configured sources when absent.",
            "items": {
              "type": "string",
              "enum": [
                "nauthilus_runtime",
                "loki",
                "prometheus"
              ]
            }
          },
          "audit_reference": {
            "$ref": "#/components/schemas/SupportHistoryAuditReference"
          }
        }
      },
      "SupportOperationsSourceReport": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "coverage",
          "name",
          "kind",
          "status",
          "truncated"
        ],
        "properties": {
          "coverage": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "instances"
            ],
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "until": {
                "type": "string",
                "format": "date-time"
              },
              "instances": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "view": {
                "type": "string",
                "enum": [
                  "local_instance",
                  "log_labels",
                  "metric_labels"
                ]
              }
            }
          },
          "name": {
            "type": "string",
            "enum": [
              "nauthilus_runtime",
              "loki",
              "prometheus"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "local_current",
              "historical"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "partial",
              "unavailable",
              "timeout",
              "not_configured",
              "not_requested"
            ]
          },
          "code": {
            "type": "string",
            "description": "Stable reason code of a non-ok status."
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "SupportOperationsFinding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "component",
          "source",
          "status",
          "scope",
          "observed",
          "freshness",
          "symptoms"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "component": {
            "type": "string",
            "enum": [
              "ldap",
              "auth_backend",
              "backend_monitoring",
              "redis",
              "clickhouse_export",
              "auth_event_delivery",
              "policy"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "nauthilus_runtime",
              "loki",
              "prometheus"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "failing",
              "degraded",
              "observed",
              "not_observed",
              "ok",
              "unknown"
            ]
          },
          "scope": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "kind"
            ],
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "instance",
                  "deployment"
                ]
              },
              "instance": {
                "type": "string"
              }
            }
          },
          "labels": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "description": "Observed infrastructure labels; untrusted data."
          },
          "observed": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "at": {
                "type": "string",
                "format": "date-time"
              },
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "until": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "freshness": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "observed_at",
              "basis",
              "age_seconds"
            ],
            "properties": {
              "observed_at": {
                "type": "string",
                "format": "date-time"
              },
              "counting_since": {
                "type": "string",
                "format": "date-time"
              },
              "basis": {
                "type": "string",
                "enum": [
                  "current_state",
                  "process_lifetime_counter",
                  "log_window",
                  "metric_window"
                ]
              },
              "age_seconds": {
                "type": "integer",
                "minimum": 0
              }
            }
          },
          "symptoms": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "code",
                "count"
              ],
              "properties": {
                "code": {
                  "type": "string"
                },
                "count": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          }
        }
      },
      "SupportOperationsHypothesis": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "confidence",
          "basis",
          "finding_ids",
          "caveats"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "confidence": {
            "type": "string",
            "enum": [
              "low",
              "medium"
            ]
          },
          "basis": {
            "type": "string"
          },
          "finding_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SupportOperationsDiagnosticsResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "scope",
          "sources",
          "findings",
          "hypotheses",
          "notes"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "scope": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "window",
              "queried_at",
              "instance"
            ],
            "properties": {
              "window": {
                "$ref": "#/components/schemas/SupportOperationsWindow"
              },
              "queried_at": {
                "type": "string",
                "format": "date-time"
              },
              "deployment": {
                "type": "string"
              },
              "instance": {
                "type": "string"
              }
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportOperationsSourceReport"
            }
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportOperationsFinding"
            }
          },
          "hypotheses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportOperationsHypothesis"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SupportOperationsError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema_version",
          "error"
        ],
        "properties": {
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "error": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "INVALID_REQUEST",
                  "WINDOW_TOO_LARGE",
                  "FORBIDDEN",
                  "OPERATIONS_BUSY",
                  "OPERATIONS_NOT_CONFIGURED",
                  "INTERNAL_ERROR"
                ]
              },
              "message": {
                "type": "string",
                "description": "Fixed English text per code; never parse it."
              }
            }
          }
        }
      },
      "SupportHistoryCoverage": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "contract_rows_since",
          "oidc_completion_events_since",
          "sources",
          "conditions",
          "known_limits",
          "availability",
          "deployment",
          "delivery_completeness",
          "late_events_possible"
        ],
        "properties": {
          "contract_rows_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "oidc_completion_events_since": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "First recorded OIDC completion event (oidc.code_issuance or oidc.code_redemption) of the deployment within the event retention. Flows that started before it, or every flow when it is null, predate completion recording and keep FLOW_COMPLETION_NEVER_RECORDED. Null also means the probe failed; then conditions contain COMPLETION_CUTOVER_UNKNOWN."
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "source",
                "state",
                "window_coverage",
                "retention_days"
              ],
              "properties": {
                "source": {
                  "type": "string",
                  "enum": [
                    "logins",
                    "auth_events",
                    "bruteforce_lifecycle",
                    "bruteforce_attempts",
                    "bruteforce_attempt_summary"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "read",
                    "read_failed",
                    "not_installed",
                    "no_rows_for_deployment",
                    "not_queried"
                  ]
                },
                "window_coverage": {
                  "type": "string",
                  "enum": [
                    "within_retention",
                    "partially_expired",
                    "expired"
                  ]
                },
                "retention_days": {
                  "type": "integer"
                }
              }
            }
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "known_limits": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availability": {
            "type": "string",
            "enum": [
              "available",
              "partial"
            ]
          },
          "deployment": {
            "type": "string"
          },
          "delivery_completeness": {
            "type": "string",
            "const": "not_guaranteed"
          },
          "late_events_possible": {
            "type": "boolean"
          }
        }
      },
      "SupportHistorySubjectResolution": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "supplied_login",
          "supplied_account",
          "accounts",
          "current_mapping"
        ],
        "properties": {
          "supplied_login": {
            "type": [
              "string",
              "null"
            ]
          },
          "supplied_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "account",
                "provenance"
              ],
              "properties": {
                "account": {
                  "type": "string"
                },
                "provenance": {
                  "type": "string",
                  "enum": [
                    "supplied_account",
                    "current_account_mapping",
                    "recorded_at_event"
                  ]
                }
              }
            }
          },
          "current_mapping": {
            "type": "string",
            "enum": [
              "resolved",
              "unmapped",
              "unavailable",
              "not_attempted"
            ]
          }
        }
      },
      "SupportHistoryFinding": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "event_id",
          "uncertainty",
          "code",
          "category",
          "certainty"
        ],
        "properties": {
          "event_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "uncertainty": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "code": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "success",
              "credential",
              "second_factor",
              "pre_credential",
              "policy",
              "technical",
              "flow_state",
              "client_request",
              "unknown"
            ]
          },
          "certainty": {
            "type": "string",
            "enum": [
              "observed",
              "uncertain"
            ]
          }
        }
      },
      "SupportHistoryDecision": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "brute_force_bucket",
          "brute_force_tolerated",
          "answered_status_code",
          "answered_status_message",
          "decision_sources",
          "operation",
          "outcome",
          "outcome_stage",
          "outcome_marker",
          "response_marker",
          "policy_rule",
          "tempfail_reason",
          "tempfail_checkpoint",
          "policy_status",
          "fsm_state"
        ],
        "properties": {
          "brute_force_bucket": {
            "type": [
              "string",
              "null"
            ]
          },
          "brute_force_tolerated": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "answered_status_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Stored host status code selected for the sealed terminal decision (logins.http_status: the configured OK/Fail/InternalError code; 200 for nginx-style answers, also for rejections). It is not the committed transport status (context.transport_status) and never a result: read outcome. Null when no terminal decision was sealed."
          },
          "answered_status_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stored status text the host answered the authentication caller with (logins.status_msg). IdP browser pages render their own localized text, so this is not necessarily what a user saw. Null when no terminal decision was sealed, and in the support projection on events whose identity is redacted."
          },
          "decision_sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "operation": {
            "type": "string"
          },
          "outcome": {
            "type": "string"
          },
          "outcome_stage": {
            "type": "string"
          },
          "outcome_marker": {
            "type": "string"
          },
          "response_marker": {
            "type": "string"
          },
          "policy_rule": {
            "type": "string"
          },
          "tempfail_reason": {
            "type": "string"
          },
          "tempfail_checkpoint": {
            "type": "string"
          },
          "policy_status": {
            "type": "string"
          },
          "fsm_state": {
            "type": "string"
          }
        }
      },
      "SupportHistoryFactor": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "result",
          "reason",
          "flow_effect",
          "fail_latched"
        ],
        "properties": {
          "result": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "flow_effect": {
            "type": "string"
          },
          "fail_latched": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryReputationAssessment": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "risk_score",
          "trust_score",
          "confidence",
          "samples",
          "source_diversity",
          "age_seconds",
          "fact",
          "role",
          "kind",
          "state",
          "profile",
          "band",
          "override"
        ],
        "properties": {
          "risk_score": {
            "type": [
              "number",
              "null"
            ]
          },
          "trust_score": {
            "type": [
              "number",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "samples": {
            "type": [
              "number",
              "null"
            ]
          },
          "source_diversity": {
            "type": [
              "integer",
              "null"
            ]
          },
          "age_seconds": {
            "type": [
              "integer",
              "null"
            ]
          },
          "fact": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "profile": {
            "type": "string"
          },
          "band": {
            "type": "string"
          },
          "override": {
            "type": "string"
          }
        }
      },
      "SupportHistoryReputation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "assessments",
          "state",
          "truncated"
        ],
        "properties": {
          "assessments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryReputationAssessment"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "recorded",
              "none_recorded",
              "legacy_not_projected"
            ]
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryEventIdentity": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "supplied_login",
          "canonical_account",
          "account_found_at_capture",
          "matched_by",
          "subject_match",
          "redacted"
        ],
        "properties": {
          "supplied_login": {
            "type": [
              "string",
              "null"
            ]
          },
          "canonical_account": {
            "type": [
              "string",
              "null"
            ]
          },
          "account_found_at_capture": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "matched_by": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject_match": {
            "type": "boolean"
          },
          "redacted": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryEventContext": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "client_ip",
          "protocol",
          "service",
          "oidc_client_id",
          "saml_entity_id",
          "grant_type",
          "transport",
          "transport_status"
        ],
        "properties": {
          "client_ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocol": {
            "type": [
              "string",
              "null"
            ]
          },
          "service": {
            "type": [
              "string",
              "null"
            ]
          },
          "oidc_client_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "saml_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "grant_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "transport": {
            "type": [
              "string",
              "null"
            ]
          },
          "transport_status": {
            "type": [
              "integer",
              "null"
            ]
          }
        }
      },
      "SupportHistoryEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "occurred_at",
          "event_id",
          "factor_role",
          "method",
          "decision",
          "factor",
          "reputation",
          "identity",
          "context",
          "source",
          "request_id",
          "instance",
          "stage",
          "result",
          "code",
          "category",
          "sequence",
          "record_version"
        ],
        "properties": {
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "factor_role": {
            "type": [
              "string",
              "null"
            ]
          },
          "method": {
            "type": [
              "string",
              "null"
            ]
          },
          "decision": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SupportHistoryDecision"
              },
              {
                "type": "null"
              }
            ]
          },
          "factor": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SupportHistoryFactor"
              },
              {
                "type": "null"
              }
            ]
          },
          "reputation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SupportHistoryReputation"
              },
              {
                "type": "null"
              }
            ]
          },
          "identity": {
            "$ref": "#/components/schemas/SupportHistoryEventIdentity"
          },
          "context": {
            "$ref": "#/components/schemas/SupportHistoryEventContext"
          },
          "source": {
            "type": "string",
            "enum": [
              "logins",
              "auth_events"
            ]
          },
          "request_id": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "stage": {
            "type": "string",
            "enum": [
              "primary_authentication",
              "second_factor",
              "pre_credential",
              "legacy",
              "authorization",
              "token_exchange",
              "unclassified"
            ]
          },
          "result": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "sequence": {
            "type": "integer"
          },
          "record_version": {
            "type": "integer"
          }
        }
      },
      "SupportHistoryAttempt": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "started_at",
          "last_observed_at",
          "completion",
          "findings",
          "events",
          "recording",
          "steps",
          "attempt_id",
          "kind",
          "projection",
          "outcome",
          "outcome_basis",
          "progress",
          "final_outcome_observed"
        ],
        "properties": {
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "completion": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SupportHistoryCompletion"
              },
              {
                "type": "null"
              }
            ]
          },
          "findings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryFinding"
            }
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryEvent"
            }
          },
          "recording": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "known_gaps",
              "replayed_rows_merged",
              "legacy_rows",
              "events_truncated",
              "events_withheld"
            ],
            "properties": {
              "known_gaps": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "replayed_rows_merged": {
                "type": "integer"
              },
              "legacy_rows": {
                "type": "integer"
              },
              "events_truncated": {
                "type": "boolean"
              },
              "events_withheld": {
                "type": "boolean"
              }
            }
          },
          "steps": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "primary",
              "second_factor",
              "code_issuance",
              "code_redemption"
            ],
            "properties": {
              "primary": {
                "type": "string",
                "enum": [
                  "recorded",
                  "not_recorded",
                  "session_reused"
                ],
                "description": "session_reused marks an OIDC flow that /authorize started for an already authenticated session; no primary step happened in it."
              },
              "second_factor": {
                "type": "string",
                "enum": [
                  "recorded",
                  "not_recorded",
                  "withheld",
                  "not_applicable"
                ],
                "x-enum-varnames": [
                  "SupportHistorySecondFactorStepRecorded",
                  "SupportHistorySecondFactorStepNotRecorded",
                  "SupportHistorySecondFactorStepWithheld",
                  "SupportHistorySecondFactorStepNotApplicable"
                ]
              },
              "code_issuance": {
                "type": "string",
                "enum": [
                  "recorded",
                  "not_recorded",
                  "not_applicable"
                ],
                "x-enum-varnames": [
                  "SupportHistoryCodeIssuanceStepRecorded",
                  "SupportHistoryCodeIssuanceStepNotRecorded",
                  "SupportHistoryCodeIssuanceStepNotApplicable"
                ]
              },
              "code_redemption": {
                "type": "string",
                "enum": [
                  "recorded",
                  "not_recorded",
                  "not_applicable"
                ],
                "x-enum-varnames": [
                  "SupportHistoryCodeRedemptionStepRecorded",
                  "SupportHistoryCodeRedemptionStepNotRecorded",
                  "SupportHistoryCodeRedemptionStepNotApplicable"
                ]
              }
            }
          },
          "attempt_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "flow",
              "request"
            ]
          },
          "projection": {
            "type": "string",
            "enum": [
              "support",
              "detail"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "succeeded",
              "rejected",
              "technical_error",
              "not_observed",
              "unknown"
            ]
          },
          "outcome_basis": {
            "type": "string",
            "enum": [
              "request_terminal_answer",
              "primary_failure_latched",
              "primary_failure_kept",
              "none",
              "legacy",
              "oidc_tokens_issued",
              "oidc_code_redemption_rejected",
              "oidc_code_redemption_failed"
            ],
            "description": "The recorded evidence of the outcome. outcome never names a cause: oidc_code_redemption_rejected after a successful login is a rejected token request of the client, not a credential failure. Show outcome_basis and the findings together with outcome."
          },
          "progress": {
            "type": "string",
            "enum": [
              "none",
              "technical_error",
              "pre_credential_rejected",
              "primary_rejected",
              "primary_succeeded",
              "second_factor_completed",
              "primary_failure_latched",
              "authorization_code_issued",
              "tokens_issued"
            ]
          },
          "final_outcome_observed": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryCompletion": {
        "type": "object",
        "additionalProperties": false,
        "description": "Recorded OIDC authorization-code completion of one flow. Nauthilus's part ends with the token response for the flow's code (state tokens_issued); a relying-party session after it is never observed. Only authorization-code flows carry this block; SAML, device-code, flows without grant evidence, and latched flows (decided by the latch) have none.",
        "required": [
          "code_issued_at",
          "code_redeemable_until",
          "redemption_observed_at",
          "scope",
          "state",
          "authentication"
        ],
        "properties": {
          "code_issued_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "code_redeemable_until": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Latest instant the issued code could be redeemed (event contract version lifetime); null without issuance or for an unknown version."
          },
          "redemption_observed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "scope": {
            "type": "string",
            "const": "oidc_authorization_code"
          },
          "state": {
            "type": "string",
            "enum": [
              "tokens_issued",
              "redemption_rejected",
              "redemption_failed",
              "redemption_pending",
              "code_expired_redemption_not_observed",
              "code_issuance_not_observed",
              "not_recorded",
              "unknown"
            ],
            "description": "tokens_issued, redemption_rejected, and redemption_failed are observed and final. redemption_pending: the code may still be redeemed or its redemption still be exported. code_expired_redemption_not_observed: the code can no longer be redeemed and no redemption was observed; an event may have been dropped, so it never proves an abort. code_issuance_not_observed: recording was active, but neither issuance nor redemption was observed. not_recorded: the flow predates completion recording. unknown: evidence was unreadable, truncated, conflicting, or unclassified."
          },
          "authentication": {
            "type": "string",
            "enum": [
              "authenticated_in_flow",
              "existing_session",
              "not_recorded",
              "unknown"
            ],
            "description": "How the flow got its authenticated identity, as recorded with the code issuance; unknown without an observed issuance."
          }
        }
      },
      "SupportHistoryAttemptSearchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "queried_at",
          "history",
          "subject_resolution",
          "attempts",
          "page",
          "schema_version",
          "result_basis"
        ],
        "properties": {
          "queried_at": {
            "type": "string",
            "format": "date-time"
          },
          "history": {
            "$ref": "#/components/schemas/SupportHistoryCoverage"
          },
          "subject_resolution": {
            "$ref": "#/components/schemas/SupportHistorySubjectResolution"
          },
          "attempts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryAttempt"
            }
          },
          "page": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "scanned_until",
              "next_cursor",
              "limit"
            ],
            "properties": {
              "scanned_until": {
                "type": "string",
                "format": "date-time",
                "description": "The search covered (scanned_until, until) completely; attempts anchored exactly at scanned_until can follow on the next page."
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "limit": {
                "type": "integer"
              }
            }
          },
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "result_basis": {
            "$ref": "#/components/schemas/SupportHistoryResultBasis"
          },
          "response_mode": {
            "$ref": "#/components/schemas/SupportHistoryResponseMode",
            "description": "Present only when the request named response_mode; compact answers carry an empty attempts list."
          },
          "attempt_summaries": {
            "type": "array",
            "description": "Present only in compact mode; one summary per found attempt, in the order of attempts.",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryAttemptSummary"
            }
          },
          "ban_contexts": {
            "type": "array",
            "description": "Present only with include_ban_context; one entry per brute-force rejected subject request of the page.",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryBanContext"
            }
          },
          "ban_history": {
            "$ref": "#/components/schemas/SupportHistoryCoverage",
            "description": "Present only with include_ban_context when brute-force evidence is configured; coverage of the brute-force sources."
          }
        }
      },
      "SupportHistoryAttemptDetailResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "queried_at",
          "attempt",
          "subject_resolution",
          "history",
          "schema_version",
          "result_basis"
        ],
        "properties": {
          "queried_at": {
            "type": "string",
            "format": "date-time"
          },
          "attempt": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SupportHistoryAttempt"
              },
              {
                "type": "null"
              }
            ]
          },
          "subject_resolution": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SupportHistorySubjectResolution"
              },
              {
                "type": "null"
              }
            ]
          },
          "history": {
            "$ref": "#/components/schemas/SupportHistoryCoverage"
          },
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "result_basis": {
            "$ref": "#/components/schemas/SupportHistoryResultBasis"
          }
        }
      },
      "SupportHistoryActivation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "at",
          "bucket_id",
          "window_index",
          "window_current",
          "window_previous",
          "total",
          "effective_limit",
          "planned_end",
          "kind",
          "rule",
          "stored_rule",
          "rule_fingerprint",
          "instance",
          "activating_request",
          "period_seconds",
          "ban_time_seconds",
          "failed_requests"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "bucket_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "window_index": {
            "type": [
              "integer",
              "null"
            ]
          },
          "window_current": {
            "type": [
              "integer",
              "null"
            ]
          },
          "window_previous": {
            "type": [
              "integer",
              "null"
            ]
          },
          "total": {
            "type": [
              "number",
              "null"
            ]
          },
          "effective_limit": {
            "type": [
              "number",
              "null"
            ]
          },
          "planned_end": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ban_activated",
              "ban_activation_unconfirmed"
            ]
          },
          "rule": {
            "type": "string"
          },
          "stored_rule": {
            "type": "string"
          },
          "rule_fingerprint": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "activating_request": {
            "type": "string",
            "const": "NOT_A_CULPRIT"
          },
          "period_seconds": {
            "type": "integer"
          },
          "ban_time_seconds": {
            "type": "integer"
          },
          "failed_requests": {
            "type": "integer"
          }
        }
      },
      "SupportHistoryWindowStatus": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "expected",
          "present",
          "window",
          "status",
          "evidence",
          "window_index",
          "counts_are_upper_bounds",
          "summary_check_unreliable"
        ],
        "properties": {
          "expected": {
            "type": [
              "integer",
              "null"
            ]
          },
          "present": {
            "type": [
              "integer",
              "null"
            ]
          },
          "window": {
            "type": "string",
            "enum": [
              "activation_window",
              "previous_window"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "loss_detected",
              "aggregate_only",
              "expired",
              "not_applicable"
            ],
            "x-enum-varnames": [
              "SupportHistoryContributionStatusComplete",
              "SupportHistoryContributionStatusLossDetected",
              "SupportHistoryContributionStatusAggregateOnly",
              "SupportHistoryContributionStatusExpired",
              "SupportHistoryContributionStatusNotApplicable"
            ]
          },
          "evidence": {
            "type": "string",
            "enum": [
              "raw",
              "summary",
              "not_read",
              "not_assessed"
            ]
          },
          "window_index": {
            "type": "integer"
          },
          "counts_are_upper_bounds": {
            "type": "boolean"
          },
          "summary_check_unreliable": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryContribution": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "at",
          "window_index",
          "window_current",
          "crossed",
          "account_known",
          "claimed_username",
          "account",
          "client_ip",
          "subject_match",
          "event_id",
          "request_id",
          "count_source",
          "protocol",
          "redacted"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "window_index": {
            "type": [
              "integer",
              "null"
            ]
          },
          "window_current": {
            "type": [
              "integer",
              "null"
            ]
          },
          "crossed": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "account_known": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "claimed_username": {
            "type": [
              "string",
              "null"
            ]
          },
          "account": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "subject_match": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "event_id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "count_source": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "redacted": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryContributions": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "crossing_candidate",
          "distinct_claimed_names",
          "windows",
          "items",
          "caveats",
          "status",
          "truncated"
        ],
        "properties": {
          "crossing_candidate": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "at",
                  "window_current",
                  "event_id",
                  "basis"
                ],
                "properties": {
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "window_current": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  },
                  "event_id": {
                    "type": "string"
                  },
                  "basis": {
                    "type": "string",
                    "const": "heuristic_crossed_flag"
                  }
                }
              },
              {
                "type": "null"
              }
            ]
          },
          "distinct_claimed_names": {
            "type": [
              "integer",
              "null"
            ]
          },
          "windows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryWindowStatus"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryContribution"
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "loss_detected",
              "aggregate_only",
              "expired",
              "not_applicable"
            ],
            "x-enum-varnames": [
              "SupportHistoryContributionsStatusComplete",
              "SupportHistoryContributionsStatusLossDetected",
              "SupportHistoryContributionsStatusAggregateOnly",
              "SupportHistoryContributionsStatusExpired",
              "SupportHistoryContributionsStatusNotApplicable"
            ]
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryHitSummary": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "by_source",
          "distinct_claimed_names",
          "subject_hits",
          "claimants",
          "evidence",
          "count",
          "count_is_upper_bound",
          "interval_approximate"
        ],
        "properties": {
          "by_source": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "distinct_claimed_names": {
            "type": [
              "integer",
              "null"
            ]
          },
          "subject_hits": {
            "type": [
              "integer",
              "null"
            ]
          },
          "claimants": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "claimed_username",
                "account",
                "hits"
              ],
              "properties": {
                "claimed_username": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "account": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "hits": {
                  "type": "integer"
                }
              }
            }
          },
          "evidence": {
            "type": "string",
            "enum": [
              "raw",
              "summary",
              "not_read",
              "not_assessed"
            ]
          },
          "count": {
            "type": "integer"
          },
          "count_is_upper_bound": {
            "type": "boolean"
          },
          "interval_approximate": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryBan": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "activation",
          "end",
          "contributions",
          "hits",
          "unknowns",
          "ban_ref",
          "network"
        ],
        "properties": {
          "activation": {
            "$ref": "#/components/schemas/SupportHistoryActivation"
          },
          "end": {
            "$ref": "#/components/schemas/SupportHistoryBanEnd"
          },
          "contributions": {
            "$ref": "#/components/schemas/SupportHistoryContributions"
          },
          "hits": {
            "$ref": "#/components/schemas/SupportHistoryHitSummary"
          },
          "unknowns": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ban_ref": {
            "type": "string"
          },
          "network": {
            "type": "string"
          }
        }
      },
      "SupportHistoryBanEnd": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "at",
          "release_source",
          "reason"
        ],
        "description": "How a ban instance ended as far as recorded. Only released is a recorded end; planned ends are relative to the window end, which is queried_at for ban contexts.",
        "properties": {
          "at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "release_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "type": "string",
            "enum": [
              "released",
              "superseded_by_new_activation",
              "planned_end_passed_unconfirmed",
              "planned_end_after_window",
              "unknown"
            ],
            "x-enum-varnames": [
              "SupportHistoryBanEndReasonReleased",
              "SupportHistoryBanEndReasonSupersededByNewActivation",
              "SupportHistoryBanEndReasonPlannedEndPassedUnconfirmed",
              "SupportHistoryBanEndReasonPlannedEndAfterWindow",
              "SupportHistoryBanEndReasonUnknown"
            ]
          }
        }
      },
      "SupportHistoryLifecycleEvent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "at",
          "bucket_id",
          "release_source",
          "operator_client_id",
          "keys_removed",
          "event_id",
          "kind",
          "network",
          "rule"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "bucket_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "release_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "operator_client_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Released to the detail projection only."
          },
          "keys_removed": {
            "type": [
              "integer",
              "null"
            ]
          },
          "event_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "ban_activation_unconfirmed",
              "ban_released",
              "counters_reset"
            ]
          },
          "network": {
            "type": "string"
          },
          "rule": {
            "type": "string"
          }
        }
      },
      "SupportHistoryBanSearchResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "queried_at",
          "history",
          "target",
          "bans",
          "orphan_hits",
          "threshold_tolerated",
          "unconfirmed_activations",
          "releases",
          "counter_resets",
          "page",
          "projection",
          "schema_version",
          "result_basis"
        ],
        "properties": {
          "queried_at": {
            "type": "string",
            "format": "date-time"
          },
          "history": {
            "$ref": "#/components/schemas/SupportHistoryCoverage"
          },
          "target": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "ip",
              "candidate_networks"
            ],
            "properties": {
              "ip": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "candidate_networks": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "bans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryBan"
            }
          },
          "orphan_hits": {
            "$ref": "#/components/schemas/SupportHistoryHitSummary"
          },
          "threshold_tolerated": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "evidence",
              "count",
              "count_is_upper_bound"
            ],
            "properties": {
              "evidence": {
                "type": "string",
                "enum": [
                  "raw",
                  "summary",
                  "not_read",
                  "not_assessed"
                ]
              },
              "count": {
                "type": "integer"
              },
              "count_is_upper_bound": {
                "type": "boolean"
              }
            }
          },
          "unconfirmed_activations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryLifecycleEvent"
            }
          },
          "releases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryLifecycleEvent"
            }
          },
          "counter_resets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryLifecycleEvent"
            }
          },
          "page": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "next_cursor",
              "limit"
            ],
            "properties": {
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "limit": {
                "type": "integer"
              }
            }
          },
          "projection": {
            "type": "string",
            "enum": [
              "support",
              "detail"
            ]
          },
          "schema_version": {
            "type": "string",
            "pattern": "^1$"
          },
          "result_basis": {
            "$ref": "#/components/schemas/SupportHistoryResultBasis"
          }
        }
      },
      "SupportHistoryResponseMode": {
        "type": "string",
        "enum": [
          "detailed",
          "compact"
        ],
        "x-enum-varnames": [
          "SupportHistoryResponseModeDetailed",
          "SupportHistoryResponseModeCompact"
        ]
      },
      "SupportHistoryAttemptSummary": {
        "type": "object",
        "additionalProperties": false,
        "description": "Compact form of one attempt, built from the same projection as the detailed attempt.",
        "required": [
          "started_at",
          "last_observed_at",
          "reason",
          "detail",
          "finding_codes",
          "client_ips",
          "protocols",
          "request_ids",
          "known_gaps",
          "attempt_id",
          "kind",
          "outcome",
          "outcome_basis",
          "progress",
          "final_outcome_observed",
          "events_truncated",
          "events_withheld"
        ],
        "properties": {
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_observed_at": {
            "type": "string",
            "format": "date-time"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Code of the last finding of an attempt that did not succeed, for example REJECTED_BY_BRUTE_FORCE_PROTECTION; null otherwise."
          },
          "detail": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "attempt_id",
              "around"
            ],
            "description": "Arguments of authentication_attempt_detail for this attempt.",
            "properties": {
              "attempt_id": {
                "type": "string"
              },
              "around": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "finding_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "client_ips": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Client addresses of the subject's rows."
          },
          "protocols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "request_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Request ids of the subject's login rows."
          },
          "known_gaps": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attempt_id": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "enum": [
              "flow",
              "request"
            ],
            "x-enum-varnames": [
              "SupportHistorySummaryKindFlow",
              "SupportHistorySummaryKindRequest"
            ]
          },
          "outcome": {
            "type": "string"
          },
          "outcome_basis": {
            "type": "string"
          },
          "progress": {
            "type": "string"
          },
          "final_outcome_observed": {
            "type": "boolean"
          },
          "events_truncated": {
            "type": "boolean"
          },
          "events_withheld": {
            "type": "boolean"
          }
        }
      },
      "SupportHistorySubjectContribution": {
        "type": "object",
        "additionalProperties": false,
        "description": "One counted increment recorded under the subject's account or login claim (its own data).",
        "required": [
          "at",
          "window_index",
          "window_current",
          "ban_active",
          "attempt_id",
          "event_id",
          "request_id",
          "count_source",
          "protocol",
          "matched_by"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "window_index": {
            "type": [
              "integer",
              "null"
            ]
          },
          "window_current": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ban_active": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "The increment was counted while a ban was active."
          },
          "attempt_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The attempt of this page the request belongs to, if any."
          },
          "event_id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "count_source": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "matched_by": {
            "type": "string",
            "enum": [
              "recorded_account",
              "login_claim"
            ],
            "x-enum-varnames": [
              "SupportHistoryMatchedByRecordedAccount",
              "SupportHistoryMatchedByLoginClaim"
            ],
            "description": "login_claim only means the same login name was typed; it cannot tell the customer from anybody else."
          }
        }
      },
      "SupportHistoryBanAttribution": {
        "type": "object",
        "additionalProperties": false,
        "description": "Under which accounts the listed contributions of one ban were recorded; never who caused the ban. Codes are computed on unredacted rows, so hidden identities never make an answer look exclusive.",
        "required": [
          "contributing_accounts",
          "subject_contributions",
          "counts",
          "code",
          "other_contributors",
          "person_attribution",
          "identities_redacted",
          "subject_contributions_truncated"
        ],
        "properties": {
          "contributing_accounts": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Distinct recorded accounts of the listed contributions; null unless the caller has history_detail."
          },
          "subject_contributions": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "$ref": "#/components/schemas/SupportHistorySubjectContribution"
            }
          },
          "counts": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "listed",
              "subject_by_account",
              "subject_by_login_claim",
              "other_accounts",
              "distinct_other_accounts",
              "no_account",
              "unresolved",
              "counted_while_banned"
            ],
            "properties": {
              "listed": {
                "type": "integer"
              },
              "subject_by_account": {
                "type": "integer"
              },
              "subject_by_login_claim": {
                "type": "integer"
              },
              "other_accounts": {
                "type": "integer"
              },
              "distinct_other_accounts": {
                "type": "integer"
              },
              "no_account": {
                "type": "integer",
                "description": "Claims that resolved to no account at capture time (often typos)."
              },
              "unresolved": {
                "type": "integer",
                "description": "Claims whose account was not recorded; aliases of the subject can hide here."
              },
              "counted_while_banned": {
                "type": "integer"
              }
            }
          },
          "code": {
            "type": "string",
            "enum": [
              "SUBJECT_ACCOUNT",
              "MULTIPLE_ACCOUNTS",
              "OTHER_ACCOUNTS_ONLY",
              "NOT_SUFFICIENTLY_ATTRIBUTABLE"
            ],
            "x-enum-varnames": [
              "SupportHistoryAttributionSubjectAccount",
              "SupportHistoryAttributionMultipleAccounts",
              "SupportHistoryAttributionOtherAccountsOnly",
              "SupportHistoryAttributionNotSufficientlyAttributable"
            ],
            "description": "SUBJECT_ACCOUNT: contributions recorded under the requested account (a recorded account, never only the same login name), exclusive only with other_contributors none_observed. MULTIPLE_ACCOUNTS: under the requested and another recorded account. OTHER_ACCOUNTS_ONLY: only other recorded accounts with complete evidence and no unresolved, account-less, or subject-name claim. Otherwise NOT_SUFFICIENTLY_ATTRIBUTABLE."
          },
          "other_contributors": {
            "type": "string",
            "enum": [
              "observed",
              "none_observed",
              "unknown"
            ],
            "x-enum-varnames": [
              "SupportHistoryOtherContributorsObserved",
              "SupportHistoryOtherContributorsNoneObserved",
              "SupportHistoryOtherContributorsUnknown"
            ]
          },
          "person_attribution": {
            "type": "string",
            "const": "NOT_ESTABLISHED"
          },
          "identities_redacted": {
            "type": "boolean"
          },
          "subject_contributions_truncated": {
            "type": "boolean"
          }
        }
      },
      "SupportHistoryBanEvidence": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "completeness",
          "limitations"
        ],
        "properties": {
          "completeness": {
            "type": "string",
            "enum": [
              "complete",
              "aggregate_only",
              "loss_detected",
              "expired",
              "not_applicable",
              "not_read"
            ],
            "x-enum-varnames": [
              "SupportHistoryBanEvidenceComplete",
              "SupportHistoryBanEvidenceAggregateOnly",
              "SupportHistoryBanEvidenceLossDetected",
              "SupportHistoryBanEvidenceExpired",
              "SupportHistoryBanEvidenceNotApplicable",
              "SupportHistoryBanEvidenceNotRead"
            ],
            "description": "Coverage of the contributions only; never evidence of a responsible person, NAT, or VPN."
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Stable codes: ban unknowns, caveats, and attribution limits."
          }
        }
      },
      "SupportHistoryBanContextBan": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "activated_at",
          "planned_end",
          "detail",
          "attribution",
          "evidence",
          "end",
          "ban_history",
          "ban_ref",
          "network",
          "scope",
          "rule",
          "activation_reason",
          "subject_relation"
        ],
        "properties": {
          "activated_at": {
            "type": "string",
            "format": "date-time"
          },
          "planned_end": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "detail": {
            "description": "The full ban explanation of bruteforce_history in detailed mode; null in compact mode.",
            "oneOf": [
              {
                "$ref": "#/components/schemas/SupportHistoryBan"
              },
              {
                "type": "null"
              }
            ]
          },
          "attribution": {
            "$ref": "#/components/schemas/SupportHistoryBanAttribution"
          },
          "evidence": {
            "$ref": "#/components/schemas/SupportHistoryBanEvidence"
          },
          "end": {
            "$ref": "#/components/schemas/SupportHistoryBanEnd"
          },
          "ban_history": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "from",
              "until",
              "ban_ref",
              "network"
            ],
            "description": "Arguments of bruteforce_history that explain this ban instance.",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "until": {
                "type": "string",
                "format": "date-time"
              },
              "ban_ref": {
                "type": "string"
              },
              "network": {
                "type": "string"
              }
            }
          },
          "ban_ref": {
            "type": "string"
          },
          "network": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "enum": [
              "ip",
              "network"
            ],
            "x-enum-varnames": [
              "SupportHistoryBanScopeIP",
              "SupportHistoryBanScopeNetwork"
            ]
          },
          "rule": {
            "type": "string"
          },
          "activation_reason": {
            "type": "string",
            "enum": [
              "FAILURE_THRESHOLD_EXCEEDED",
              "ACTIVATION_UNCONFIRMED"
            ],
            "x-enum-varnames": [
              "SupportHistoryActivationThresholdExceeded",
              "SupportHistoryActivationUnconfirmed"
            ]
          },
          "subject_relation": {
            "type": "string",
            "enum": [
              "ACTIVATING_REQUEST",
              "ACTIVATION_UNCONFIRMED",
              "HIT_EXISTING_BAN",
              "ACTIVATION_RACE",
              "INTERVAL_OVERLAP"
            ],
            "x-enum-varnames": [
              "SupportHistoryRelationActivatingRequest",
              "SupportHistoryRelationActivationUnconfirmed",
              "SupportHistoryRelationHitExistingBan",
              "SupportHistoryRelationActivationRace",
              "SupportHistoryRelationIntervalOverlap"
            ],
            "description": "How the request relates to the ban; the activating request is never a culprit."
          }
        }
      },
      "SupportHistoryBanContext": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "at",
          "client_ip",
          "bans",
          "limitations",
          "attempt_id",
          "request_id",
          "reason",
          "status"
        ],
        "properties": {
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "client_ip": {
            "type": [
              "string",
              "null"
            ]
          },
          "bans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportHistoryBanContextBan"
            }
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "attempt_id": {
            "type": "string"
          },
          "request_id": {
            "type": "string"
          },
          "reason": {
            "type": "string",
            "const": "REJECTED_BY_BRUTE_FORCE_PROTECTION"
          },
          "status": {
            "type": "string",
            "enum": [
              "matched",
              "overlap_only",
              "no_recorded_ban",
              "not_evaluated"
            ],
            "x-enum-varnames": [
              "SupportHistoryBanContextMatched",
              "SupportHistoryBanContextOverlapOnly",
              "SupportHistoryBanContextNoRecordedBan",
              "SupportHistoryBanContextNotEvaluated"
            ],
            "description": "matched: linked by a recorded hit or activation; overlap_only: only by the ban interval; several bans are all listed, never one picked."
          }
        }
      },
      "ReputationAllocationRequest": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "action"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "status"
                ]
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "action",
              "reason",
              "origin",
              "audit_id"
            ],
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "drain"
                ]
              },
              "reason": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
              },
              "origin": {
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
              },
              "audit_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              }
            }
          }
        ]
      },
      "ReputationAllocationView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "mode",
          "generation",
          "next_generation",
          "fenced_shards",
          "drained_at",
          "retention",
          "observed_at"
        ],
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "active",
              "draining"
            ]
          },
          "generation": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          },
          "next_generation": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000001
          },
          "fenced_shards": {
            "type": "integer",
            "minimum": 0,
            "maximum": 16
          },
          "drained_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          },
          "retention": {
            "type": "number",
            "minimum": 1,
            "maximum": 31536000
          },
          "observed_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          },
          "audit": {
            "$ref": "#/components/schemas/ReputationAllocationAudit"
          }
        }
      },
      "ReputationAllocationAudit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "reason",
          "origin",
          "audit_id",
          "creator"
        ],
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "origin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "audit_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "creator": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        }
      },
      "ReputationLookupRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "subject"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "ip",
              "network",
              "asn",
              "dns_domain",
              "account",
              "service"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          }
        }
      },
      "ReputationOverridePutRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "subject",
          "reason",
          "audit_id",
          "origin",
          "band",
          "ttl_seconds"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "ip",
              "network",
              "asn",
              "dns_domain",
              "account",
              "service"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "audit_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "origin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "previous_audit": {
            "type": "string",
            "maxLength": 128
          },
          "slot": {
            "type": "string",
            "enum": [
              "active",
              "previous"
            ],
            "default": "active"
          },
          "band": {
            "type": "string",
            "enum": [
              "blocked",
              "trusted",
              "neutral"
            ]
          },
          "ttl_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 31536000
          }
        }
      },
      "ReputationOverrideDeleteRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "subject",
          "reason",
          "audit_id",
          "origin",
          "previous_audit"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "ip",
              "network",
              "asn",
              "dns_domain",
              "account",
              "service"
            ]
          },
          "subject": {
            "type": "string",
            "minLength": 1,
            "maxLength": 512
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "audit_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "origin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "previous_audit": {
            "type": "string",
            "maxLength": 128
          },
          "slot": {
            "type": "string",
            "enum": [
              "active",
              "previous"
            ],
            "default": "active"
          }
        }
      },
      "ReputationAudit": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "kind",
          "operation",
          "reason",
          "creator",
          "audit_id",
          "previous_audit",
          "origin",
          "created_at"
        ],
        "properties": {
          "schema": {
            "type": "string",
            "enum": [
              "reputation-operator-audit.v1"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "ip",
              "network",
              "asn",
              "dns_domain",
              "account",
              "service"
            ]
          },
          "operation": {
            "type": "string",
            "enum": [
              "override_put",
              "override_delete"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "creator": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "audit_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "previous_audit": {
            "type": "string",
            "maxLength": 128
          },
          "origin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "created_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          }
        }
      },
      "ReputationOverride": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "band",
          "reason",
          "creator",
          "audit_id",
          "origin",
          "created_at",
          "expires_at"
        ],
        "properties": {
          "band": {
            "type": "string",
            "enum": [
              "blocked",
              "trusted",
              "neutral"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "creator": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "audit_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "origin": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "created_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          },
          "expires_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          }
        }
      },
      "ReputationScores": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "risk_score",
          "trust_score",
          "confidence",
          "samples",
          "source_diversity",
          "age_seconds"
        ],
        "properties": {
          "risk_score": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "trust_score": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "confidence": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "samples": {
            "type": "number",
            "minimum": 0,
            "maximum": 8000000
          },
          "source_diversity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 8
          },
          "age_seconds": {
            "type": "integer",
            "format": "int64",
            "minimum": 0,
            "maximum": 100000000000
          }
        }
      },
      "ReputationProfile": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "state",
          "band",
          "override"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "fresh",
              "not_found"
            ]
          },
          "band": {
            "type": "string",
            "enum": [
              "unknown",
              "trusted",
              "positive",
              "neutral",
              "suspicious",
              "blocked"
            ]
          },
          "override": {
            "type": "string",
            "enum": [
              "none",
              "trusted",
              "neutral",
              "blocked"
            ]
          },
          "details": {
            "$ref": "#/components/schemas/ReputationScores"
          }
        }
      },
      "ReputationSourceClasses": {
        "type": "object",
        "additionalProperties": false,
        "required": [],
        "properties": {
          "fast": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
            }
          },
          "operational": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
            }
          },
          "baseline": {
            "type": "array",
            "maxItems": 8,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
            }
          }
        }
      },
      "ReputationEvidence": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "kind",
          "slot",
          "state",
          "source_classes",
          "observed_at",
          "updated_at",
          "risk_at",
          "trust_at",
          "authoritative_at"
        ],
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "ip",
              "network",
              "asn",
              "dns_domain",
              "account",
              "service"
            ]
          },
          "slot": {
            "type": "string",
            "enum": [
              "active",
              "previous"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "fresh",
              "not_found"
            ]
          },
          "source_classes": {
            "$ref": "#/components/schemas/ReputationSourceClasses"
          },
          "override": {
            "$ref": "#/components/schemas/ReputationOverride"
          },
          "last_change": {
            "$ref": "#/components/schemas/ReputationAudit"
          },
          "observed_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          },
          "updated_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          },
          "risk_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          },
          "trust_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          },
          "authoritative_at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000000000
          }
        }
      },
      "ReputationView": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schema",
          "kind",
          "model_id",
          "model_revision",
          "config_revision",
          "profiles",
          "evidence"
        ],
        "properties": {
          "schema": {
            "type": "string",
            "enum": [
              "reputation-management.v1"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "ip",
              "network",
              "asn",
              "dns_domain",
              "account",
              "service"
            ]
          },
          "model_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[a-z][a-z0-9_.-]{0,63}$"
          },
          "model_revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "config_revision": {
            "type": "string",
            "pattern": "^[0-9a-f]{64}$"
          },
          "profiles": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "fast",
              "operational",
              "baseline"
            ],
            "properties": {
              "fast": {
                "$ref": "#/components/schemas/ReputationProfile"
              },
              "operational": {
                "$ref": "#/components/schemas/ReputationProfile"
              },
              "baseline": {
                "$ref": "#/components/schemas/ReputationProfile"
              }
            }
          },
          "evidence": {
            "type": "array",
            "minItems": 1,
            "maxItems": 4,
            "items": {
              "$ref": "#/components/schemas/ReputationEvidence"
            }
          },
          "verified_change": {
            "$ref": "#/components/schemas/ReputationAudit"
          }
        }
      },
      "ReputationManagementError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        }
      },
      "PolicyAdvice": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "parameters"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 512
          },
          "parameters": {
            "$ref": "#/components/schemas/PolicyResponseValueMap"
          }
        }
      },
      "PolicyDecisionRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "version",
          "target"
        ],
        "properties": {
          "version": {
            "type": "string",
            "enum": [
              "1"
            ]
          },
          "request_id": {
            "type": "string",
            "maxLength": 128
          },
          "target": {
            "$ref": "#/components/schemas/PolicyTarget"
          },
          "subject": {
            "$ref": "#/components/schemas/PolicyEntity"
          },
          "resource": {
            "$ref": "#/components/schemas/PolicyEntity"
          },
          "environment": {
            "$ref": "#/components/schemas/PolicyEnvironment"
          },
          "attributes": {
            "$ref": "#/components/schemas/PolicyValueMap"
          },
          "options": {
            "$ref": "#/components/schemas/PolicyEvaluationOptions"
          }
        }
      },
      "PolicyDecisionResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "request_id",
          "decision_id",
          "effect",
          "status"
        ],
        "properties": {
          "request_id": {
            "type": "string",
            "maxLength": 128
          },
          "decision_id": {
            "type": "string",
            "maxLength": 128
          },
          "effect": {
            "type": "string",
            "enum": [
              "permit",
              "deny",
              "not_applicable",
              "indeterminate"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/PolicyStatus"
          },
          "obligations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyObligation"
            }
          },
          "advice": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyAdvice"
            }
          },
          "diagnostics": {
            "$ref": "#/components/schemas/PolicyDiagnostics"
          }
        }
      },
      "PolicyDiagnostics": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "entries"
        ],
        "properties": {
          "entries": {
            "$ref": "#/components/schemas/PolicyResponseValueMap"
          }
        }
      },
      "PolicyEntity": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "maxLength": 512
          },
          "id": {
            "type": "string",
            "maxLength": 512
          },
          "attributes": {
            "$ref": "#/components/schemas/PolicyValueMap"
          }
        }
      },
      "PolicyEnvironment": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "service": {
            "type": "string",
            "maxLength": 512
          },
          "instance": {
            "type": "string",
            "maxLength": 512
          },
          "protocol": {
            "type": "string",
            "maxLength": 512
          },
          "attributes": {
            "$ref": "#/components/schemas/PolicyValueMap"
          }
        }
      },
      "PolicyError": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyValidationDetail"
            }
          }
        }
      },
      "PolicyEvaluationOptions": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "include_diagnostics": {
            "type": "boolean"
          }
        }
      },
      "PolicyObligation": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "parameters"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 512
          },
          "parameters": {
            "$ref": "#/components/schemas/PolicyResponseValueMap"
          }
        }
      },
      "PolicyStatus": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "code",
          "message",
          "retryable"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable result code. effect_outcome_unknown is non-retryable. effect_replay_unsafe is non-retryable because an earlier non-idempotent effect already completed or was accepted before a later failure. effect_outcome_unknown_replay_safe permits retrying the complete Policy request with unchanged admitted idempotency keys and payload. The host never retries an effect within one request."
          },
          "message": {
            "type": "string"
          },
          "retryable": {
            "type": "boolean",
            "description": "Whether the caller may retry; replay-safe unknown outcomes require the same complete request and idempotency keys."
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyValidationDetail"
            }
          }
        }
      },
      "PolicyTarget": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "namespace",
          "action"
        ],
        "properties": {
          "namespace": {
            "type": "string",
            "maxLength": 64
          },
          "action": {
            "type": "string",
            "maxLength": 64
          }
        }
      },
      "PolicyValidationDetail": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "field",
          "reason"
        ],
        "properties": {
          "field": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        }
      },
      "PolicyValue": {
        "type": "object",
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "string"
            ]
          },
          {
            "required": [
              "boolean"
            ]
          },
          {
            "required": [
              "integer"
            ]
          },
          {
            "required": [
              "double"
            ]
          },
          {
            "required": [
              "strings"
            ]
          },
          {
            "required": [
              "bytes"
            ]
          },
          {
            "required": [
              "timestamp"
            ]
          },
          {
            "required": [
              "records"
            ]
          }
        ],
        "properties": {
          "string": {
            "type": "string"
          },
          "boolean": {
            "type": "boolean"
          },
          "integer": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)$"
          },
          "double": {
            "type": "number",
            "format": "double"
          },
          "strings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bytes": {
            "type": "string",
            "contentEncoding": "base64"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "records": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyRecord"
            }
          }
        }
      },
      "PolicyRecord": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "fields"
        ],
        "properties": {
          "fields": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/PolicyRecordField"
            }
          }
        }
      },
      "PolicyRecordField": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "name",
          "value"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "value": {
            "$ref": "#/components/schemas/PolicyRecordFieldValue"
          }
        }
      },
      "PolicyRecordFieldValue": {
        "type": "object",
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "string"
            ]
          },
          {
            "required": [
              "boolean"
            ]
          },
          {
            "required": [
              "integer"
            ]
          },
          {
            "required": [
              "double"
            ]
          },
          {
            "required": [
              "strings"
            ]
          },
          {
            "required": [
              "bytes"
            ]
          },
          {
            "required": [
              "timestamp"
            ]
          }
        ],
        "properties": {
          "string": {
            "type": "string"
          },
          "boolean": {
            "type": "boolean"
          },
          "integer": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)$"
          },
          "double": {
            "type": "number",
            "format": "double"
          },
          "strings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "bytes": {
            "type": "string",
            "contentEncoding": "base64"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PolicyResponseValue": {
        "$ref": "#/components/schemas/PolicyRecordFieldValue"
      },
      "PolicyResponseValueMap": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/components/schemas/PolicyResponseValue"
        }
      },
      "PolicyValueMap": {
        "type": "object",
        "additionalProperties": {
          "$ref": "#/components/schemas/PolicyValue"
        }
      },
      "AccountList": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "AsyncAcceptedPayload": {
        "type": "object",
        "required": [
          "jobId",
          "status"
        ],
        "properties": {
          "jobId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "The initial state returned immediately after the job is accepted.",
            "enum": [
              "QUEUED"
            ],
            "x-enum-varnames": [
              "AsyncAcceptedStatusQueued"
            ]
          }
        }
      },
      "AsyncAcceptedResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ResultEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "$ref": "#/components/schemas/AsyncAcceptedPayload"
              }
            }
          }
        ]
      },
      "AsyncJobStatusPayload": {
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Current async job lifecycle state.",
            "enum": [
              "QUEUED",
              "INPROGRESS",
              "DONE",
              "ERROR"
            ],
            "x-enum-varnames": [
              "AsyncJobStatusQueued",
              "AsyncJobStatusInProgress",
              "AsyncJobStatusDone",
              "AsyncJobStatusError"
            ]
          },
          "type": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "startedAt": {
            "type": "string"
          },
          "finishedAt": {
            "type": "string"
          },
          "resultCount": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "AsyncJobStatusResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ResultEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "$ref": "#/components/schemas/AsyncJobStatusPayload"
              }
            }
          }
        ]
      },
      "AttributeMapping": {
        "type": "object",
        "additionalProperties": {
          "type": "array",
          "items": {}
        }
      },
      "AuthError": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "AuthRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "username"
        ],
        "properties": {
          "username": {
            "type": "string"
          },
          "password": {
            "type": "string",
            "format": "password"
          },
          "client_ip": {
            "type": "string"
          },
          "client_port": {
            "type": "string"
          },
          "client_hostname": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "external_session_id": {
            "type": "string"
          },
          "user_agent": {
            "type": "string"
          },
          "local_ip": {
            "type": "string"
          },
          "local_port": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "ssl": {
            "type": "string"
          },
          "ssl_session_id": {
            "type": "string"
          },
          "ssl_client_verify": {
            "type": "string"
          },
          "ssl_client_dn": {
            "type": "string"
          },
          "ssl_client_cn": {
            "type": "string"
          },
          "ssl_issuer": {
            "type": "string"
          },
          "ssl_client_notbefore": {
            "type": "string"
          },
          "ssl_client_notafter": {
            "type": "string"
          },
          "ssl_subject_dn": {
            "type": "string"
          },
          "ssl_issuer_dn": {
            "type": "string"
          },
          "ssl_client_subject_dn": {
            "type": "string"
          },
          "ssl_client_issuer_dn": {
            "type": "string"
          },
          "ssl_protocol": {
            "type": "string"
          },
          "ssl_cipher": {
            "type": "string"
          },
          "ssl_serial": {
            "type": "string"
          },
          "ssl_fingerprint": {
            "type": "string"
          },
          "oidc_cid": {
            "type": "string"
          },
          "auth_login_attempt": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "AuthSuccess": {
        "type": "object",
        "required": [
          "ok",
          "account_field",
          "backend",
          "attributes"
        ],
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "account_field": {
            "type": "string"
          },
          "totp_secret_field": {
            "type": "string"
          },
          "backend": {
            "type": "integer"
          },
          "attributes": {
            "$ref": "#/components/schemas/AttributeMapping"
          }
        }
      },
      "BruteForceBanEntry": {
        "type": "object",
        "properties": {
          "network": {
            "type": "string"
          },
          "bucket": {
            "type": "string"
          },
          "ban_time": {
            "type": "integer",
            "format": "int64"
          },
          "ttl": {
            "type": "integer",
            "format": "int64"
          },
          "banned_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BruteForceBlockedAccounts": {
        "type": "object",
        "description": "Accounts with recent brute-force activity and their known password-history IPs. An account stays listed for at least the affected-account retention (default 24h, raised to the longest configured brute-force state lifetime) after its last counted failed or blocked request, and while it still has an IP history. An empty IP list means the history has expired. A set error marks the listing as incomplete.",
        "required": [
          "accounts"
        ],
        "properties": {
          "accounts": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          },
          "account_resolution": {
            "type": "string",
            "enum": [
              "account_mapping"
            ],
            "description": "Echo of the applied account resolution mode. Present only when the request asked for `account_mapping`; a missing echo means the server checked the names literally."
          },
          "resolutions": {
            "type": "array",
            "description": "Per requested name, independent of paging. Present only together with `account_resolution`.",
            "items": {
              "$ref": "#/components/schemas/BruteForceAccountResolution"
            }
          }
        }
      },
      "BruteForceAccountResolution": {
        "type": "object",
        "description": "How one requested account filter name was resolved through the account mappings Nauthilus stores when a backend finds a login name. A mapping is not re-verified against the backend and can be stale; a name that was never used for a login has no mapping. The literal name is always checked as well.",
        "required": [
          "input",
          "status",
          "source",
          "accounts",
          "checked",
          "matched",
          "literal_match"
        ],
        "properties": {
          "input": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "mapped",
              "unmapped",
              "ambiguous",
              "error"
            ],
            "description": "`mapped`: exactly one stored account. `unmapped`: no stored account, only the literal name was checked. `ambiguous`: several stored accounts, all were checked. `error`: the stored accounts could not be read, the result is undecided and the listing reports an error."
          },
          "source": {
            "type": "string",
            "description": "Resolver that produced `accounts`, currently `account_mapping`."
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "checked": {
            "type": "array",
            "description": "Names tested against the affected-account state, the input first.",
            "items": {
              "type": "string"
            }
          },
          "matched": {
            "type": "array",
            "description": "Checked names that currently have affected-account state, before paging.",
            "items": {
              "type": "string"
            }
          },
          "literal_match": {
            "type": "boolean"
          },
          "error": {
            "type": "string"
          }
        }
      },
      "BruteForceBlockedIPAddresses": {
        "type": "object",
        "required": [
          "entries"
        ],
        "properties": {
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BruteForceBanEntry"
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "page": {
            "$ref": "#/components/schemas/PageInfo"
          }
        }
      },
      "BruteForceFilterRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "ip_addresses": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "account_resolution": {
            "type": "string",
            "enum": [
              "none",
              "account_mapping"
            ],
            "default": "none",
            "description": "`none` checks `accounts` literally. `account_mapping` also checks the accounts stored for each login name and reports per-name `resolutions`; it requires 1 to 100 distinct `accounts` and does not link accounts to `ip_addresses`."
          }
        }
      },
      "BruteForceFlushPayload": {
        "type": "object",
        "properties": {
          "ip_address": {
            "type": "string"
          },
          "rule_name": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "oidc_cid": {
            "type": "string"
          },
          "removed_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          }
        }
      },
      "BruteForceFlushRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "ip_address",
          "rule_name"
        ],
        "properties": {
          "ip_address": {
            "type": "string"
          },
          "rule_name": {
            "type": "string"
          },
          "protocol": {
            "type": "string"
          },
          "oidc_cid": {
            "type": "string"
          }
        }
      },
      "BruteForceFlushResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ResultEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "$ref": "#/components/schemas/BruteForceFlushPayload"
              }
            }
          }
        ]
      },
      "BruteForceListResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ResultEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "type": "array",
                "prefixItems": [
                  {
                    "$ref": "#/components/schemas/BruteForceBlockedIPAddresses"
                  },
                  {
                    "$ref": "#/components/schemas/BruteForceBlockedAccounts"
                  }
                ]
              }
            }
          }
        ]
      },
      "CacheFlushPayload": {
        "type": "object",
        "properties": {
          "user": {
            "type": "string"
          },
          "removed_keys": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "type": "string"
          }
        }
      },
      "CacheFlushRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "user"
        ],
        "properties": {
          "user": {
            "type": "string"
          }
        }
      },
      "CacheFlushResult": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ResultEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "result": {
                "$ref": "#/components/schemas/CacheFlushPayload"
              }
            }
          }
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "FieldError": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "FieldErrorResponse": {
        "type": "object",
        "required": [
          "errors"
        ],
        "properties": {
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          }
        }
      },
      "OIDCSessions": {
        "type": "object",
        "required": [
          "sessions"
        ],
        "properties": {
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OIDCSessionSummary"
            }
          }
        }
      },
      "OIDCSessionSummary": {
        "type": "object",
        "required": [
          "id",
          "client_id",
          "user_id",
          "auth_time"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable non-secret session identifier derived from the stored token."
          },
          "client_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "redirect_uri": {
            "type": "string"
          },
          "mfa_method": {
            "type": "string"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "auth_time": {
            "type": "string",
            "format": "date-time"
          },
          "mfa_completed": {
            "type": "boolean"
          }
        }
      },
      "PageInfo": {
        "type": "object",
        "required": [
          "limit",
          "offset",
          "next_offset",
          "has_more"
        ],
        "properties": {
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "next_offset": {
            "type": "integer"
          },
          "has_more": {
            "type": "boolean"
          }
        }
      },
      "ResultEnvelope": {
        "type": "object",
        "required": [
          "session",
          "object",
          "operation",
          "result"
        ],
        "properties": {
          "session": {
            "type": "string"
          },
          "object": {
            "type": "string"
          },
          "operation": {
            "type": "string"
          },
          "result": {}
        }
      }
    }
  }
}
