You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4e2cb80
Browse filesBrowse the repository at this point in the historyBrowse files
chore(deps): drop cozystack/talos fork for upstream v1.13.7
The fork existed solely to carry the --skip-verify flag, which upstream
declined (siderolabs/talos#12652) over the risk of leaking data to an
actor impersonating the Talos API. Reimplement the flag locally in
pkg/commands: a package-level SkipVerify bound to --skip-verify, and a
WithClientSkipVerify that opens the talosconfig, builds a TLS config
skipping server-certificate verification while preserving client-cert
authentication, and dials the node directly. With the flag no longer
depending on fork-only API, the replace directive is dropped and talm
tracks stock upstream Talos v1.13.7.
The rendered machine-config is unchanged — golden snapshots stay
byte-identical; only the client-connection path is affected.
Co-authored-by: Kirill Ilin <[email protected]>
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>
Copy file name to clipboardExpand all lines: docs/manual-test-plan.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -986,6 +986,28 @@ Expected (per node): `node 192.0.2.10: talm: drift verification unavailable on m
986
986
987
987
Regression anchor: a refactor that always-prefixes (`node : talm: ...` on single-node) is a UX regression. The `nodePrefix("")` helper must collapse to empty for the bare-line single-node case.
`--skip-verify` skips server-certificate verification while preserving client-certificate authentication, for connecting to a node whose IP is absent from the server cert SANs. It is reimplemented in talm (`WithClientSkipVerify` in `pkg/commands/root.go`) now that the cozystack/talos fork is dropped, and its coverage differs by command kind.
992
+
993
+
Native command (apply / template / upgrade / rotate-ca) — the flag is honored. Run against a node reachable by an IP that is NOT in the server cert SANs:
Expected: the connection succeeds (no `x509: certificate is valid for … not 192.0.2.10` TLS SAN error) and the dry-run render proceeds.
1000
+
1001
+
Wrapped talosctl passthrough command (health / get / dashboard / …) — the flag is NOT supported, and the command says so instead of failing opaquely:
1002
+
1003
+
```bash
1004
+
talm health --skip-verify --nodes 192.0.2.10
1005
+
```
1006
+
1007
+
Expected (stderr): `Warning: --skip-verify is not supported for the wrapped talosctl command "health"; it applies only to talm-native commands (apply, template, upgrade, rotate-ca). Connecting with full TLS verification.` — the command then connects with full verification (and fails against an out-of-SAN IP, as it would without the flag).
1008
+
1009
+
Regression anchor: `pkg/commands/skip_verify_test.go` pins the TLS config (skip server verify + client cert preserved), the native routing (`WithClientNoNodes` / `WithClient` reach `WithClientSkipVerify`), the `--cluster` and dial-option threading, and the passthrough warning. A change that silently no-ops `--skip-verify` on native commands, or drops the passthrough warning, is a regression.
// GlobalArgs is the common arguments for the root command.
33
38
//
34
39
//nolint:gochecknoglobals // cobra CLI architecture: persistent flags bind to package-level state shared across all subcommands; refactoring out the global would require threading state through every command's RunE.
35
40
varGlobalArgs global.Args
36
41
42
+
// SkipVerify, when set via --skip-verify, disables TLS certificate verification
43
+
// while preserving client-certificate authentication. Upstream global.Args has no
44
+
// such field (the cozystack/talos fork added it for siderolabs/talos#12652, which
45
+
// upstream declined); it is reimplemented here so talm can drop the fork and track
46
+
// stock upstream Talos.
47
+
//
48
+
//nolint:gochecknoglobals // cobra CLI architecture: persistent flag binds to package-level state.
49
+
varSkipVerifybool
50
+
51
+
// errContextNotFound is returned when the requested context is absent from the
52
+
// talosconfig.
53
+
varerrContextNotFound=errors.New("context not found in talosconfig")
54
+
55
+
// signalContext returns a context cancelled on SIGINT/SIGTERM so a --skip-verify
56
+
// client connection can be interrupted cleanly, mirroring talosctl's own wrappers.
0 commit comments