Skip to main content

Overview

Vestauth’s security model is built on cryptographic signatures, public key discovery, and defense-in-depth principles. This page explains how Vestauth protects against common attack vectors while maintaining simplicity and developer ergonomics.

Cryptographic Foundation

Vestauth uses Ed25519 elliptic curve cryptography for all signing operations:
  • Algorithm: EdDSA (Edwards-curve Digital Signature Algorithm)
  • Curve: Curve25519
  • Key size: 256 bits (32 bytes)
  • Signature size: 512 bits (64 bytes)

Why Ed25519?

Ed25519 provides approximately 128 bits of security, equivalent to 3072-bit RSA keys, but with much smaller key and signature sizes.
Ed25519 is extremely fast:
  • Signing: ~15,000 signatures/second on modern hardware
  • Verification: ~40,000 verifications/second
This makes it ideal for high-throughput agent systems.
Unlike RSA or ECDSA, Ed25519 has no parameter choices that could weaken security. There’s only one secure way to use it.
Ed25519 is designed to be resistant to timing attacks and other side-channel vulnerabilities.

HTTP Message Signatures (RFC 9421)

Vestauth implements RFC 9421 for signing HTTP requests.

Signature Components

Each signed request includes three headers: 1. Signature The base64-encoded cryptographic signature:
2. Signature-Input Parameters used to generate the signature:
Key parameters:
  • created - Unix timestamp when signature was created
  • expires - Unix timestamp when signature expires (typically 5 minutes)
  • nonce - Unique 64-byte random value
  • keyid - Public key identifier (JWK thumbprint)
  • alg - Signature algorithm (ed25519)
  • tag - Implementation tag (web-bot-auth)
3. Signature-Agent Agent identity and discovery endpoint:

What Gets Signed?

Vestauth signs the HTTP @authority component (host + port):
This prevents:
  • Host header attacks - Signature is bound to the destination hostname
  • Port confusion - Different ports produce different signatures
  • Man-in-the-middle - Attacker can’t redirect to different hosts
Future expansionVestauth currently signs @authority only. Future versions may support signing additional components like request body, specific headers, or query parameters for enhanced security.

Replay Attack Prevention

Vestauth prevents replay attacks using three complementary mechanisms:

1. Expiration Timestamps

Every signature includes an expires parameter:
Default expiration: 5 minutes (300 seconds) This limits the window during which a captured request could be replayed.

2. Creation Timestamps

The created parameter prevents backdating attacks:
Tools can reject signatures that are too old, even if not yet expired.

3. Unique Nonces

Each request includes a cryptographically random 64-byte nonce:
Nonce Properties:
  • Uniqueness: 64 bytes of randomness = 2^512 possible values
  • One-time use: Each nonce should only be accepted once
  • Collision resistance: Probability of collision is effectively zero

Nonce Tracking (Optional)

Tools can optionally track used nonces to provide absolute replay protection:
Nonce storage considerationsIf implementing nonce tracking:
  • Store nonces in a distributed cache (Redis, Memcached)
  • Expire nonces after signature expiration time
  • Consider storage costs for high-volume tools
For most use cases, timestamp validation alone provides sufficient protection.

SSRF Protection

Server-Side Request Forgery (SSRF) is a critical vulnerability during public key discovery. Vestauth prevents SSRF through domain allowlisting.

Default Trusted Domains

By default, Vestauth only fetches public keys from:
Allowed:
  • agent-abc123.api.vestauth.com
  • agent-xyz789.agents.vestauth.com
Blocked:
  • localhost
  • 192.168.1.1
  • internal.company.local
  • attacker.com

Trusted Domain Verification

The trustedFqdn() function enforces this policy:

Custom Trusted Domains

For self-hosted or federated deployments, configure additional trusted domains:
Example allowed domains:
  • agent-123.agents.vestauth.com
  • agent-456.agents.example.internal
  • agent-789.agents.evil.com ❌ (not in allowlist)
Be careful with custom domainsOnly add domains you control. Never use overly permissive patterns like .* which would disable SSRF protection entirely.Bad pattern: TOOL_FQDN_REGEX=".*"Good pattern: TOOL_FQDN_REGEX=".*\.company\.com"

Public Key Discovery

Vestauth uses .well-known URLs for public key discovery:

Discovery Flow

1

Extract agent identity

Parse the Signature-Agent header:
Extract: agent-4b94ccd425e939fac5016b6b.api.vestauth.com
2

Verify trusted domain

Check that the domain matches TRUSTED_FQDN_REGEX:
3

Construct discovery URL

Build the .well-known URL:
4

Fetch public keys

Make HTTPS request to discovery endpoint:
5

Select matching key

Find key matching keyid from Signature-Input:

Why Not Embed Keys?

Vestauth uses discovery instead of embedding public keys in requests for several reasons:
Public keys are 32+ bytes. Discovery keeps request headers small and allows caching.
Agents can rotate keys without changing how they sign requests. Tools simply fetch updated keys from the discovery endpoint.
Discovery endpoints can publish multiple active keys during rotation periods:
.well-known discovery is used by OAuth, OpenID Connect, and other web identity systems.

Defense in Depth

Vestauth employs multiple security layers:

Threat Model

What Vestauth Protects Against

Impersonation attacks - Only the private key owner can create valid signatures Man-in-the-middle - Signatures are bound to the destination hostname Replay attacks - Timestamps and nonces prevent reuse SSRF attacks - Domain allowlisting prevents malicious key fetches API key leaks - No shared secrets to leak Credential stuffing - No passwords to guess or brute force

What Vestauth Does NOT Protect Against

⚠️ Private key compromise - If an attacker obtains AGENT_PRIVATE_JWK, they can impersonate the agent until keys are rotated ⚠️ Eavesdropping - Use HTTPS to protect request/response content ⚠️ DDoS attacks - Signature verification requires CPU; rate limiting is recommended ⚠️ Compromised discovery endpoint - If an attacker controls the .well-known URL, they could serve malicious keys (mitigated by domain allowlisting)
Private key security is criticalVestauth’s security depends on keeping AGENT_PRIVATE_JWK secret:
  • Never commit to version control
  • Never log or display in plaintext
  • Never send over unencrypted channels
  • Rotate immediately if exposed
  • Store in encrypted secret management systems

Security Best Practices

For Tool Developers

1

Always use HTTPS in production

2

Implement rate limiting

Prevent abuse from compromised agents:
3

Cache public keys

Reduce latency and protect against discovery endpoint outages:
4

Log verification failures

Monitor for attack attempts:
5

Consider nonce tracking

For high-security tools, implement nonce deduplication.

For Agent Operators

1

Protect private keys

  • Use .env files (never commit)
  • Use encrypted secret storage
  • Restrict file permissions: chmod 600 .env
2

Rotate keys regularly

3

Monitor agent activity

Review tool audit logs for unexpected usage.
4

Use separate agents for different purposes

Don’t share agent identities across projects or environments.

Security Audits

Vestauth follows these standards: For security issues, please report to the Vestauth security team.

Next Steps

Building Tools

Implement secure tool authentication

Key Rotation

Learn rotation best practices