Documentation Index
Fetch the complete documentation index at: https://docs.stacyide.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Security Governance
This guide captures the Phase 6 security posture for production StacyVM operators and the planned shape of future external identity integration.Production Admin Posture
Use separate credentials for regular API clients and admin operators:/api/v1/admin/* behind trusted networks or a reverse proxy allowlist. The admin dashboard should only be used from managed operator browsers because its settings are stored in browser local storage.
Operator Attribution
Admin audit records useX-User-ID as the operator actor when it is supplied. Set it to a stable human or service identity such as operator-a, sre-oncall, or ops-bot.
When X-User-ID is missing, authenticated admin requests fall back to role and key-header attribution such as admin:X-Admin-API-Key. This is useful for debugging, but production operators should still send explicit actors for accountability.
Key Handling
- Generate
auth.api_keyandauth.admin_api_keyindependently with at least 32 bytes of entropy. - Keep keys in environment-specific secret storage rather than checked-in config.
- Rotate the admin key after operator offboarding, dashboard sharing incidents, or suspected local browser compromise.
- Prefer short-lived deployment access to the host and avoid copying admin keys into issue trackers, screenshots, or shared terminals.
- Keep
auth.admin_fallback_enabled: falsein production so regular API keys never become admin credentials.
Audit Retention
Audit logs are stored in SQLite with the rest of StacyVM state.auth.admin_audit_retention controls native pruning after successful admin audit writes.
Recommended starting points:
| Environment | Retention |
|---|---|
| Local development | 0s |
| Staging | 720h |
| Production | 2160h |
OIDC/SSO Groundwork
Phase 6 keeps API-key behavior as the implemented authentication mechanism. Future OIDC/SSO support should fit into the request identity model added in this phase instead of bypassing it. Proposed config shape:| Claim/Input | StacyVM identity |
|---|---|
| Admin group membership | admin role with api:* and admin:* scopes |
| API group membership | api role with api:* scope |
| Actor claim | Audit actor, replacing the need for user-supplied X-User-ID |
| Subject claim | Stable fallback identity when the actor claim is absent |
- Validate issuer, audience, expiry, and signature before creating an
AuthIdentity. - Reuse
RequireScopefor authorization decisions. - Keep API-key auth available for service accounts and break-glass access.
- Make dashboard SSO optional and separate from API key support.
- Record the identity source in audit attribution so operators can distinguish API-key and OIDC-originated admin actions.
Phase 6 Acceptance Checklist
auth.admin_api_keyis configured separately fromauth.api_key.auth.admin_fallback_enabledisfalsein production.- Admin ingress is restricted to trusted networks or authenticated upstreams.
- Operators send
X-User-IDuntil OIDC supplies actor claims. auth.admin_audit_retentionis set to a production retention window.- Backups include the SQLite database before retention or upgrade changes.

