Repository navigation
Sign in to Web with the Core key and rename its configuration - #124
Merged
Merged
Conversation
Web now has one management credential, the Core key. The console accepts
POST /console/auth/login with {"core_key": ...}, compares it with its
configured key in constant time and issues the existing in-memory session
cookie. Console accounts, first-run setup, bcrypt password state, Basic
authentication and the legacy mode are removed. GET /console/auth reports
only login or authenticated, and /console/config no longer reports the
sandbox_admin and api_keys flags. Management requests forwarded by the
console carry the fixed audit actor label "console".
Configuration uses Core key names, with no fallback: admin/core.key,
admin/core-key-digests.json, AGENTS_API_CORE_KEY_DIGESTS_FILE and
CORE_CONSOLE_CORE_KEY_FILE. Core and Web refuse to start when an old name
is set and name its replacement; Web also refuses the retired
CORE_CONSOLE_AUTH_MODE, CORE_CONSOLE_STATE_DIR and
CORE_CONSOLE_PASSWORD_FILE. The installer writes the new files and
settings, drops console account state and renames --admin-token-file to
--core-key-file.
The operations guide gains a Core key section covering its location,
scope, privacy, rotation and the upgrade steps for existing installations.
The console compared the key only after charging a global budget of ten attempts per minute, so anyone could keep Web sign-in blocked. It now compares first, in constant time, and charges the budget only for failed attempts: the correct key always signs in, while further wrong keys get 429 with Retry-After. The worker bound stays. Because correct keys are never limited, Web and the Web-only installer now refuse a Core key shorter than 32 characters. Core loads only digests and cannot check the length. Installer-generated keys have 64. The audit docs now say the actor label is caller-asserted and display-only, and the rotation steps run in a subshell, recreate services with --no-deps, cover core-only installations and state the minimum length. Two remaining "deployment credential" mentions in the quickstart and operations guides now say Core key.
SaladDay
force-pushed
the
codex/core-key-login
branch
from
September 25, 2026 14:08
372555f to
aa900f1
Compare
SaladDay
added a commit
that referenced
this pull request
Sep 25, 2026
…125) Keep #124's Core-key sign-in, fixed console actor label and configuration names; the console still forwards every signed-in /core/v1 request by the prefix rule instead of the removed allowlists. Installer, console tests and docs take #124's wording with /core/v1 paths in place of /core/v1/admin. #123's allocation test uses automatic placement, since P4 removed explicit node selection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sign in to the Web console with the Core key, and rename the Core key configuration. This is the backend P2a batch combined with the frontend login change (#120), merged as one PR so main never has mismatched login contracts.
Backend
Console authentication:
GET /console/auth→{"mode":"login"|"authenticated"}.POST /console/auth/loginwith{"core_key"}→ 200 and an HttpOnly, SameSite=Strict session cookie. Errors: 401 wrong key, 400 malformed, 415 non-JSON, 429 withRetry-After, 503.POST /console/auth/logout.CORE_CONSOLE_AUTH_MODEandCORE_CONSOLE_STATE_DIR.Audit actor: Web operations carry the display-only label
console. The label is caller-declared and is never used for authorization./console/config: no longer returnssandbox_adminorapi_keys.Configuration renames:
admin/sandbox-admin.keyadmin/core.keyadmin/digests.jsonadmin/core-key-digests.jsonAGENTS_API_SANDBOX_ADMIN_DIGESTS_FILEAGENTS_API_CORE_KEY_DIGESTS_FILECORE_CONSOLE_ADMIN_TOKEN_FILECORE_CONSOLE_CORE_KEY_FILE--admin-token-file--core-key-fileOld names fail at startup with a message naming the new one.
Docs: new
docs/getting-started/operations.md#core-keycovering location, scope, privacy, rotation and upgrade renames; install, configuration and API docs updated.Frontend (#120)
sandbox_adminis treated as granted.Validation
Backend: console,
cmd/serverand api tests; 129 installer tests.Real check: a real Core, console and PostgreSQL covering sign-in, the lockout fix, the
/core/v1proxy with and without a session, Core-key direct access to/core/v1(200) and to/v1(401), old-name startup failures, and the rotation steps.Frontend: typecheck, 327 unit tests and 15 browser acceptance tests passed on the frontend side.
Gate: full
make check(server mode) passed on the final combined head98015ce6: the backend rebuilt on maincc4acc1f, then the frontend login commits, then a merge of main3c31ade9. Playwright browser cases were skipped on the server (Chrome unavailable; user-approved skip). The frontend ran the 15 browser acceptance tests, including Core-key sign-in, the lockout and a fresh install, on the same head.Review: an independent security-focused blind review by a fresh Claude subagent found no P0/P1. Its findings were small and verified by tests and the gate, without a second review round:
Nonblocking: the concurrent sign-in worker bound can briefly answer 429 "busy" during a flood.