Skip to content

Fixes from the v0.3.0 end-to-end test - #22

Merged
emoscardini merged 3 commits into
mainfrom
fix/e2e-findings
Nov 24, 2026
Merged

emoscardini merged 3 commits into
mainfrom
fix/e2e-findings

Conversation

@emoscardini

Copy link
Copy Markdown
Member

Fixes from a live end-to-end test of v0.3.0 on a NetFoundry network (OpenZiti v2.0.9) with Ubuntu 24.04, Ubuntu 26.04 and RHEL 10 hosts, in shared and per-identity modes. See CHANGELOG.md → [Unreleased].

Host (ziti-ssh-host)

  • RHEL sshd reload: ReloadSSHD uses whichever of ssh.service/sshd.service and ssh.socket/sshd.socket is active and logs the unit names. RHEL hosts were only reached through the SIGHUP fallback, and the log said service_active=false.
  • systemd warnings: every external command runs through command(), which drops NOTIFY_SOCKET. On systemd 255 (Ubuntu 24.04), the systemctl probes caused Got notification message from PID … warnings.
  • Shutdown log: a closed proxy listener is logged without the SDK's Go stack trace.
  • Duplicate rejection logs: rejections that already logged their reason are wrapped with host.Logged, so Proxy doesn't log them again as OnConnect hook failed.
  • inspect: wildcard keys show (pattern) instead of a derived username such as _.

Client (ziti-ssh, ziti-scp, ziti-ssh-ca)

  • Rate-limit errors: client.RequestCert reads the CA's reply even when the write fails. A rate-limited request now always reports rate limit exceeded; before, it sometimes reported send public key to CA: connection closed for writes.
  • Bare form: ziti-ssh <target> accepts the connect flags (-L/-R/-D/-N/-A/--service). To make this testable, the command setup moved into newRootCmd().
  • Handshake hint: when the host closes the connection before SSH authentication (handshake failed: EOF), the error says that ziti-ssh-host may have refused the identity and that its log has the reason.
  • Usage text: printed only for flag and argument errors, not runtime errors.
  • Help text: states the actual certificate refresh rule.

Docs

  • docs/provisioning.md: ziti edge update config takes --data (the positional form fails with ziti v2.0.9); the enrollment reload is described for RHEL too.
  • docs/operations.md:
    • the ziti-ssh-managed block also overrides an AuthorizedKeysCommand set on sshd's command line, such as EC2 Instance Connect's (verified with OpenSSH 9.6p1 and 10.2p1);
    • the expected AuthorizedKeysCommand path is not absolute log line;
    • two more rows in the rejection log table.
  • docs/usage.md: what handshake failed: EOF means.
  • Project docs: ARCHITECTURE.md, CLAUDE.md.

Testing

  • go build ./... && go vet ./... && go test ./... passes. New tests cover:
    • firstActiveUnit, command() dropping NOTIFY_SOCKET, and Logged;
    • RequestCert when the write fails but the refusal can still be read, and when nothing can be read;
    • the handshake hint;
    • the root command accepting connect flags, and usage text only for flag errors;
    • inspect showing (pattern).
  • Live check: the branch build of ziti-ssh-host was installed on the RHEL 10 and Ubuntu 24.04 test hosts and the branch clients were run against them.
    • Host:
      • RHEL logs service=sshd.service and sshd logs Reloaded sshd.service;
      • 24.04 shows no notify warnings;
      • shutdown logs no stack trace;
      • a conflict rejection is logged once;
      • inspect shows (pattern).
    • Client:
      • the bare -N -L form forwards;
      • a host-key error prints no usage text;
      • refusals 4–7 of a rate-limit burst all report rate limit exceeded;
      • the hint appears on a real rejection.

Please merge with a merge commit. A v0.3.1 release follows.

- ReloadSSHD finds the active sshd unit among ssh.service/sshd.service and
  ssh.socket/sshd.socket, reloads it and logs the unit names. RHEL hosts
  were reached only through the SIGHUP fallback.
- All external commands run through command(), which drops NOTIFY_SOCKET:
  systemd 255 warned about notifications from the systemctl probes.
- A closed proxy listener is logged without the SDK's stack trace.
- Rejections already logged with their reason are wrapped with
  host.Logged and not logged a second time by Proxy.
- inspect shows "(pattern)" for wildcard permission keys.
- ziti-ssh-host prints usage only for flag and argument errors.
- client.RequestCert reads the CA reply even when the write fails, so a
  rate-limited request reports the CA's refusal instead of a write error.
  ziti-ssh and ziti-scp use it.
- "ziti-ssh <target>" accepts the connect flags (-L/-R/-D/-N/-A/--service).
  The command tree is built by newRootCmd for testing.
- A handshake that ends before authentication (EOF) says that
  ziti-ssh-host may have refused the identity and where the reason is.
- ziti-ssh and ziti-ssh-ca print usage only for flag and argument errors.
- Help text states the actual certificate refresh rule.
- provisioning: "ziti edge update config" takes the JSON with --data; the
  sshd reload on enrollment is described for RHEL too.
- operations: the ziti-ssh-managed block also overrides a command-line
  AuthorizedKeysCommand (EC2 Instance Connect) and logs an expected
  "path is not absolute" error; more rejection log lines.
- usage: meaning of "handshake failed: EOF"; forward flags without connect.
- CHANGELOG [Unreleased], CLAUDE.md, ARCHITECTURE.md.
@emoscardini
emoscardini merged commit 4d164b5 into main Nov 24, 2026
1 check passed
@emoscardini
emoscardini deleted the fix/e2e-findings branch November 24, 2026 15:28
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.

2 participants