Api
Permission Model
Practical least-privilege patterns for Droplit API access.
Permission Model
Droplit supports Bitcoin-native request signatures and per-droplit API key allowlists. Use these controls together to model least-privilege access for production systems.
Core Control Layers
- Identity and key ownership: Sigma-hosted identity and signer flows manage user/application keys without exposing WIFs in your app.
- Request-level authorization: Every API request includes an
X-Auth-Tokensignature tied torequestPathand request body. - Droplit-level API key allowlists: Each droplit can explicitly permit or deny public keys at the faucet boundary.
- Operational configuration limits: Faucet settings (for example tap amount behavior) constrain what allowed keys can do.
Recommended Access Patterns
Pattern A: Single backend service
- Use one service public key in the droplit allowlist.
- Sign each request path/body pair in backend code.
- Restrict this key to one production service boundary.
Pattern B: Multi-agent runtime
- Create one key per agent role (
payments-agent,monitor-agent,sync-agent). - Add only required keys to each droplit allowlist.
- Rotate keys independently when an agent changes ownership or risk profile.
Pattern C: Environment isolation
- Use separate droplits and separate key sets for dev, staging, and prod.
- Never reuse signing keys across environment tiers.
- Validate signatures in each environment with environment-specific secrets and URLs.
Suggested Scope Matrix
| Agent / Service | Typical endpoints | Recommended key policy |
|---|---|---|
| Payments agent | /faucet/:name/tap, /faucet/:name/fund | Dedicated key, allowlisted only on payout droplits |
| Data attestation worker | /faucet/:name/push | Separate key, write-only role to data droplits |
| Mint pipeline | /faucet/:name/mint | Isolated mint key, narrow owner and rotation schedule |
| Monitor daemon | /faucet/:name/status, /faucet/:name/activity-stream | Read-focused key with explicit monitoring ownership |
API Key Allowlist Workflow
- Open your droplit dashboard.
- Add approved public keys for each service or agent role.
- Label keys by runtime and owner (
prod-payments-agent,staging-monitor). - Remove stale keys immediately during role changes or incident response.
Verification Checklist
- Every request includes
X-Auth-Token. - The signed payload always matches the exact request body sent.
- No private keys or WIFs are stored in frontend code.
- API keys are scoped per droplit and reviewed on rotation schedule.
- Agent/service keys are labeled and auditable.