Skip to content

fix(mecatui): persist trusted server CA certificates - #1233

Open
JAORMX wants to merge 8 commits into
mainfrom
fix/886-persist-server-ca
Open

fix(mecatui): persist trusted server CA certificates#1233
JAORMX wants to merge 8 commits into
mainfrom
fix/886-persist-server-ca

Conversation

@JAORMX

@JAORMX JAORMX commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • persist a login-supplied gRPC server CA independently from the OIDC issuer CA
  • reuse saved server trust on later mecatui connect ADDRESS calls while preserving explicit --tls-ca precedence
  • add registry, login/discovery, and production transport regression coverage
  • document the durable TLS decision in ADR 0310 and the operator/user-facing guides

Closes #886

Verification

  • go test ./cmd/mecatui ./internal/adapter/clientauth
  • task lint
  • task test
  • task docs
  • task site:build
  • go run ./cmd/mecademo

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MoE review (security / architecture / test-adequacy / docs-sync, modeled on the pr-review-toolhive skill's category→agent mapping). Overall: the issuer/server CA trust split is genuinely preserved end-to-end, and most of the change is well-tested. One functional regression (finding 1) and a process/doc mismatch (finding 2) should be resolved before merge; the rest are cleanups worth folding into this PR since the diff is still small.

Comment thread cmd/mecatui/main.go
**Contract:** human-reviewed/v1
**Phase:** focused mecatui remote-login capability
**Status:** in-progress, 2026-09-08
**Delivery:** Split

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] Delivery classification doesn't match how this PR actually shipped.

This plan is tagged Delivery: Split, but PR #1233 ships the acceptance plan, the ADR, and the full implementation together in one PR — i.e. Combined, not Split (per AGENTS.md, Split means /to-acceptance-plan opens a Plan/Interface PR that stops before implementation).

It also doesn't qualify for the Combined exception as written: that requires every runtime/public/operator/persistence/trust-boundary category to be None — rationale, but this plan's own Interface Contract section lists real content for CLI/config (--server-tls-ca PATH) and Security/authority (override precedence, verified-TLS requirement).

Please either retag this as Combined with a rationale for why splitting added no review value here, or split the PR per the documented workflow.

Comment thread internal/adapter/clientauth/store_test.go
Comment thread internal/adapter/clientauth/store.go
Comment thread cmd/mecatui/login.go Outdated
Comment thread internal/adapter/clientauth/store.go Outdated
Comment thread cmd/mecatui/login.go
Comment thread cmd/mecatui/login.go Outdated
Comment thread internal/adapter/clientauth/store.go Outdated
@JAORMX
JAORMX force-pushed the fix/886-persist-server-ca branch 3 times, most recently from 62397b8 to 9948a24 Compare September 9, 2026 14:24

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MoE panel re-review (spec / standards / test-adequacy / security / architecture / library-reuse / duplication axes) of the 2026-09-09 fix commits. The original HIGH finding (saved CA restored only on the OIDC path) is genuinely fixed, with real regression tests across all three connect modes, and the four cleanup items from the prior round are resolved. Two new items need a look before merge: a cross-confirmed confirmation-bypass bug in the discovered-login flow (finding 1), and two acceptance-plan process items (findings 2–3) that don't match how this PR actually shipped. Findings 4–7 are non-blocking cleanups worth folding in since the diff is still small.

Comment thread cmd/mecatui/login.go
Comment thread docs/acceptance/persist-mecatui-server-ca.md Outdated
**Contract:** human-reviewed/v1
**Phase:** focused mecatui remote-login capability
**Status:** in-progress, 2026-09-08
**Delivery:** Split

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[BLOCKER] Delivery: Split doesn't match how this PR shipped. Split requires a separately-merged Plan/Interface PR before implementation lands (docs/development-process.md, "Split path"). This PR ships the acceptance plan, ADR 0319, and the full implementation together in one PR — that's Combined-shaped, but it doesn't meet Combined's eligibility bar either (missing **Expected tasks:** 1 and a non-placeholder **Combined rationale:**). The PR description also has no "Contract linkage" section disclosing a spine waiver (contrast with #1338, which explicitly documented one). Please correct the classification or add the waiver disclosure.

Comment thread docs/acceptance/persist-mecatui-server-ca.md Outdated
Comment thread cmd/mecatui/login.go Outdated
Comment thread cmd/mecatui/main.go Outdated
Comment thread cmd/mecatui/connect_test.go
@JAORMX
JAORMX force-pushed the fix/886-persist-server-ca branch from 9948a24 to ed60f07 Compare September 11, 2026 13:25
JAORMX and others added 8 commits September 11, 2026 17:27
Co-Authored-By: mecatl <noreply@stacklok.com>
Co-Authored-By: mecatl <noreply@stacklok.com>
Co-Authored-By: mecatl <noreply@stacklok.com>
Co-Authored-By: mecatl <noreply@stacklok.com>
Co-Authored-By: mecatl <noreply@stacklok.com>
Co-Authored-By: mecatl <noreply@stacklok.com>
Co-Authored-By: mecatl <noreply@stacklok.com>
Co-Authored-By: mecatl <noreply@stacklok.com>
@JAORMX
JAORMX force-pushed the fix/886-persist-server-ca branch from bda7b3e to 141b6f4 Compare September 11, 2026 14:29
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.

Connecting to a private-CA mecatui server requires retyping the TLS CA path on every connection

2 participants