Proxy Developer Guide
Proxy Developer Guide (End Developers)
This guide is for application developers integrating encrypted key/value and file operations through Harden Proxy.
Why Use Proxy API
Use this API when your app must store secrets or files but you do not want plaintext data persisted on the backend.
Benefits:
- Client-side style protection with server-side API simplicity.
- Backend stores encrypted payloads and wrapped keys, not plaintext.
- User-scoped access with API keys and user-secret based unwrap.
- Unified API for encrypted key/value and encrypted file workflows.
Service Endpoint
- Dev endpoint:
https://dev2-api.harden.cloud - Required header:
X-Api-Key: <user_api_key> - Key management and read operations also require:
X-User-Secret: <user_secret>
Core Workflows
1. Check API health
2. Check key status
3. Generate keys for a user (first-time)
4. Save a value (encrypted by Proxy)
5. List keys
6. Read one value
7. Delete a value
File API
Files use the same user API key and encryption model.
Upload file
List files
Download one file
Delete one file
Error Handling
401or403: invalid API key, expired session, or insufficient role.400: invalid payload, missing user secret, or plan/storage validation failure.404: key/file not found.429: apply client retry/backoff.5xx: transient server issue; use idempotent retries.
Security Guidance
- Never log plaintext secrets,
userSecret, or raw payloads. - Keep API keys in a secrets manager; rotate if leaked.
- Use TLS-only transport and pin hostnames in production clients.
- Store user secret only in secure session memory, not long-lived storage.
Recommended Client Integration Pattern
- Authenticate user in your app.
- Load API key from secure backend for that user context.
- Prompt for user secret only when crypto operations are needed.
- Cache minimal session state and clear on logout.
- Retry idempotent operations with exponential backoff.