Skip to content

feat: qualify verified TLS and gRPC mTLS (Phase A) - #81

Open
joey-huckabee wants to merge 6 commits into
mainfrom
feat/phase-a-tls
Open

joey-huckabee wants to merge 6 commits into
mainfrom
feat/phase-a-tls

Conversation

@joey-huckabee

@joey-huckabee joey-huckabee commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

SeaweedFS 4.53 can encrypt all eight lakehouse listeners, but its native gRPC identity policy cannot meet Phase A's strict target-identity requirement. This PR adds qualification evidence and fail-closed host-side profile preflight while keeping Phase A BLOCKED.

The new four-role fixture uses independent role client identities and mounts only each role's private TLS material. It exercises HTTPS and gRPC mTLS on master, volume, filer and S3; verifies exact socket inventory and restricted runtime; performs signed object write, byte-exact read, delete and post-delete 404 controls; and runs identical IPv4/IPv6 certificate and plaintext assertions on native amd64 and arm64. S3 HTTPS requires client certificates under the owner's stricter every-listener decision. No upstream binary, image contents, runtime defaults, or S3 authorization implementation changes.

The preflight is a host-side Python/TOML/OpenSSL validator, not a new image entrypoint guard. It rejects missing/malformed TLS material, mismatched keys, missing/wrong SANs, expired/wrong-role leaves, policy/flag/environment overrides, foreign key mounts and verification downgrades before launching the bounded recipe. User authentication/OpenID remains Phase B.

Two native-policy blockers are explicit:

  • Correct CN with wrong DNS SAN is accepted by the stock gRPC clients. Fresh role processes still complete real object write/read/delete with the mutated master, volume or filer gRPC server leaf. These three exact-outcome canaries record BLOCKER and fail if behavior changes.
  • S3 reuses one grpc.client option for filer calls and master discovery. The filer-only target policy therefore rejects master discovery with the exact AuthenticateServer: untrusted server identity [master master] diagnostic. That fourth canary remains a BLOCKER; the allowlist is not broadened to hide the missing target selector. Master's shared master/volume outbound option also lacks per-call target selection.

Initial complete TLS evidence: run 43367583286, tested merge abed1b695571784ad14aa31b8cd8d02d9c1a0d1f, PR head 5eb7830. Logs and both amd64 and arm64 artifacts were inspected: 158 PASS and 4 BLOCKER observations on each architecture, cleanup complete. The artifacts include every negative by listener/address family; TLS-PHASE-A.md lists the matrix and evidence boundaries. A green exact-outcome canary suite is not Phase A acceptance.

The latest commit further tightens plaintext refusal to an empty close or Go's exact protocol-error response; application 403s, redirects, timeouts and additional data cannot satisfy it. Final revision checks passed: run 43369046646, tested merge 9f061c6e2bd1eb0f0ace4cac9559d314ca4ccab0, PR head 80bba40. Both final TLS artifacts (amd64, arm64) again contain 158 PASS and 4 BLOCKER observations, with cleanup complete. Every listener/case/expected/actual/status tuple matches across architectures, and image labels match the report's source revision and lock digest. Logs and artifacts were read. All 12 existing native suites, acquisition/assembly checks, scanner jobs, native evidence reconciliation, repository/configuration validation, CodeQL and dependency review passed. Main-only alert publication was correctly skipped on this PR. The stable native image aggregate requires the new native TLS matrix plus the unchanged native functional/scanner matrix and evidence reconciliation. No settings, secrets, branch protection or permission scopes changed.

Local validation: all 123 Python tests, 14 lock-refusal cases, pinned pre-commit checks, YAML validation and diff/line-ending checks passed. Final native scanner artifacts contain findings on both architectures: Trivy 38 including 1 High; Grype 40 including 5 High. These remain inventories, not vulnerability clearance; no exemption or binary remediation is introduced.

Not verified: complete native per-edge wrong-root/expiry/server-role-swap and HTTPS redirect/advertised-address coverage; native S3 callback identity mutations; real TLS AssumeRole (held #80's scope); rotation/revocation and multi-host/platform behavior. Existing manual/non-CI mini-persistence and Iceberg fixtures were not rerun; this work reran the complete existing native CI suite. Scorecard is not a PR-triggered job. Strict S3 client certificates also require client configuration not uniformly exposed by the lakehouse's external clients. None of these becomes a passing exemption.

Coordination: branched from main. Held PRs #79 and #80 were not touched, rebased, merged or duplicated; none of their added files is changed. Unavoidable shared-file overlap is .github/workflows/ci.yml (six additive aggregate/dependency lines), SECURITY.md (appended transport blockers), and CHANGELOG.md (additive qualification entry). Implementation stays in new TLS-specific files; entrypoint, existing S3 client, STS and remote-signing files are untouched. No merge requested or performed.

@joey-huckabee
joey-huckabee marked this pull request as draft November 13, 2026 05:23
@joey-huckabee
joey-huckabee marked this pull request as ready for review November 15, 2026 14:04
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