Overview
Aden can manage OAuth authorization and refresh centrally, while Hive keeps a local encrypted cache for runtime usage. Typical flow:- Hive fetches credential state from Aden when needed
- Hive caches tokens locally for performance and resilience
- Refresh operations are delegated to Aden
- Optional usage reporting is sent back to Aden
API Contract
Aden credential sync expects these endpoint patterns:GET /v1/credentials/{integration_id}POST /v1/credentials/{integration_id}/refreshGET /v1/credentialsGET /v1/credentials/{integration_id}/validatePOST /v1/credentials/{integration_id}/usage(optional)GET /health
Authorization: Bearer {agent_api_key}X-Tenant-ID: {tenant_id}(optional)
Local Integration Components
Implementation in Hive lives under:core/framework/credentials/aden/client.pycore/framework/credentials/aden/provider.pycore/framework/credentials/aden/storage.py
- HTTP client for Aden credential endpoints
CredentialProviderimplementation for refresh/validate- Optional local cache + Aden fallback storage
Integration Patterns
Provider-only (recommended)
Use encrypted local storage plusAdenSyncProvider for refresh and validation.
Cached Storage
UseAdenCachedStorage when intermittent connectivity is expected.
Multi-tenant
Create per-tenant provider/client instances with explicit tenant context and segregated credential paths.Error Handling
Design for these cases:- Aden unavailable: use non-expired local token if present
- Re-authorization required: surface reauth URL and fail explicitly
- Rate-limited refresh: backoff based on retry hints
Security Checklist
- Keep API keys out of source control
- Use encrypted local storage for cached tokens
- Scope credentials per tenant and environment
- Log metadata, not token secrets