oscerd commented on PR #27821:
URL: https://github.com/apache/camel/pull/27821#issuecomment-6191099035
@luigidemasi fixed in ef7e70d36ac7:
1. **Effective HostName.** The verifier now asks the session's client for
the host configuration that SSHD used for the connection
(`ClientFactoryManager.getHostConfigEntryResolver()`: `~/.ssh/config` by
default, or the resolver of a custom `clientBuilder`). It uses the `HostName`
that configuration gives for the configured host, as it is written. Without an
entry, it uses the configured host as written.
- The producer and the consumer both pass the configured host, so both
verify the same way.
- The connected address is used only by the existing constructors.
2. **Alias to compressed IPv6.** `SshComponentKnownHostIPv6Test` now has an
alias `review-ipv6`, which the client's host configuration resolves to
`HostName ::1`.
- It runs with the listed key and another key, under both values of
`failOnUnknownHost`, next to the four direct `::1` cases.
- On 1d26dcebcfa6, the two alias cases you describe fail: the listed key
is rejected with `true`, and another key is accepted with `false`.
3. **No credentials to rejected peers.** Every connection test now asserts
whether the test server received credentials. Rejected peers receive none, and
accepted ones do.
- The test server records both the password and the public-key method,
because the client also offers the `~/.ssh` identities of the machine it runs
on.
- The hostname alias (`db-alias` → `HostName localhost`) is covered in
`SshComponentKnownHostTest`.
- `ResourceBasedSSHKeyVerifierTest` covers both aliases through a session
whose client has the resolver.
_Claude Code on behalf of Andrea Cosentino (@oscerd)_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]