Overview
Synap supports two authentication mechanisms that work together:| Mechanism | Used for | How it works |
|---|---|---|
| API Keys | REST API calls (ingestion, retrieval, management) | Passed as a Bearer token in the Authorization header |
| mTLS Certificates | gRPC streaming connections | Mutual TLS where both client and server present certificates |
Authentication flow
Bootstrap (one-time)
When the SDK initializes for the first time, it presents the bootstrap key to Synap Cloud. The cloud validates the key and, if valid:After bootstrap, the SDK stores credentials in local secure storage or environment variables and never needs the bootstrap key again.
- Issues an API key for REST calls
- Issues an mTLS client certificate (if gRPC is enabled)
- Binds both credentials to the instance identity
- Marks the bootstrap key as consumed (single-use)
Certificate-based authentication (mTLS)
For gRPC streaming connections, Synap uses mutual TLS (mTLS). Both the SDK and Synap Cloud present certificates and verify each other’s identity.The SDK’s client certificate:
- Is issued during bootstrap by the Synap Certificate Authority
- Has a 7-day TTL (time-to-live)
- Is automatically renewed before expiration
- Contains the instance identity in the certificate’s Subject Alternative Name (SAN)

Bootstrap keys
Bootstrap keys are the entry point to Synap’s authentication system. They are designed to be used exactly once and then discarded.How bootstrap keys work
- You generate a bootstrap key in the Synap Dashboard — navigate to your instance and open the Credentials section
- The Dashboard displays the raw key (e.g.,
bk_a1b2c3d4e5f6...). This is the only time the raw key is visible. - The key is validated by Synap Cloud during bootstrap
- After successful bootstrap, the key is marked as consumed and cannot be reused
Key properties
| Property | Value |
|---|---|
| Format | Opaque token generated by Synap |
| Usage | Single-use — consumed after successful bootstrap |
| Visibility | Shown once at generation time, never retrievable again |
Generating a bootstrap key
- Dashboard
- API
- Navigate to your instance in the Dashboard
- Go to Settings > Bootstrap Keys
- Click Generate Bootstrap Key
- Copy the displayed key and store it securely
- The key is now ready for use with the SDK
Certificate lifecycle
The SDK’s mTLS certificates follow a managed lifecycle with automatic renewal.Timeline
| Phase | Duration | What happens |
|---|---|---|
| Active | Days 0-7 | Certificate is valid. All mTLS connections succeed. |
| Renewal window | Days 5-7 | SDK automatically requests a new certificate. Old cert remains valid. |
| Grace period | Days 7-9 (48 hours) | Expired certificate is still accepted to prevent hard failures during renewal. |
| Expired | After Day 9 | Certificate is rejected. SDK must re-bootstrap or use an alternative credential. |
The SDK handles certificate renewal automatically. You do not need to monitor certificate expiration or manually rotate certificates. The renewal happens transparently during the renewal window (2 days before expiration).
Certificate validation
When the SDK connects via mTLS, Synap Cloud validates:- CA signature — The certificate was issued by a trusted Synap Certificate Authority
- Certificate status — The certificate is active and not revoked
- Instance binding — The certificate is bound to the correct instance identity
- Expiration — The certificate is within the accepted validity window
API keys
API keys authenticate REST API calls. They are issued during bootstrap and remain valid until explicitly rotated or revoked.Using API keys
Rotating API keys
You can rotate API keys through the Dashboard or programmatically. During rotation, both the old and new keys are valid for a short overlap period to prevent downtime.Credential sources
The SDK resolves credentials from multiple sources in order of priority:Constructor arguments (highest priority)
Credentials passed directly to the SDK constructor take the highest priority:
Authorization model
After authentication, Synap enforces authorization through the AuthContext — an immutable identity envelope that accompanies every request through the system. The AuthContext contains:- Instance ID — Which instance is making the request
- Client ID — Which client (organization) owns the instance
- Scopes — What memory scopes the request can access
- Permissions — What operations the request can perform
Authorization is enforced at the Synap Cloud gateway, not in the SDK. Even if the SDK is compromised, it cannot escalate privileges or access memories outside its authorized scope boundaries.
Security best practices
Store bootstrap keys in a secrets manager
Store bootstrap keys in a secrets manager
Use AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, or your platform’s native secrets management. Never hardcode bootstrap keys in source code or commit them to version control.
Use environment-based credentials in containers
Use environment-based credentials in containers
For Docker, Kubernetes, or serverless deployments, use environment-based credential storage instead of file-based. Mount secrets as environment variables from your orchestrator’s secrets management system.
Rotate API keys regularly
Rotate API keys regularly
While API keys don’t expire automatically, rotating them periodically (e.g., every 90 days) limits the blast radius of a potential key compromise. Use the credential rotation API or Dashboard to rotate keys with zero downtime.
Monitor authentication events
Monitor authentication events
The Dashboard provides an audit log of all authentication events — bootstrap attempts, certificate issuances, key rotations, and failed authentication attempts. Set up alerts for unexpected authentication patterns.
Use separate instances for staging and production
Use separate instances for staging and production
Never share bootstrap keys or credentials between environments. Create separate instances for development, staging, and production, each with their own credentials and scope boundaries.
Next steps
Storage Infrastructure
Configure vector and graph storage engines for your deployment.
SDK Initialization
Explore all SDK initialization options, including custom credential providers.
Clients & Instances
Understand the client and instance model that underpins authentication scopes.