Skip to content

Constrain diagnostic transport options in lemctl lucius - #754

Open
baijupn wants to merge 3 commits into
openconfig:mainfrom
baijupn:fix/lucius-cli-transport-39703131
Open

baijupn wants to merge 3 commits into
openconfig:mainfrom
baijupn:fix/lucius-cli-transport-39703131

Conversation

@baijupn

@baijupn baijupn commented Oct 13, 2026

Copy link
Copy Markdown

Summary

Require verified TLS for remote lemctl lucius diagnostic connections while
preserving plaintext access to the standalone daemon through literal loopback
IPs.

  • Share transport policy across info, sai, and SAI completion.
  • Reject enabled --tls_skip_verify with a migration message and add
    --tls_ca_cert for private CA bundles without disabling certificate checks.
  • Restrict --insecure to literal loopback IPs and numeric ports, connecting
    directly without resolver or proxy routing.
  • Add command and transport regression tests, Bazel targets, and a short
    documentation update.

The standalone daemon and C++ SAI client are unchanged. This change concerns the
separately built diagnostic CLI and does not assume it is packaged in downstream
images.

Verification

Validated locally on base commit
194a7d5827d97ec637c541d46684ac206284af6f:

Check Result
go test -race -count=1 -timeout=3m -v ./dataplane/luciusctl/... Passed; 140 focused cases
go build ./cmd/lemctl Passed
go vet ./dataplane/luciusctl/... ./cmd/lemctl/... Passed
Configured golangci-lint and formatting checks on affected packages Passed
bazel build //... Passed
make coverage 51 of 51 test targets passed
make test-race 11 of 11 selected test targets passed
Final uncached affected Bazel targets 3 of 3 passed

Focused Bazel command:

bazel test \
  //dataplane/luciusctl:luciusctl_test \
  //dataplane/luciusctl/internal/transport:transport_test \
  //dataplane/luciusctl/sai:sai_test \
  --test_output=errors --cache_test_results=no

Coverage includes trusted TLS, rejected invalid certificates and legacy options,
local plaintext operation, address boundaries, proxy avoidance, and SAI
completion. The focused Go suite explicitly uses the race detector because the
repository-wide race target excludes dataplane packages.

Disposable-server checks against the actual built CLI also passed for loopback
and isolated non-loopback targets. Baseline rejection tests failed before the
change and passed afterward. An intermediate test-source error was corrected;
the final source passed the checks above. Hosted CI results remain pending.

@baijupn
baijupn requested a review from a team as a code owner October 13, 2026 14:00
@google-cla

google-cla Bot commented Oct 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

baijupn and others added 2 commits October 14, 2026 14:46
Apply one transport policy to diagnostic info and SAI commands, including
completion. Support private CA trust without disabling certificate checks,
retain local plaintext diagnostics, and test the connection boundaries.

Signed-off-by: Baiju Parameswaran <baijup@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db2e0f10-3729-4d5d-b4da-3654eb856d74
Signed-off-by: Baiju Parameswaran <baijup@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db2e0f10-3729-4d5d-b4da-3654eb856d74
@baijupn
baijupn force-pushed the fix/lucius-cli-transport-39703131 branch from 611ef89 to f99127a Compare October 14, 2026 15:55
@sonikajindal

Copy link
Copy Markdown
Contributor

@hardikharti can you pls check this PR?

Comment thread dataplane/luciusctl/BUILD Outdated
Comment thread dataplane/luciusctl/internal/transport/BUILD Outdated
Reuse the Cobra and Viper dependencies supplied by the embedded libraries instead of declaring them again on the internal test targets. Keep only these dependency attributes explicit so Gazelle does not recreate the redundant entries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: db2e0f10-3729-4d5d-b4da-3654eb856d74
Signed-off-by: Baiju Parameswaran <baijup@microsoft.com>
@hardikharti

Copy link
Copy Markdown
Contributor

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Please fix this before we can review the changes thoroughly.

@baijupn

baijupn commented Oct 23, 2026

Copy link
Copy Markdown
Author

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.

Please fix this before we can review the changes thoroughly.

I have requested CLA with baijup@microsoft.com with Individual CLA. Please let me know if this may be checked and approved ..

Thanks

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.

4 participants