Skip to content

feat(data): add a flag to skip TLS verification of the data endpoint - #519

Closed
duckhawk wants to merge 1 commit into
mainfrom
feat/data-insecure-skip-tls-verify
Closed

duckhawk wants to merge 1 commit into
mainfrom
feat/data-insecure-skip-tls-verify

Conversation

@duckhawk

Copy link
Copy Markdown
Member

Description

  • New flag --data-insecure-skip-tls-verify for d8 data export download, d8 data export list and d8 data import upload (including the Windows build of upload).
  • It disables verification of the server certificate only on the connection to the data endpoint (the transport built by SetTLSCAData). The connection to kube-apiserver still follows the kubeconfig and the kubectl flags.
  • When the flag is used, a warning is printed to stderr once per process.
  • SafeClient keeps the setting in Copy().
  • An example with the flag is added to the help of download.

Why do we need it, and what problem does it solve?

Downloading or uploading through a published endpoint whose certificate is self-signed fails with x509: certificate signed by unknown authority. The client always enforces verification for the data endpoint, even when the kubeconfig or --insecure-skip-tls-verify disables it for kube-apiserver, so there was no way to work with such an endpoint. The standard --insecure-skip-tls-verify is already registered by genericclioptions for kube-apiserver, so a separate flag is used to keep the two connections independent.

The confirmation prompt can already be skipped by setting --cleanup explicitly, so no flag is added for it.

What is the expected result?

With --data-insecure-skip-tls-verify, d8 data export download --publish works against an endpoint with a self-signed certificate and prints a warning; without the flag the behaviour does not change. A new unit test runs the client against an httptest TLS server with a self-signed certificate: without the flag it gets x509.UnknownAuthorityError, with the flag the request succeeds.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes. (command help and examples)
  • Changes were tested in the Kubernetes cluster manually.

Downloads and uploads through a published endpoint with a self-signed
certificate fail with x509: certificate signed by unknown authority, and
the client always enforces verification there, even when the kubeconfig
or --insecure-skip-tls-verify disables it for kube-apiserver.

Add --data-insecure-skip-tls-verify to 'data export download',
'data export list' and 'data import upload'. It affects only the
connection to the data endpoint, never kube-apiserver, and prints a
warning to stderr when used.

Signed-off-by: v.oleynikov <vasily.oleynikov@flant.com>
@duckhawk
duckhawk requested a review from ldmonster as a code owner November 16, 2026 10:28
@duckhawk

Copy link
Copy Markdown
Member Author

Moved to the internal repository for review.

@duckhawk duckhawk closed this Nov 16, 2026
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