Authentication
Primatomic uses secure authentication to protect your data and ensure only authorized clients can access your namespaces.
Primatomic Cloud Authentication
Section titled “Primatomic Cloud Authentication”Credential IDs (Recommended)
Section titled “Credential IDs (Recommended)”For Primatomic Cloud, use credential IDs from your dashboard:
import primatomic
# Authenticate with your credential IDclient = primatomic.Client( endpoint="your-workspace.primatomic.com:443", jwt_token="your-credential-id")
# All operations are automatically authenticatedclient.put_key("myapp", "mykey", b"myvalue")
JavaScript SDK
Section titled “JavaScript SDK”Coming soon - JavaScript SDK is in development. For early access, contact us.
Workspace Access
Section titled “Workspace Access”- Sign up at primatomic.com
- Create a workspace for your project
- Generate credential IDs in your dashboard
- Use credential IDs to access your assigned namespaces
Namespaces & Credential IDs
Section titled “Namespaces & Credential IDs”Namespace Isolation
Section titled “Namespace Isolation”Each credential ID has access to specific namespaces:
# This credential can only access "myapp" namespaceclient.put_key("myapp", "mykey", b"value") # ✅ Allowed
# This will fail if credential doesn't have namespace accessclient.put_key("other", "mykey", b"value") # ❌ Forbidden
Credential ID Only
Section titled “Credential ID Only”Authentication uses credential IDs only - no additional permission levels or access controls. Each credential ID is either granted access to a namespace or not.
Best Practices
Section titled “Best Practices”Security
Section titled “Security”- 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)
Development
Section titled “Development”# Set credentials via environment variablesexport PRIMATOMIC_ENDPOINT="your-workspace.primatomic.com:443"export PRIMATOMIC_TOKEN="your-credential-id"
import osimport primatomic
# Load from environmentclient = primatomic.Client( endpoint=os.getenv("PRIMATOMIC_ENDPOINT"), jwt_token=os.getenv("PRIMATOMIC_TOKEN"))
Error Handling
Section titled “Error Handling”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")
On-Premises Authentication
Section titled “On-Premises Authentication”Self-hosted deployment options with enterprise authentication will be available in future releases. Contact us to learn more.
Getting Help
Section titled “Getting Help”- 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.