Skip to main content

Overview

Tool commands allow you to verify that HTTP requests were signed by a valid agent.

tool verify

Verify an agent’s signed request and retrieve the agent’s identity.
Example:
Output:

Arguments

string
required
HTTP method of the request being verified: GET, POST, PUT, DELETE, etc.
string
required
Full URI of the request including scheme and authority (e.g., https://api.vestauth.com/whoami)

Options

string
required
Value of the Signature header from the agent’s request.Format: sig1=:BASE64_SIGNATURE:
string
required
Value of the Signature-Input header from the agent’s request.Contains signature metadata: covered components, created timestamp, key ID, algorithm, expiration, nonce, and tag.
string
required
Value of the Signature-Agent header from the agent’s request.Format: sig1=AGENT_UID.HOSTNAME
boolean
Pretty-print JSON output.Alias: --pretty-print

How It Works

  1. Parses the Signature-Agent header to extract the agent UID
  2. Fetches the agent’s public key from the .well-known discovery endpoint
  3. Verifies the signature matches the request using the public key
  4. Checks signature expiration and validates all parameters
  5. Returns agent identity if verification succeeds

Response Format

On successful verification:

Error Handling

Verification fails if:
  • Signature is cryptographically invalid
  • Request has expired (based on expires parameter)
  • Public key cannot be retrieved
  • Signature format is malformed
  • HTTP method or URI don’t match the signature
Always verify requests on the server side. Never trust client-provided verification results.

Integration Example

Here’s how to use tool verify in a shell script:

Library Usage

For programmatic verification, use the vestauth library instead:
See Library Reference for more details.

Security Considerations

Replay Attack Protection

Each signature includes:
  • created timestamp - when signature was created
  • expires timestamp - when signature expires (typically 5 minutes)
  • nonce - unique random value
Optionally track nonces in your tool to prevent replay attacks within the signature validity window.

SSRF Prevention

Vestauth only fetches public keys from trusted domains:
  • *.api.vestauth.com (default)
  • Custom domains via TOOL_FQDN_REGEX environment variable
This prevents Server-Side Request Forgery (SSRF) attacks.

Key Caching

Cache public keys to reduce latency and external requests:
Invalidate cache periodically or on key rotation events.

Deprecated Command

vestauth provider verify is a deprecated alias for vestauth tool verify. Both commands work identically. Use tool verify in new scripts.