Repository navigation
Fix guard enforcement and weak-client visibility - #542
novatechflow wants to merge 6 commits into
Conversation
QA code review of head 14bfc97Verdict: not clean. 4 findings should be fixed before the tag (1 to 4), 1 medium and several low ones can go in the same push. This review was done by reading the code only. No tests, vet, lint or builds were run; CI does that. Goal checked against: reject only with the guard on and Findings1. High: the weak client list gives a false all-clear before 2. High: the console service account gets 3. Medium: 4. Medium (non-admin, so fix in code): any user who can create a Pod can fake or hide Guard tab rows ( 5. Medium: one slow replica hides the others ( 6. Low: log and CPU flooding from many source addresses ( 7. Low: old strict proxy Pods can no longer be updated after the upgrade (new guard rule in the proxy admission policies) 8. Low: 9. Low: the Guard view says "Rejecting" from the cluster spec, not from the proxy 10. Low (docs): the "guard on" fallback was removed but the docs still describe it 11. Nits
Checked and fine
Not verified
|
QA code review of the new commits (14bfc97 to fd7dc79), head fd7dc79Verdict: not clean. One high finding (A) and one medium (B, C) should be fixed before the tag. The rest are low. Reviewed by reading the code only; no tests, vet, lint or builds were run. The API check was not repeated: the only exported changes since the last check are additions in the TLS package (the guard audience, console user and token path constants, the client snapshot type and its method), which are compatible. Status of my 11 earlier findings
New findingsA. High: with B. Medium: the operator now holds cluster-wide update and delete on ServiceAccounts, RoleBindings and ClusterRoleBindings, and the docs do not say so (operator ClusterRole) C. Medium: the console token is sent in clear text to any Pod that passes the ownership checks, and in a shared namespace a tenant can pass them ( D. Low: any Pod that can reach the health port can use up the TokenReview budget ( E. Low: the 1,024 entry list is shared by all reasons ( F. Low: the Guard list call holds one lock for the whole fan-out and does not cache failures ( G. Low: every proxy Pod now carries a service account token that can create TokenReviews cluster-wide Checked and fine
Not verified
|
QA code review of the new commit (fd7dc79 to ae96ed4), head ae96ed4Verdict: clean for hand-off, with three low notes that do not block. A to G from my last report are closed or accepted with documentation (details below). Reviewed by reading the code only; no tests, vet, lint or builds were run. No exported Go names changed in this commit (only unexported fields and functions, plus the internal console package), so the API check was not repeated. Status of A to G
Low notes
Checked and fine
Not verified
|
Weak clients are rejected only when the guard is enabled and
pq-strictis active. Other modes accept them and WARN with their address. Strict readiness uses the full ClientHello (TLS 1.3 and ML-KEM-1024 offered), including hybrid-only clients that would fail a later switch to strict mode. Address-bearing logs, pending rejections, retained metadata and client lists are bounded; addresses and certificate subjects never become metric labels. Readiness/rejected rows take priority over other observations, which occupy at most 256 of the 1,024 rows.The authenticated Guard tab shows each verified replica's actual rejecting/logging mode and recent clients, with reason filtering, full-width layout and condition-status durations. Mixed or unavailable replicas produce an amber result. Discovery verifies the expected Deployment, ReplicaSet/Pod controller UIDs and Pod template, with paginated listing, four parallel reads and two-second replica deadlines. Collection has a ten-second deadline; concurrent callers share it and successes/failures are cached for five seconds.
Client telemetry requires an isolated namespace. Managed proxies need a current
ProxyNamespaceIsolated=Truecondition, a dedicated namespace and no shared-namespace exception. Shared, stale or unverified namespaces receive no bearer token and display "Namespace isolation not verified". This also leaves telemetry unavailable when the operator guard is off or no active policy produces an isolation check; proxy WARNs remain available. Standalone collection requires the guard, an active TLS floor and a dedicated namespace without a shared exception.The console only reads KafscaleClusters cluster-wide. Namespace RoleBindings grant proxy discovery; there is no
pods/proxypermission. Proxy endpoints require an audience-bound console token validated through TokenReview and the exact console service-account identity. Only accepted tokens are cached, at most 30 seconds and never past expiry, with oldest-entry eviction. General reviews are limited per source and globally; the last accepted token has a reserved budget and concurrency slot. The audience token cannot authenticate to the Kubernetes API. Health reads still use HTTP and require protected cluster networking; the docs describe replay exposure and the proxy account's TokenReview validity-oracle risk.With custom RBAC, optional telemetry provisioning/cleanup failures are logged and set
GuardClientAccessReady=False; proxy rollouts and security updates continue. The chart selects its proxy guard account only when it creates it. Managed proxies select it only after successful provisioning. The operator may bind only the two named roles; its account/binding get/list/create/update/delete privileges remain cluster-wide and are disclosed, including the absence of an RBAC label restriction and administrator provisioning/cleanup requirements.Both served CRD versions and the hook copy preserve condition
observedGeneration. Live exposure findings survive key-history write failures. Legacy strict Pods without the guard variable may receive unchanged-spec metadata updates; new workloads and attempts to remove an existing guard variable remain denied.Closes #539
Closes #538
Closes #534
Closes #537
Validation:
A live-cluster release QA run has not been performed.