Skip to main content

Overview

Bastion supports two authentication methods:

API keys

Bastion API keys use the bas_ prefix:
API Keys can be created through your dashboard in the API keys tab:
API keys page in the Bastion dashboard
Include your API key as a Bearer token:
Security:
  • Keys stored as BLAKE2b hashes (never raw)
  • Full key shown only once at creation
  • Can be revoked immediately

Request signing (enhanced authentication)

For higher-security operations, add asymmetric request signing using ECDSA P-256 keys.

Setup

  1. Generate an ECDSA P-256 key pair
  2. Register your public key in your Bastion dashboard (linked to your API key)
    Creating an API key in the Bastion dashboard
  3. Sign each request with your private key

Signature contents

Sign a JWT claim containing: Bastion validates the signature and timestamp before processing. Requests outside the 30-second window are rejected to prevent replay attacks.
Follow the API Request Signing Guide for a full overview of the API request signing process with examples.

Security best practices

  • Never expose API keys in client-side code
  • Store keys in secrets managers
  • Rotate API keys periodically
  • Protect private signing keys — use HSM or secrets manager