Skip to content

fix(api): the auth-off startup arm now reports instance_exposed (BACKLOG #1013, ASVS 6.3.3) - #256

Open
wshallwshall wants to merge 2 commits into
mainfrom
fix-1013-authoff-startup-arm
Open

fix(api): the auth-off startup arm now reports instance_exposed (BACKLOG #1013, ASVS 6.3.3)#256
wshallwshall wants to merge 2 commits into
mainfrom
fix-1013-authoff-startup-arm

Conversation

@wshallwshall

Copy link
Copy Markdown
Collaborator

Fixes BACKLOG #1013. Plus 5 doc-accuracy files.

The auth-off startup arm did not surface instance_exposed, so an instance running with
authentication disabled did not announce that fact at the point an operator would see it. ASVS 6.3.3.

⚠️ ADJACENCY (no conflict, shared file): docs/DEPLOYMENT.md is also touched by #329. Verified
merge-tree clean against it -- they touch different regions.

Claimed FROM the lane worktree; claim gate passed honestly. Verified: merge-tree clean against
current main, merged-tree heading count 142 matching main.

…ACKLOG #1013)

The `[auth] enabled=false` startup arm keyed on the bind alone
(`not settings.api.is_loopback`), so it did not fire for a loopback bind
behind a declared upstream TLS terminator. A PHI instance with
authentication entirely off behind a declared terminator would have
started with no refusal and no warning on first deployment, while the same
topology with auth on but MFA off is already refused by the gate #326
fixed. The two arms disagreed about what "exposed" means in the same file.

Hoist the single `instance_exposed` definition (#326: an off-loopback bind
OR a declared upstream TLS terminator) above the auth-off arm and widen the
arm to consult it, so it refuses on a non-loopback bind OR a declared
terminator. The existing loopback refusal is kept; the condition is
widened, not replaced.

Load order verified: `instance_exposed`'s inputs -- `settings.api.host`
(through `is_loopback`) and `settings.api.tls_terminated_upstream` -- are
read straight off the loaded config, and the only in-place mutation of
`settings.api.*` between the hoisted definition and the former site is
`serve_ui` (twice), which the predicate does not read. The definition
remains defined exactly once.

Tests (tests/test_cli.py): auth off + declared terminator on a loopback
bind refuses (positive); auth off + true loopback with no terminator still
starts (negative control); auth on + declared terminator is unaffected by
the arm. Each was falsified -- reverting the arm to the bare bind check
reds the positive test, firing on any auth-off reds the negative control,
and dropping the auth check reds the auth-on test; each was restored.

Docs updated so the contract travels with the code (CLAUDE.md 11):
DEPLOYMENT.md, SYSTEM-REQUIREMENTS.md, SECURITY.md, REMOTE-CONSOLE.md and
SECURITY-LOOSENING.md now describe the auth-off refusal as firing on an
exposed instance (a non-loopback bind OR a declared terminator), not on the
bind alone.

BACKLOG #1013
…ion (BACKLOG #1013)

Flip the #1013 banner from filed/open to fixed and record, in the AMENDED
blockquote, that the load-order prerequisite the item flagged as unproven
holds: `instance_exposed`'s inputs resolve where the auth-off arm runs.
Name the single-definition pointer comment rather than pin its line number,
since the hoist shifts that line.

Banner flip only: the ranked table and the four census distribution lines
were NOT recomputed.

BACKLOG #1013
@wshallwshall
wshallwshall enabled auto-merge (squash) August 6, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant