Skip to content

Resurgamus Horizon

Self-hosted secrets vault for AI agents and automation

Demo · synthetic data 1 / 14
Logo Resurgamus Horizon

Logo Resurgamus Horizon

Horizon interface with synthetic demonstration data.

Open demo ↗

Resurgamus Horizon

Beta open source 2024 - present

Self-hosted secrets vault for AI agents and automation

I develop Horizon, a self-hosted secrets vault for AI agents, applications and CI/CD pipelines. Access is controlled through permissions, expiry and an audit trail. Its threat model assesses 43 ATT&CK techniques: 20 covered and 23 partially covered. The project includes an OWASP ASVS Level 2 assessment, a CRA requirements analysis and a build process with signatures, SBOMs and SLSA provenance. A Rust module protects keys in memory, and TLS connections support hybrid post-quantum key exchange.

  • Python
  • Rust
  • FastAPI
  • PostgreSQL
  • Patroni
  • Docker
  • Kubernetes
  • Helm
  • Ansible
  • nginx
  • Woodpecker
  • SQLAlchemy
  • Pydantic
  • WebAuthn
  • FIDO2
  • TOTP
  • YubiKey
  • LDAP
  • Shamir secret sharing
  • XChaCha20-Poly1305
  • AES-256-GCM
  • Argon2id
  • HMAC-SHA512
  • TLS 1.3
  • mTLS
  • ML-KEM
  • X25519MLKEM768
  • PKI
  • Podman
  • n8n
  • Prometheus
  • bandit
  • pip-audit
  • cosign
  • MCP
  • OpenTofu
  • Proxmox VE
  • k3s
  • Grafana
  • FreeBSD
  • OpenBSD
  • NetBSD
  • SELinux
  • AppArmor

reads/s

Secret reads under load

HA cluster, 10 workers, 32-core host with 64 GB RAM, PostgreSQL capped at 400 connections. No errors in these three measurements. The p99 latency is shown below each configuration.

1 client · 10 tokens 716 reads/s

p99: 118 ms

4 clients · 50 tokens 1,235 reads/s

p99: 290 ms

8 clients · 50 tokens 1,348 reads/s

p99: 290 ms

Source: Horizon capacity-planning documentation, HA cluster table; consulted on 4 November 2026.

View the data
Secret reads under load
Measurementreads/sDetails
1 client · 10 tokens716p99: 118 ms
4 clients · 50 tokens1,235p99: 290 ms
8 clients · 50 tokens1,348p99: 290 ms

seconds

Application failover time over 20 trials

Median: 27.47 s; minimum: 22.91 s; maximum: 32.54 s. Lease: 20 s. Each point represents one application failover cycle.

0 12.5 25 37.5 50 Trial 1 : 25.07 seconds 1 Trial 2 : 25.91 seconds 2 Trial 3 : 28.01 seconds 3 Trial 4 : 28.23 seconds 4 Trial 5 : 32.54 seconds 5 Trial 6 : 32.17 seconds 6 Trial 7 : 27.27 seconds 7 Trial 8 : 28.61 seconds 8 Trial 9 : 28.94 seconds 9 Trial 10 : 27.67 seconds 10 Trial 11 : 26.93 seconds 11 Trial 12 : 28.64 seconds 12 Trial 13 : 25.33 seconds 13 Trial 14 : 31.61 seconds 14 Trial 15 : 29.16 seconds 15 Trial 16 : 22.91 seconds 16 Trial 17 : 23.26 seconds 17 Trial 18 : 26.56 seconds 18 Trial 19 : 25.26 seconds 19 Trial 20 : 23.36 seconds 20

Successive trials · duration in seconds

Source: failover report dated 3 June 2026. This series measures application election; PostgreSQL failover is tested separately.

View the data
Application failover time over 20 trials
MeasurementsecondsDetails
Trial 125.07—
Trial 225.91—
Trial 328.01—
Trial 428.23—
Trial 532.54—
Trial 632.17—
Trial 727.27—
Trial 828.61—
Trial 928.94—
Trial 1027.67—
Trial 1126.93—
Trial 1228.64—
Trial 1325.33—
Trial 1431.61—
Trial 1529.16—
Trial 1622.91—
Trial 1723.26—
Trial 1826.56—
Trial 1925.26—
Trial 2023.36—

