Credentials
Orchka provides a secure credential management system for storing and using API keys, tokens, and authentication details in your workflows.
Overview
Instead of hardcoding sensitive values in your workflow nodes, you can:
- Store credentials securely with AES-256-GCM encryption
- Reference credentials by ID in your nodes
- Credentials are decrypted only during workflow execution
Credential Types
| Type | Fields | Use Case |
|---|---|---|
| API Key | apiKey | Generic API authentication |
| Basic Auth | username, password | HTTP Basic authentication |
| Bearer Token | token | OAuth/JWT bearer tokens |
| OAuth2 | clientId, clientSecret, accessToken, refreshToken | OAuth2 flows |
| OpenAI | apiKey, organization (optional) | OpenAI API |
| Anthropic | apiKey | Anthropic Claude API |
| Google AI | apiKey | Google Gemini API |
Creating Credentials
- Navigate to Credentials in the dashboard sidebar
- Click New Credential
- Select the credential type
- Enter a unique name and the required fields
- Click Create
Using Credentials in Nodes
AI Agent Node
Select a stored credential instead of relying on environment variables:
- Open the AI Agent node settings
- In the Credential dropdown, select your saved credential
- The credential type must match the selected model provider
Model: gpt-4o
Credential: My OpenAI Key (OpenAI type)HTTP Request Node
Use credentials for API authentication:
- Open the HTTP Request node settings
- Set Auth Type to "Credential"
- Select the appropriate credential
Supported credential types for HTTP:
- Bearer Token →
Authorization: Bearer <token> - Basic Auth →
Authorization: Basic <base64> - API Key →
X-API-Key: <key>
Testing Credentials
Before using a credential in production:
- Open the credential details
- Click Test Credential
- For AI provider credentials, this validates the API key with the provider
Security
- Credentials are encrypted at rest using AES-256-GCM
- Decryption only occurs during workflow execution
- Credential data is never exposed in API responses (only metadata)
- Audit logs track credential access during workflow runs
Environment Setup
Generate an encryption key for your deployment:
# Generate a 32-byte hex key
openssl rand -hex 32Add to your .env:
CREDENTIAL_ENCRYPTION_KEY=your_64_character_hex_key_hereBest Practices
- Use descriptive names - "Production OpenAI" vs "test-key-1"
- Rotate credentials regularly - Update credentials without changing workflows
- Test before deploying - Use the test feature to validate credentials
- One credential per purpose - Easier to track and rotate