Authentication Overview
Ozura Vault supports multiple authentication methods depending on your use case.Authentication Methods
1. API Key Authentication
Best for: Server-to-server integrations, backend services, automated systems API keys are passed in theX-API-Key header:
POST /tokenize- Create tokensPOST /detokenize- Retrieve original dataPOST /proxy/transaction- Forward to PSPsPOST /internal/provision- Create sub-projects (requires provisioning permission)GET /api/applications/key- Verify API key
2. JWT Token Authentication
Best for: Dashboard access, user-facing applications, web interfaces JWT tokens are passed either as a cookie or in theAuthorization header:
- All dashboard/management endpoints
- Token listing and management
- Project and application management
- Audit log access
- User settings
3. Hybrid Authentication
Best for: Team members using API keys with user attribution You can combine both methods - the API key authenticates the request, while the JWT token identifies the user for audit logging:API Key Security
Best Practices
-
Never expose API keys in client-side code
-
Use environment variables
-
Rotate keys periodically
- Create a new application
- Update your integration
- Delete the old application
-
Use separate keys per environment
- Production project → Production API key
- Staging project → Staging API key
Key Format
API keys follow this format:key_myapp_us_pvt_a1b2c3d4e5f6
JWT Token Details
Token Structure
JWT tokens contain:Token Lifetime
| Token Type | Lifetime | Refresh |
|---|---|---|
| Access Token | 24 hours | Re-login required |
| Cookie | 15 minutes | Auto-refreshed on activity |
MFA Enforcement
If MFA is enabled, the token includes MFA status:mfa_required: Whether MFA must be verifiedmfa_enabled: Whether user has MFA set upmfa_verified: Whether MFA was verified this session
403 if mfa_required=true but mfa_verified=false.
Rate Limiting
Authentication endpoints have specific rate limits:| Endpoint | Limit |
|---|---|
POST /auth/login | 5 requests / 2 minutes |
POST /auth/register | 30 requests / hour |
GET /auth/verify | 60 requests / minute |
POST /auth/change-password | 3 attempts / hour |
Next Steps
- API Keys - Managing application API keys
- JWT Tokens - User authentication flow
- MFA - Multi-factor authentication