What Orceum Handles
| Concern | Orceum’s Role |
|---|---|
| Credential storage | Encrypts API keys and OAuth tokens at rest (Fernet symmetric encryption) |
| Token refresh | Automatically refreshes OAuth tokens before expiry |
| Token revocation | Calls your revoke_url on uninstall |
| HTTPS enforcement | All Orceum API endpoints are HTTPS-only |
| Signature verification | Verifies HMAC signatures on events you push |
| Installation isolation | Each user gets a separate installation_id — credentials are never shared |
What You’re Responsible For
1. Verify Webhook Signatures
Always verify theX-Orceum-Signature header on lifecycle webhooks. Use constant-time comparison:
== for signature comparison — it’s vulnerable to timing attacks.
2. Sign Events You Push
All events pushed to Orceum must be HMAC-signed. See Webhooks → Signing Requests.3. Use X-Orceum-Installation-Id for User Isolation
Every action call includes X-Orceum-Installation-Id. Use it to look up the correct user in your database. Never treat all requests as coming from the same user account.
4. Protect Your Secrets
| Secret | Where to Store It |
|---|---|
orc_* (lifecycle webhook secret) | Secrets manager (AWS Secrets Manager, GCP Secret Manager, Vault) |
whs_* (event signing secret) | Secrets manager |
OAuth client_secret | Secrets manager / environment variable — never in code |
5. Implement Least-Privilege OAuth Scopes
Request only the exact scopes your app needs. Users see the requested scopes on the consent screen — over-requesting scopes reduces trust and installs.6. Validate All Inputs
Even though the assistant constructs action parameters from your manifest, always validate inputs server-side. Never trustevent_data without validation:
7. Use HTTPS Only
Yourbase_url and webhook URLs must be HTTPS. Orceum will refuse to call HTTP endpoints in production.
8. Handle Idempotently
Orceum may retry requests (429 retries, 401 retry after refresh). UseX-Request-ID as a deduplication key:
9. Return Appropriate Status Codes
Return meaningful HTTP status codes — Orceum’s retry/re-auth logic depends on them:200— success400— bad input (don’t retry)401— auth failure (triggers re-auth flow)429— rate limited (triggers retry)500— server error (don’t retry)
10. Rotate Secrets Periodically
Rotate your OAuthclient_secret and Orceum secrets periodically. You can update these values directly in the Orceum Developer Studio immediately after rotation to avoid any gap in service.
Two-Secrets Reference
A common point of confusion for new developers:| Secret | Prefix | Who Creates It | Who Stores It | Used For |
|---|---|---|---|---|
orc_* | orc_ | Orceum (shown once on creation) | You | Verify lifecycle webhooks Orceum sends to your installation_webhook_url. Header: X-Orceum-Signature: sha256=... |
whs_* | whs_ | Orceum (visible in dashboard) | You | Sign events you push to Orceum. Header: X-Hub-Signature-256: sha256=... |
Signature Format Differences
| Direction | Header | Value Format |
|---|---|---|
| Orceum → Your app | X-Orceum-Signature | sha256=<raw_hex> |
| Your app → Orceum | X-Hub-Signature-256 | sha256=<raw_hex> |
sha256= prefix in the header value.