Oblive Docs
Configuration

Authentication and Secrets

Keep agent, service, infrastructure, and provider credentials in the boundaries that own them.

Oblive uses several distinct credential classes. They are not interchangeable.

Frontend Sign-In

Login is optional. New installations ask whether to enable Clerk; pressing Enter skips it. With login skipped, the frontend works without Clerk keys, account controls, or Clerk network requests. Anyone who can reach that frontend can use it. Existing configuration is preserved on reinstall.

When enabled, the TanStack Start frontend uses Clerk for sign-in and account management. Every protected page, server function, attachment upload/download, and chat event stream requires a Clerk user with at least one verified email address on exactly skyfall.ai. Subdomains and lookalike domains do not qualify. All admitted users share access to all Oblive organizations. There is no local user table, Clerk Organizations integration, or per-user organization membership policy.

The frontend checks the user against Clerk once per incoming protected request. Missing sessions redirect pages and server functions to /sign-in; raw API requests return 401. Signed-in users without an allowed verified address are sent to /access-denied, and raw API requests return 403. Failed Clerk lookups return 503 and never run the protected handler. Protected responses are private and cannot be cached. Authentication navigation reloads the document so cached router data is discarded when changing accounts.

For a source checkout, run these commands from apps/frontend after logging into the Clerk CLI:

bunx clerk@latest link --app YOUR_CLERK_APPLICATION_ID
bunx clerk@latest env pull --instance dev --file .env.local
bunx clerk@latest doctor

The ignored .env.local file is a Clerk CLI-managed development override. Do not commit it or put secret keys in VITE_* variables. The sign-in methods come from the selected Clerk application; the frontend uses Clerk’s prebuilt components rather than implementing passwords or OAuth itself.

For Compose and portable installs, configure the following in the ignored local-stack.json and regenerate environments with bun run stack env (or the portable configuration workflow):

{
  "clerk": {
    "publishableKey": "pk_test_replace-with-your-publishable-key",
    "secretKey": "sk_test_replace-with-your-secret-key"
  }
}

These become CLERK_PUBLISHABLE_KEY and CLERK_SECRET_KEY only in frontend environments. The publishable key is delivered through Clerk’s server-rendered provider state; the secret stays on the frontend server. Keys are runtime configuration, so production images do not need secrets at build time. Omitting both keys disables login; supplying only one is a configuration error and never grants anonymous access. To disable login on an installed stack, remove the clerk object from local-stack.json and run oblive restart to regenerate the frontend environment. Source checkouts must also remove both keys from any local environment overrides. Production deployments with login need their own Clerk production keys, domain setup, and allowlist configuration.

In the Clerk application, configure the allowlist identifier *@skyfall.ai and enable both allowlisting and enforcement on sign-in. This rejects other domains during authentication; the frontend’s verified-email check also protects against existing sessions and settings drift.

This gate protects the frontend server boundary. It does not authenticate direct requests to the separate Express backend. Keep the backend private or behind an external access policy, including when using a public tunnel. Agent service tokens and integration OAuth callbacks retain their existing authentication rules.

Agent Harness Authentication

The installer defaults to local Codex authentication. It offers the official Codex CLI when needed and installs it without launching a nested Codex session. It then checks codex login status and opens codex login only when the host is not already signed in. After installation, use the equivalent oblive auth status and oblive auth login commands.

Local mode mounts only the host Codex auth.json into a dedicated synchronizer. That single Compose service validates the file and atomically installs a strictly newer credential generation into the container-owned persistent Codex home shared by chat and task workers. The agent containers cannot read the host file directly.

Host file changes are normally detected immediately. A configurable fallback scan runs every authSyncIntervalSeconds (60 seconds by default). This scan is a low-cost safety net; it does not run before every chat turn or task.

The synchronizer does not sign in to Codex or mint credentials. If the deployment credential is no longer valid, update the host auth.json. A failed execution requests an immediate synchronization and retries once only when a newer generation was installed and no agent item had started. Other failures are not replayed automatically. The UI reports that Codex authentication failed and asks for an administrator to update the deployment credential.

API-key mode reads the configured host environment variable and does not start the file synchronizer. Export that variable in every shell that starts or validates Oblive; the key is not stored in local-stack.json. Neither mode copies personal plugins, sessions, global skills, or the complete host configuration into the service container.

Agent Service Token

The backend uses agentServiceToken to authenticate trusted chat and worker control-plane calls. Use a strong local value and never expose it in frontend code, screenshots, docs, or provider setup.

The trusted runtime never forwards this token into the model environment. After claiming a task run or chat turn, the backend issues a short-lived execution capability scoped to that organization, profile, and exact execution. Agent-facing control-plane calls use that capability; organization, profile, run/chat identity, department ownership, and active-root authority are rechecked by the backend on every mutation.

Integration Credential Encryption

integrationCredentialKey encrypts organization provider credential envelopes. The plaintext credential is write-only and is decrypted only inside the provider gateway when an authorized run needs it.

Standard MCP OAuth credentials also include reusable client information and cached provider discovery metadata. They are encrypted in the same integration credential envelope. A deployment-level public client ID such as metaAdsOAuth.clientId is configuration rather than an organization secret; organization tokens remain encrypted per integration. Automatic token refresh replaces the envelope only if the credential being refreshed is still current, preventing a late refresh from restoring access after a reconnect or disconnect. Meta currently provides no refresh token in this flow. Its observed lifetime is approximately 60 days, but provider metadata is authoritative; an expired Meta token requires reconnection.

OAuth client IDs and redirect URLs are deployment configuration, not organization secrets. Google client secrets remain secrets and belong only in ignored machine-local configuration or the deployment secret store. Never paste a usable client secret into issues, documentation, chat, or source control; rotate it if that happens.

Organic X uses a deployment OAuth 2.0 client ID and encrypted organization tokens. X Ads uses a separate OAuth 1.0a consumer key and secret plus encrypted per-organization access-token pairs. The X Ads consumer secret is deployment secret material and must remain backend-only. Neither connector credential enters an agent environment or workspace.

Provider-specific callback selection is backend-owned. Meta, X, and X Ads may use their dedicated redirect variables, while other managed MCP providers retain MCP_OAUTH_REDIRECT_URI. The exact selected URI is stored in one-use state and reused for exchange. After connection, direct providers read credentials only inside the backend; the agent and its workspace never receive them.

Provider Credentials

Provider API keys and OAuth refresh credentials belong to the organization integration. They must not appear in:

  • source control;
  • agent prompts or skills;
  • context manifests;
  • task workspaces;
  • general process environment;
  • provider URLs;
  • logs; or
  • action receipts.

Local Infrastructure Credentials

PostgreSQL and Garage credentials belong only in local configuration. The portable installer generates strong values in mode-0600 ~/.oblive/local-stack.json; source checkouts use an ignored configuration whose tracked example contains placeholders. Never commit or share either set of usable values.

Public tunnel URLs are not secrets, but they expand the local stack’s attack surface. When configured, Clerk gates the frontend; the backend hostname still needs an external access policy or private networking. Never expose an unrestricted backend tunnel.

Rotation

  • For local Codex mode, run oblive auth login; the synchronizer installs the newer auth.json generation without exposing it to chat or worker containers.
  • Rotate a provider credential through the Integrations screen and recheck readiness.
  • Disconnect before changing an OAuth identity when provider identity continuity is enforced.
  • Treat integration encryption-key rotation as a migration, not a normal provider rotation.
  • Restart affected services after changing service or infrastructure credentials.