Skip to content

[Feature]: persistent WebUI auth on remote binds — configurable session lifetime or non-token login #4055

Description

@nordz0r

Area

Dashboard

What are you trying to accomplish?

I operate the dashboard on a remote bind (non-loopback, behind a reverse proxy on a k3s/homelab hub). I open the dashboard from desktop and mobile browsers and need the session to persist across page reloads and browser restarts without re-entering the raw admin token.

What prevents this today?

Per the management-auth docs, session issuance is disabled whenever data-plane authentication is required (remote binds):

Session issuance is disabled whenever data-plane authentication is required, which includes remote binds. A remote operator must authenticate with the raw admin token; no loopback-style GUI session is minted.

Loopback binds get short-lived ocx_session_* credentials (5 minutes), but remote operators are left with the raw admin token prompt on every fresh page load / browser session. There is no configurable session lifetime and no alternative auth path for the remote-bind dashboard.

What should OpenCodex do?

When a remote operator enters the admin token once, the dashboard should issue a persistent GUI session (cookie with SameSite=Lax + HttpOnly) whose lifetime the operator controls, so that reloading the page or reopening the browser does not prompt for the token again until the configured TTL expires.

Concretely, at least one of:

  1. dashboard.sessionTtlMinutes config key (default 5 for loopback parity; remote operators can raise to hours/days at their own risk).
  2. Alternative non-token auth: reverse-proxy Basic auth pass-through, OIDC/SSO callback, or a "remember this device" scoped credential.

Example usage or interface

In ~/.opencodex/config.json:

{
  "dashboard": {
    "sessionTtlMinutes": 1440
  }
}

Or via CLI:

ocx config set dashboard.sessionTtlMinutes 1440

Before: reload dashboard → window.prompt("OpenCodex API token") on every page load.
After: reload dashboard → session restored from cookie until TTL expires; prompt only appears again after expiry.

Alternatives or workarounds

  • Storing the raw admin token in browser localStorage / password-manager autofill — defeats the masking posture the dashboard otherwise maintains (credential redaction in management responses).
  • Tunneling the dashboard through an SSH/loopback proxy so the loopback session path applies — awkward on mobile.

Additional context

Checks

  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestguiDashboard, tray, settings UIproxyHTTP proxy, routing, reverse-proxy / management auth

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions