Repository navigation
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
SPIFFE settings and validation server/config/config.go, server/config/dashboard_spiffe_test.go, conf/config.toml, docs/dashboard-spiffe.md |
Adds SPIFFE endpoint, timeout, and identity pattern settings. Validation rejects invalid settings and combinations with certificate-file TLS. The config example and documentation describe identity matching, startup behavior, credential rotation, and operational checks. |
Rotating SPIFFE TLS source pkg/dashboard/spiffetls/source.go, pkg/dashboard/spiffetls/source_test.go, pkg/dashboard/spiffetls/main_test.go, go.mod, tests/integrations/go.mod, tools/go.mod |
Adds Workload API credential loading, SVID validation, TLS 1.3 mutual TLS, identity matching, and credential and trust-bundle rotation. Tests cover configuration, startup, rotation, and source cleanup. Module files add or update related dependencies. |
Dashboard manager TLS lifecycle pkg/dashboard/adapter/config.go, pkg/dashboard/adapter/manager.go, pkg/dashboard/adapter/manager_test.go, pkg/dashboard/dashboard.go |
Passes Dashboard configuration to the manager. The manager initializes the SPIFFE source before startup, assigns its TLS configuration, and closes the source on startup failure or shutdown. Tests cover lifecycle and cancellation cases. |
Priority:
Estimated code review effort: 4 (Complex) | ~45 minutes
Change: Feature · Severity of issue fixed: Medium
Sequence Diagram(s)
sequenceDiagram
participant Manager
participant TLSSource as SPIFFE TLS source
participant Dashboard as Dashboard service
Manager->>TLSSource: Initialize source with configured timeout
TLSSource-->>Manager: Return TLS configuration
Manager->>Dashboard: Start service with TLS configuration
Dashboard-->>Manager: Return startup result
Manager->>Dashboard: Stop service with timeout
Manager->>TLSSource: Close source
Suggested reviewers: rleungx
Merge Risk: 
Minimal · up to 0dd0d
-
An unavailable Workload API can slow Dashboard-host status refreshes, but no actionable merge-blocking risk remains.
Pre-merge checks: 
3 · 
2
-
Failed checks: 2 warnings Passed checks: 3 passed-
Full details: Description check
-
Explanation
The description covers the required problem, issue reference, implementation, tests, code changes, side effects, related changes, and release note. It also clearly records known test limitations and pre-existing failures.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue [
#11397]. Configuration, SPIFFE source code, lifecycle handling, tests, dependencies, and documentation directly support embedded Dashboard SQL TLS. The summary identifies no browser TLS, PD cluster TLS, deployment, release-branch, or persistent data changes.
-
Full details: Linked Issues check
-
Explanation
Issue [
#11397] requires native SPIFFE Workload API TLS for embedded Dashboard SQL connections, including rotation, identity authorization, bounded fail-closed startup, lifecycle ownership changes, retained file TLS, and configuration documentation. The change summary and tests cover these coding areas. The issue also requires acceptance coverage for Dashboard login withrequire_secure_transport=ON. The PR explicitly states that real Dashboard login and SQL-backed requests against a running TiDB cluster were not exercised, so this requirement is not demonstrated by an automated test.Resolution
Add an automated Dashboard integration test that uses SPIFFE SQL TLS against a running TiDB setup with
require_secure_transport=ON, and verify Dashboard login and SQL-backed requests. Keep the existing unit and local protocol tests.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 21.74% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 23 functions across 9 files. (5 skipped: 5 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Hi @nanassito. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @nanassito! |
|
/auto-cc |
Signed-off-by: Dorian Jaminais-Grellier <dorian.jaminaisgrellier@reddit.com>
765b4c1 to
0dd0d7f
Compare
What problem does this PR solve?
Embedded Dashboard supports SQL TLS through certificate files, but cannot obtain rotating X.509-SVIDs and trust bundles directly from a SPIFFE Workload API. Deployments using SPIFFE identities for SQL mTLS currently need separate credential-file and rotation plumbing; the existing file-based integration does not provide SPIFFE URI identity authorization.
Issue Number: close #11397
What is changed and how does it work?
[dashboard]configuration for a Unix Workload API endpoint, initialization timeout, and explicit client/server SPIFFE identity patterns. Reject incomplete settings and mixing SPIFFE with certificate-file TLS.Check List
Tests
-raceforpkg/dashboard/spiffetls,pkg/dashboard/adapter, andserver/config, plus the provider's goroutine-leak verification.make check GO_EFFECTIVE_TOOLCHAIN=go1.26.8stops at two pre-existingmodernize@v0.52.0findings, independently reproduced on pristine base431d773c8752:pkg/schedule/schedulers/hot_region_solver_test.go:1225(range over int) andpkg/statistics/hot_peer_cache_test.go:942(t.Context).Code changes
Side effects
Related changes
Release note
Summary by CodeRabbit