Verifiable by design
Castle gives a carrier evidence of how its MGAs and TPAs govern their AI, and gives those partners one way to prove it.
Castle is independent of the AI platforms it governs, so its evidence is not self-attestation. It connects through an SDK guard, an MCP gateway, framework adapters and REST endpoints, and can act as the decision point for Microsoft's Agent Governance Toolkit, re-verifying that toolkit's audit trails.
Security architecture
- Fixed-rule decisions. Risk tiers, policy decisions and runtime authorization come from fixed rules over declared facts. No model output sets a binding decision, so prompt injection cannot move one.
- Castle decides, a hook enforces. Agents ask Castle before acting. Wherever a Castle hook is installed, a deny blocks the action before it runs, and the MCP gateway fails closed if Castle is unreachable. The REST endpoint only returns a decision for your code to enforce.
- Secure by default. The API will not start without authentication unless a developer opts into an insecure local mode. Sign-in is rate limited per IP. On a network address, the API server refuses to start without authentication, tenant isolation and field encryption unless an operator overrides it.
- Supply chain. Dependencies are locked with hashes, audited in CI with a blocking vulnerability gate, scanned for secrets, and shipped with a software bill of materials.
Key management and rotation
Castle uses versioned keys, with a separate key purpose for each job: encryption, signing, sessions and countersigning.
- Managed KMS / HSM. In production, data keys are wrapped by a key held in Azure Key Vault or Azure Managed HSM. Key material never leaves the machine in plaintext. AWS, GCP and HashiCorp Vault providers are planned.
- Automated rotation policy. Due keys are flagged and rotate with one command. Old versions are kept, so existing data still decrypts and signatures still verify.
- Auditable rotation. Every rotation is written to a tamper-evident log you can re-check at any time.
Access controls
- Role-based access with separate owner, admin, operator, auditor and viewer roles.
- Enterprise SSO over OIDC (Entra ID and Okta targeted) with SCIM 2.0 provisioning. A SCIM deactivation blocks password sign-in. Castle does not yet re-check user status at SSO sign-in or per token, so cut leavers off at the identity provider and revoke their API tokens.
- Tenant isolation: with tenancy on, every engagement query is filtered by organization and cross-tenant requests are refused; oversight routes are always isolated. A residency allowlist refuses tenants tagged to a disallowed region.
- Evidence sharing is explicit: an MGA or TPA shares one item with one named carrier, for named requirements, until an expiry it sets (at most 400 days), and only it can revoke. Every content read is logged on both sides, and an item changed after sharing cannot be accepted.
- Short-lived session tokens; with key management on, signing keys rotate without logging anyone out.
Audit logging
Every material action, from obligation confirmation to a runtime deny, goes on an append-only log where each record links to the one before, so an edit breaks the chain. Someone with database access could rebuild it, so signed packets held by the other party are what expose a rewrite.
Continuous control monitoring
Posture is re-checked on a schedule, not asserted once. castle monitor re-checks twelve controls, such as record integrity, key age, agent tool use and overdue remediation. Results go on the audit chain, so the checking is itself evidence. No LLM is involved.
Evidence handling
Evidence is fingerprinted when captured and exported as a signed packet. Anyone can check it with the standalone castle-verify tool and no access to Castle, or verify a packet in your browser. A valid signature proves integrity, not that the evidence is complete.
Optional public anchoring publishes only a fingerprint, never content, to the Sigstore Rekor log. An independent Castle instance can countersign packets, aligned to IETF SCITT (RFC 9943), though Castle issues no RFC 9943 Receipts and runs no Transparency Service.
The packet format is an open specification (v0.2 draft, available on request) with a conformance test kit, so anyone can reimplement the checks without trusting Castle.
Time-boxed examiner access
A regulator, carrier auditor or bank partner gets a read-only portal link for one engagement. The link is shown once, the grant expires, and revocation ends live sessions. Every grant, revocation and access is logged on the audit chain.
For insurance, castle insurance examiner-packet bundles the exhibits, a signed attestation and an offline verifier (Python 3.12 or later) into one deliverable. The portal can check an uploaded packet, but the examiner's own offline run is the authoritative check.
AI governance controls
- A registry of AI use cases with fixed-rule risk assessment and lifecycle states.
- An agent registry: each governed agent declares the tools, data and actions it may touch.
- Runtime enforcement with a decision log. An action reported after it ran outside its declared scope is logged as an alert marked not prevented, so the log never claims a block that did not happen.
- Human sign-off on approvals and obligation confirmation: the model proposes, a person decides.
- Accepted risks are explicit and owned; every remediation has an owner and a due date. In carrier oversight, a corrective action closes only after someone who did not work the fix retests it against written criteria. A risk acceptance needs the designated approver, a rationale and an expiry within 180 days.
First-party model validation
Castle also tests your own models with four checks: bias (disparate impact), grounding, robustness and drift (PSI). Each run gives pass/fail with metrics, maps to obligations such as NAIC bias testing and SR 11-7, and goes into the signed evidence packet.
First-party only: this documents your own validation work. It is not an independent audit, and a pass is not a certification.
Govern the guardrails you already run
If you run a guardrail engine (NeMo Guardrails, Llama Guard, Presidio), Castle records each rail decision as evidence and compares the rails you declared with the ones that fired. Declared but silent is a gap; firing but undeclared is drift.
Castle records guardrail decisions; it is not the guardrail engine, and this is not a third-party audit.
Govern the agent signals you already collect
The same applies to agent-identity, intent-drift and anomaly tools: Castle records their signals as evidence and flags signals for undeclared agents (drift) and declared agents no tool reports on (gaps). It runs no detector of its own.
Castle does not replace the tool that produced a signal, and this is not a third-party audit.
Vendor and model governance
Castle tracks AI vendors and the models behind each use case, including SOC 2 report status and signed data processing agreements, and maps vendor and delegated-authority obligations (carrier to MGA to TPA) alongside regulations. A failed connector sync shows as a failure, never as a clean empty sync.
Data handling
- With an encryption key configured, sensitive fields (contract text, personal details, review rationales) are encrypted at rest with AES-256-GCM, and credentials sit in an encrypted vault. Without a key they are stored in plaintext with a warning, fit for a local machine only.
- Credentials are stripped before anything reaches a model.
- Deploy in your private cloud or on your own servers, including an air-gapped mode where external model calls fail closed. No hosted option yet.
- Watermarks, data residency and retention windows are set per workspace. Retention is stated policy; automated deletion is not built yet.
Compliance alignment
Castle ships regulation libraries for insurance AI, including NAIC model bulletin adoptions, NYDFS, Colorado, the EU AI Act, Texas, Canada's OSFI and the UK PRA, each mapped by analysts and confirmed by a human reviewer.
It also tracks NAIC AI Model Bulletin adoption across the 25 adopting jurisdictions (24 states plus DC; NAIC tracker status April 1, 2026, retrieved July 2, 2026) and warns when those records go stale. Reference material, not legal advice.
This is readiness and evidence support, not certification. Castle holds no certifications today.
Security review
Running a vendor security review? We will walk your team through the architecture, threat model and verification flow, and share deeper threat models and architecture notes under NDA.