I develop Horizon to manage secrets used by AI agents and automation. Assistants connect through the built-in MCP server; applications, pipelines and containers use the HTTP API or secret injection. For configured integrations, Horizon can call a third-party API on behalf of an agent without passing it the credential. Each access can be restricted, audited and revoked separately.

The installer detects Docker or Podman and offers a native installation when neither is available. It configures HTTPS and starts the vault sealed. The software is self-hosted, with no SaaS dependency or telemetry.

Encryption at rest uses 256-bit symmetric primitives and information-theoretic secret sharing. Transport prefers hybrid ML-KEM and X25519 key exchange. The built-in PKI supports ML-DSA-65 signatures and hybrid Ed25519/ML-DSA-65 signatures.

The Rust cryptographic module keeps sensitive keys outside Python objects, locks their memory where the system permits it and zeroises them when released. I use ANSSI guidance for secure Rust development as a reference. These measures reduce key exposure in memory; they do not protect against a hostile administrator on the host.

Portability required work on key memory locking and BSD TLS libraries. Security-sensitive code stays POSIX-compatible. The full test suite runs on seven system families, including three BSDs, with an installer and compatibility status for each.

To test high availability, I built a Proxmox lab with OpenTofu and Ansible, plus a lightweight Kubernetes cluster. These environments are recreated between test campaigns. Tests cover 5, 10 and 20 nodes joining at once, abrupt primary failure, a network partition followed by the isolated node rejoining, and rolling restarts. They check that two primaries are never active at the same time.

PostgreSQL replication has two modes: Patroni on suitable systems, or a three-node quorum without an external coordinator. The second mode avoids depending on etcd or Consul on BSD; a primary in the minority isolates itself.

The threat model assesses 43 MITRE ATT&CK techniques: 20 have an identified protection and 23 are partially covered. Each entry describes the measure in place and the product or deployment limitations. The OWASP ASVS Level 2 assessment records 42 requirements met, one partial and two not applicable out of 45 examined. Protections are linked to the relevant code for review.

Access control uses namespace-scoped tokens, separate read and write permissions, address allowlists and honey tokens. Authentication supports WebAuthn, TOTP and hardware keys; an external identity provider is optional. The vault filters destinations for outbound requests. Builds verify dependency hashes and fail if static analysis or dependency auditing fails.

I analysed CRA and NIS2 requirements against vault features, including access control, logging, updates and vulnerability handling. The documents record existing measures, gaps and remaining work towards CE marking.

Published images are signed with Cosign and accompanied by a software bill of materials (SBOM) and SLSA Build L1 provenance. Before deployment, operators can verify the signature, declared dependencies and source commit associated with the image. Build checks also verify dependency hashes and the reproducibility of Rust components.

Achievements

Assessment of 43 ATT&CK techniques and OWASP ASVS requirements

Problem The vault centralises secrets behind an API. Its threat model needs to define covered attacks, limitations and operator responsibilities, and stay current as the code changes.

  • - MITRE ATT&CK techniques enumerated one by one, each classed covered, partial or out of scope, with the mitigation actually in place and, where it is partial, why.
  • - Assessed OWASP ASVS Level 2 requirements and linked them to the relevant code.
  • - Documented limitations and threats outside the scope in a dedicated section.
  • - Totals recounted row by row and cryptographic claims re-verified against the source tree at every revision of the document.

Result: The model distinguishes 20 covered and 23 partially covered ATT&CK techniques, with their protections and limitations. The OWASP ASVS Level 2 assessment records 42 requirements met, one partial and two not applicable out of 45 examined.

  • 43 ATT&CK techniques assessed: 20 covered, 23 partially covered
  • OWASP ASVS Level 2: 42 requirements met, 1 partial, 2 not applicable

Image verification with signatures, SBOMs and SLSA provenance

Problem Before deploying the vault, operators need to identify the image's origin, source commit and included components.

  • - Signed images with Cosign and bound attestations to their digest.
  • - Published a CycloneDX SBOM and SLSA Build L1 provenance for container images.
  • - Locked dependencies and compared hashes from two builds of Rust components to check reproducibility.
  • - Documented verification commands for use before deployment.

Result: Operators can verify image integrity and provenance and inspect the component list before deployment.

Scoped permissions and separate read and write access

