Skip to main content
aivault supports ten auth strategies. For registry-backed providers, the strategy is defined in the registry JSON and applied automatically. For custom providers, you specify the strategy when creating a credential. A single HTTP header with a {{secret}} template. Example providers: OpenAI (Bearer), Anthropic (x-api-key), Discord (Bot)
The broker renders Bearer {{secret}}Bearer sk-live-... and injects it as the authorization header.

Query

API key as a URL query parameter. Example providers: Gemini, YouTube Data
The broker appends ?key=<secret> to the request URL.

Path

Secret injected into the URL path prefix. Example providers: Telegram
The broker prepends /bot<secret> to the request path, so a request to /getUpdates becomes /bot<secret>/getUpdates.

Basic

HTTP Basic auth (username:password). Example providers: Twilio, Mailgun The secret value should be username:password. The broker base64-encodes it and injects Authorization: Basic <encoded>.

Multi-header

Multiple HTTP headers from a JSON secret. Each header has its own template that references fields in the secret JSON. Example providers: Datadog (DD-API-KEY + DD-APPLICATION-KEY)
The secret value is a JSON object: {"api_key": "...", "app_key": "..."}.

Multi-query

Multiple query parameters from a JSON secret. Example providers: Trello (key + token)
The secret value is a JSON object: {"api_key": "...", "token": "..."}.

OAuth2

Client credentials or refresh token grant. The broker automatically refreshes expired access tokens. Example providers: Spotify, QuickBooks, Xero, Reddit
The secret value is a JSON object: {"clientId": "...", "clientSecret": "...", "refreshToken": "..."}. For public/native OAuth clients that use PKCE, omit clientSecret. On each request, the broker:
  1. Checks if the cached access token is expired
  2. If expired, sends a refresh request to the token endpoint
  3. Writes the new tokens back to the vault
  4. Injects Authorization: Bearer <access_token> into the request
See OAuth setup for the initial consent/exchange flow.

AWS SigV4

AWS Signature Version 4 request signing. Example providers: AWS S3, Bedrock
The secret value is a JSON object: {"access_key_id": "...", "secret_access_key": "..."}.

HMAC

HMAC signature of the request body, placed in a header. Use case: Webhook verification

mTLS

Mutual TLS client certificate authentication. Use case: Enterprise APIs The secret value contains the client certificate and key (PEM-encoded). The broker uses them to establish a mutual TLS connection.

Specifying auth for custom credentials

For registry-backed providers, auth is automatic. For custom providers, specify the strategy when creating a credential:
Next: Scopes and isolation