Skip to content

PR A: REST transport TlsPosture + Basic auth axes (unblocks redfish defork) - #6759

Merged
briansrls merged 17 commits into
mainfrom
session/nimble-eagle-417
Jul 16, 2026
Merged

briansrls merged 17 commits into
mainfrom
session/nimble-eagle-417

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

PR A — REST transport axes (unblocks the redfish defork)

Machinery lane feeding the redfish Scaffold dissolution declared in extdeps/bmc/http.dag (PR #6754). Every redfish.Http op hand-spells curl argv for three axes the shared HTTP-client machinery couldn't express; this PR models and realizes them so PR B can flip those 9 ops to declarative transport rest rows.

Model (extdeps/transports/rest.dag)

  • TlsPosture = VerifyPeer | InsecureAcceptAnyCert (absent = VerifyPeer, fail-closed) — the typed dissolution of curl -k for self-signed BMC certs.
  • RestAuthScheme = BearerToken | HeaderToken | BasicCredentials (+ RFC 7617 anchor) — single-authority for the header value derivation.
  • RestTargetForm = OriginFormOverBase | AbsoluteFormTarget — makes the per-call {bmc_host} target honest/refusable (it already worked via empty-base + full-URL path).
  • RestTransportConfig gains tls: TlsPosture.

Realized — Basic auth (end-to-end, decision-independent)

  • Parse (02_parse.dag): auth_basic: { username, password } and tls: are routed into transport properties (previously the parse_rest_fields else arm silently dropped unknown keys — a §5 fix in itself).
  • Interp (v1_interpreter.rs dispatch_rest): auth_basic → Basic base64(user:pass) Authorization header, hand-rolled base64_encode_std (keeps the shrinking seed dependency-free). Fail-closed: both-auth-declared, missing field, or non-String credential → typed refusal, never an unauthenticated send.
  • Emit (05_emit_rust.dag): emit_rest_basic_auth_line → reqwest native .basic_auth(user, Some(pass)).

Realized — TLS posture

  • Emit: emit_rest_client_init → .danger_accept_invalid_certs(true) for InsecureAcceptAnyCert; stock builder otherwise; unrecognized posture → compile_error!.
  • Interp: VerifyPeer proceeds on the stock rustls verifier. InsecureAcceptAnyCert is a typed fail-closed refusal, STAGED pending an operator decision on the realization approach (accept-any rustls verifier in-seed vs. emit-only vs. pinned-cert) — the axis fails closed, never sends under VerifyPeer while the row asked for insecure, and is witnessable now. This is the one open decision gating full PR B.

Witnesses (green by execution)

  • 4 hermetic emit-checks (rest_transport_axes_emit_witness_test.dag): insecure→danger_accept_invalid_certs(true); VerifyPeer + absent controls omit it; basic→.basic_auth(.
  • 2 Rust unit tests (base64_std_tests): RFC 4648 §10 vectors + the exact BMC credential shape.
  • Interp end-to-end execution receipt (in-session, local auth server): correct creds → 200; wrong creds → HTTP 401 refusal — self-discriminating proof the exact Basic header is built and sent.

Self-host

Two stage0 regens (emit + parser), regen_stage0 --verify → regen_divergence_count=0; fmt clean.

🤖 Generated with Claude Code

briansrls and others added 7 commits July 16, 2026 15:35
…ent (Get + moved Post/Download), curl.dag shrunk to tool authority, redfish hardwired-transport Scaffold row, real-execution witnesses + wet enrollment

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gunbai-bot gunbai-bot Bot changed the title "a fifth http surface" PR A: REST transport TlsPosture + Basic auth axes (unblocks redfish defork) Jul 16, 2026
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review July 16, 2026 18:03
briansrls added 10 commits July 16, 2026 18:11
…ure (refuse-don't-widen §5); dissolution notes on RestAuthScheme/RestTargetForm
…onal-with-default realization); fix {...} interpolation parse error in dissolution notes
…fig-auth + auth_basid both present, refuse-don't-widen §5) matching interp; interp TLS refusal message reflects emit-only decision (operator 2026-07-16, interp retiring)
…, TLS posture disposition, dual-auth conflict) into pure fns + hermetic execution unit tests with discriminating REDs — floor-enrolled §5 witness for the interp path (nextest gate); behavior-preserving refactor
@briansrls
briansrls merged commit 6b438ed into main Jul 16, 2026
3 checks passed
@briansrls
briansrls deleted the session/nimble-eagle-417 branch July 16, 2026 22:10
briansrls added a commit that referenced this pull request Jul 16, 2026
Main advanced with #6759 (REST transport axes) and #6769 (deploy curl
bounds). Three import-header conflicts resolved import-stripped:
roadmap_static_site_witness_test.dag, 02_parse.dag, 05_emit_rust.dag.
00_core.dag auto-merged (transport_auth_basic_key, transport_tls_key).

Co-authored-by: Cursor <cursoragent@cursor.com>
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