Problem Tokens are used on CI/CD servers, in playbooks and by agents. A token with full vault access would expose every secret if one of those systems were compromised.

  • - Created namespace-scoped tokens with permissions for each scope. Read and write permissions are checked separately; a read-only admin role supports monitoring.
  • - A per-token address allowlist, with the client's real address taken from a forwarded header trusted only from explicitly configured peers: unconfigured, the header is ignored.
  • - Added honey tokens that trigger a detection when used.
  • - Tokens stored as HMAC-SHA512 digests, so a database dump yields no usable credential.

Result: A compromised host holding a token reads only the scope it was granted, from the declared addresses, and every issuance stays attributable in the audit trail.

SSRF protection for outbound requests

Problem Outbound notifications may use a caller-supplied destination. Without filtering, they could reach the internal network or metadata services from the vault.

  • - A guard applied before any request leaves, to every supplied destination, mail server and messaging server alike.
  • - Internal targets and metadata hostnames rejected, including loopback addresses written to slip past a naive check: short form and decimal form.
  • - A name that does not resolve, which is a misconfiguration, is kept distinct from a rejected destination, which is logged as one.
  • - For the dynamic engines, refusal to open a connection to a URL supplied by an arbitrary caller, which would create the same oracle.

Result: Internal destinations are blocked and logged before the request is sent.

Self-contained authentication, with no external identity provider

Problem Backing vault access onto an external identity provider adds a dependency at the most sensitive point: the vault becomes unreachable when the provider is down, and compromising the provider compromises the vault.

  • - Phishing-resistant WebAuthn/FIDO2, with an origin-bound challenge and the private key in hardware, plus TOTP and YubiKey depending on what the user holds.
  • - Single-use challenges stored in the database rather than in memory and deleted on consumption in the same operation, so the check stays correct when several workers serve the API.
  • - Automatic fallback when the last hardware factor is removed, and Shamir secret sharing for M-of-N emergency unseal.
  • - LDAP and an authenticating-proxy mode remain available as options, with their limits written down: header-borne identity is not cryptographically verified and is only as strong as the proxy configuration.

Result: The vault can authenticate users without an external identity provider. The documentation explains this choice and the absence of native OIDC and SAML.

API calls for agents without exposing credentials

Problem Handing a credential to an agent so it can call a third-party API puts the plaintext inside a process whose behaviour depends on text it was given. The audit trail, meanwhile, names only the relay.

  • - The proxy reads the named credential with the agent's own token, attaches it to the request, calls the third-party API and returns only the reply: the plaintext never enters the agent's process.
  • - Used each agent’s own token to attribute requests in the vault audit trail.
  • - The bearer is held in locked memory for the lifetime of the header, and carried over a local socket, the only encrypted leg being the one to the vault.
  • - Used the agent’s forwarded address for filtering when the operator has configured the gateway as a trusted peer.

Result: A compromised agent can trigger a call within its own scope without carrying the credential away or blurring attribution.

HA, failover and chaos testing on a multi-node cluster

Problem A vault outage interrupts dependent services. Electing two primaries at once also risks inconsistent data. High availability needs testing under these failure conditions.

  • - Built the lab on Proxmox with OpenTofu and Ansible. Machines are destroyed and recreated with the same configuration between test campaigns.
  • - Four failure scenarios, each with a pass criterion written in advance: 5, 10 then 20 nodes joining at once, an abrupt kill of the primary, a network partition then the return of the isolated node, and a rolling restart of the whole cluster.
  • - Checked for simultaneous primaries at one-second resolution, including during network partitions. The former primary must demote itself when it rejoins.
  • - Set default timings from test results: join quarantine to limit false promotions, and heartbeat intervals based on failover scenarios.
  • - The same path is validated on Kubernetes, from the first pod to failover of a frozen primary, so application HA does not depend on the deployment mode.

Result: Load, failover and chaos tests on a multi-node cluster with PostgreSQL/Patroni. The capacity benchmark documents 1,348 secret reads/s, p99 latency of 290 ms and no errors at that load level. Separate tests measure median application failover of 27.47 s over 20 cycles and convergence in 2.1 s after key rotation.

  • Capacity benchmark: 1,348 secret reads/s, p99 290 ms
  • Convergence after key rotation: 2.1 s

PostgreSQL replication with a three-node quorum

