test(bdd): assert plaintext TLS rejection - #1323
Conversation
Require the plaintext Watch probe to report the expected TLS transport failure, and assert that the wiring suite executes the exact probe. Relates-to: #1305 Signed-off-by: Mike Camp <mcamp@nvidia.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Assert the client-observable grpcurl deadline from a verified TLS listener while rejecting unrelated command, proto, usage, and endpoint failures. Relates-to: #1305 Signed-off-by: Mike Camp <mcamp@nvidia.com>
|
Correction pushed in Evidence:
The PR body and before/after Mermaid diagrams now describe the client-observable behavior. Ready for independent re-review; no merge requested. |
Match only the complete grpcurl dial-stage diagnostic for the expected listener so successful Watch snapshots followed by RPC deadlines cannot satisfy the plaintext rejection check. Relates-to: #1305 Signed-off-by: Mike Camp <mcamp@nvidia.com>
|
Strict dial-stage correction pushed in The previous substring match could accept a successful plaintext Watch snapshot followed by the normal stream Validation:
The PR body and Mermaid diagrams now describe the strict full-line decision. Head |
|
Independent review of current head 0a85136 found no Critical, Important, or Minor issues. The strict target-specific dial-stage diagnostic and its snapshot-plus-RPC-deadline regression coverage passed, along with focused wiring tests, the short BDD suite, Go vet, ShellCheck, configured baseline-excluded lint, DCO, sensitive-string checks, and diff hygiene. CodeRabbit skipped review because this PR targets a stacked, non-default base. #1323 is ready to integrate into #1308; the parent live topology test remains the integration gate. No merge was performed. |
Signed-off-by: Mike Camp <mcamp@nvidia.com>
TL;DR
Strengthens the plaintext rejection coverage in #1308 so it accepts only the complete client-observable
grpcurldial-stage timeout from the expected TLS listener. A successful plaintext Watch snapshot followed by the stream deadline cannot satisfy the check.Additional Details
WatchStargatesprobe and requires the complete evidenced diagnostic:Failed to dial target host "127.0.0.1:50071": context deadline exceeded.Before
After
flowchart LR A["OpenSSL verifies certificate and ALPN h2"] --> B["Exact plaintext Watch command"] B --> C{"Complete dial-stage line for 127.0.0.1:50071 only?"} C -->|Yes| D["Stable TLS-listener rejection marker"] C -->|No| E["Test fails"] F["JSON, RPC status, extra output, or wrong target"] --> E D --> G["Trusted TLS Watch succeeds"] G --> H["Healthy TLS endpoint rejects plaintext"]For the Reviewer
Please review the exact diagnostic equality check and its focused red/green tests, plus the exact-command assertion in
godog_test.go. The accepted line was reproduced withgrpcurl1.9.3 against a real local TLS listener on the BDD target port. The regression test proves a successful plaintext snapshot followed byDeadlineExceededis rejected.For QA
DeadlineExceeded: rejected.go test -short -count=1 ./...: passed.go vet ./...: passed.ST1005findings in unchangeddsl/manifests.go: 0 issues.git diff --check, gofmt, DCO, and sensitive-string checks: passed.No separate QA run is needed; the parent PR's live topology test remains the integration gate.
Issues
Relates to #1305
Relates to #1292
Checklist