Skip to content

Authentication

Primatomic uses secure authentication to protect your data and ensure only authorized clients can access your namespaces.

For Primatomic Cloud, use credential IDs from your dashboard:

import primatomic
# Authenticate with your credential ID
client = primatomic.Client(
endpoint="your-workspace.primatomic.com:443",
jwt_token="your-credential-id"
)
# All operations are automatically authenticated
client.put_key("myapp", "mykey", b"myvalue")

Coming soon - JavaScript SDK is in development. For early access, contact us.

  1. Sign up at primatomic.com
  2. Create a workspace for your project
  3. Generate credential IDs in your dashboard
  4. Use credential IDs to access your assigned namespaces

Each credential ID has access to specific namespaces:

# This credential can only access "myapp" namespace
client.put_key("myapp", "mykey", b"value") # ✅ Allowed
# This will fail if credential doesn't have namespace access
client.put_key("other", "mykey", b"value") # ❌ Forbidden

Authentication uses credential IDs only - no additional permission levels or access controls. Each credential ID is either granted access to a namespace or not.

  • Rotate Credentials: Regularly rotate credential IDs
  • Minimal Access: Use separate credential IDs for different applications
  • Secure Storage: Store credentials in environment variables or secret managers
  • Use TLS: Always use encrypted connections (default for Primatomic Cloud)
Terminal window
# Set credentials via environment variables
export PRIMATOMIC_ENDPOINT="your-workspace.primatomic.com:443"
export PRIMATOMIC_TOKEN="your-credential-id"
import os
import primatomic
# Load from environment
client = primatomic.Client(
endpoint=os.getenv("PRIMATOMIC_ENDPOINT"),
jwt_token=os.getenv("PRIMATOMIC_TOKEN")
)

Common authentication errors:

try:
client.put_key("myapp", "mykey", b"value")
except primatomic.PrimatomicError as e:
if "authentication" in str(e).lower():
print("Invalid or expired credentials")
elif "permission" in str(e).lower():
print("Insufficient access for this operation")

Self-hosted deployment options with enterprise authentication will be available in future releases. Contact us to learn more.

  • Credential IDs: Generate and manage in your workspace dashboard
  • Namespace Access: Check which namespaces your credential ID can access in your account settings
  • Support: Contact us at [email protected]

Authentication keeps your data secure while making it easy to get started with our fully-managed cloud service.