Problem Patroni depends on etcd or Consul for its control plane. BSD support required a replication option without this additional dependency.

  • - The database health model stays provider-neutral: Patroni remains a supported path where it belongs, and another provider can fill the same role elsewhere.
  • - A three-node peer quorum with no etcd, no consul, no multicast virtual address and no separate arbiter: only one partition can hold two nodes of three, so only one side can elect or keep a primary.
  • - Added primary self-fencing on quorum loss: the service address is dropped and the database stopped to prevent divergent writes.
  • - Verified across three different operating systems at once, one per node, which rules out any dependency specific to a single one.

Result: The single-primary guarantee comes from peer reachability alone, with no coordination service to operate.

POSIX portability and validation on Linux and BSD

Problem The vault needs to run on systems operators already use. Linux-specific dependencies can block portability, particularly for key memory locking and cryptographic libraries.

  • - Created installers for each system family and ran the full test suite. The compatibility matrix distinguishes tested, supported, experimental and planned systems.
  • - Validated operation with mandatory access controls enabled: a confined policy for RHEL in enforcing mode and AppArmor tests on other relevant systems.
  • - Resolved two BSD issues: raising the key memory-locking limit during installation, and building the interpreter against a TLS library able to load the cluster certificates.
  • - Ported to ARM, including embedded hardware, and verified post-quantum TLS negotiation on the network.

Result: Seven system families carry the full suite, three of them BSD, and the matrix states for each what is measured and what is not.

  • 1,753 tests passing on BSD, cluster mTLS included
  • 0 policy denial under enforcing mandatory access control

NIS2 and CRA compliance assessed article by article, gaps included

Problem The project needs to document NIS2 requirements relevant to its operators and CRA requirements for the product. The analysis must map each requirement to existing measures and remaining gaps.

  • - Analysed each requirement, recording its status, the relevant implementation and remaining work.
  • - On the CRA side, both parts of Annex I are treated separately - product properties on one hand, the manufacturer's vulnerability-handling process on the other - along with the information owed to the user and the manufacturer's obligations.
  • - Mapped product features to NIS2 Article 21 and CRA Annex I for reuse in customer compliance documentation.
  • - Updated the scope of the analysis after the move to donation funding, including a review of economic operator status.
  • - Documented the roadmap to CE marking, including remaining work.

Result: Measures and gaps are documented for each requirement. Operators can use the analysis to map Horizon to their own NIS2 documentation.

Service metrics, load testing and sizing

Problem Operators need to measure vault availability and latency on their own infrastructure before setting service objectives.

  • - Around thirty metrics documented one by one with their type and labels: operation and rejection counters, state gauges, and histograms wherever the distribution matters more than the average, such as unseal duration or a secret's decryption.
  • - Authentication rejections are labelled by reason - invalid token, scope, namespace, disallowed address, revocation - so one indicator serves both availability and detection, and feeds a named spike alert.
  • - A load harness shipped with the product, and a sizing note stating which resources saturate in what order and how much memory to budget per process, with an explicit instruction: run the harness on your own hardware before committing to an objective.
  • - Tracked decryption time, request throughput, authentication failures and unseal duration. The dashboard displays decryption p95 and refreshes every five seconds.
  • - Exposed encryption key freshness as a threshold breach to support monitoring and alerting.

Result: The metrics and load test tool let operators define SLIs and measure SLOs on their own hardware.

  • around thirty documented metrics, with type and labels

Alerting policy and response procedures

Problem Metrics need thresholds, response times and defined actions to avoid ignored alerts and unnecessary overnight pages.

  • - Linked each alert to an action the operator can start within five minutes.
  • - Defined three response times by incident type: immediate, within thirty minutes or the next morning.
  • - Documented each rule’s expression, hold time, receiving team and response procedure. The collector and dashboard alerting use the same expressions.
  • - Documented availability and security trade-offs, including the vault restarting in a sealed state.

Result: Around fifteen alert rules with a priority, response time and defined actions.

  • 3 alert tiers defined by the expected response time

Credential lifecycle automation

Problem Creating, copying and revoking credentials and renewing certificates involve repeated manual work. A missed step can leave access open or cause a service interruption.

  • - Implemented short-lived dynamic credentials with automatic revocation at expiry. Validated issuance, login, renewal, revocation and expiry against five database engines.
  • - Resolved secret references at launch without writing them to disk. The proxy can also make third-party calls without passing the secret to the caller.
  • - Centralised token revocation, with each token carrying its scope and expiry.
  • - Automated issuance and renewal of short-lived certificates, with a grace period for the previous authority during rotation.

Result: Accounts expire automatically, certificates renew automatically and access can be revoked centrally.