Skip to content

Conversation

@artembilan
Copy link
Member

Fixes #8674

The ResourceKnownHostsServerKeyVerifier does not take into account that several different keys can be present in the known hosts resource for the same host/port

  • Fix ResourceKnownHostsServerKeyVerifier to find a list of knows host for the requested session. Then iterate of this result to match the key type first and then compare keys and their revoked marker

Cherry-pick to 6.1.x & 6.0.x

Fixes spring-projects#8674

The `ResourceKnownHostsServerKeyVerifier` does not take into account that several different
keys can be present in the known hosts resource for the same host/port

* Fix `ResourceKnownHostsServerKeyVerifier` to find a list of knows host for the requested session.
Then iterate of this result to match the key type first and then compare keys and their `revoked` marker

**Cherry-pick to `6.1.x` & `6.0.x`**
@garyrussell garyrussell merged commit d4535ca into spring-projects:main Jul 17, 2023
garyrussell pushed a commit that referenced this pull request Jul 17, 2023
Fixes #8674

The `ResourceKnownHostsServerKeyVerifier` does not take into account that several different
keys can be present in the known hosts resource for the same host/port

* Fix `ResourceKnownHostsServerKeyVerifier` to find a list of knows host for the requested session.
Then iterate of this result to match the key type first and then compare keys and their `revoked` marker

**Cherry-pick to `6.1.x` & `6.0.x`**
garyrussell pushed a commit that referenced this pull request Jul 17, 2023
Fixes #8674

The `ResourceKnownHostsServerKeyVerifier` does not take into account that several different
keys can be present in the known hosts resource for the same host/port

* Fix `ResourceKnownHostsServerKeyVerifier` to find a list of knows host for the requested session.
Then iterate of this result to match the key type first and then compare keys and their `revoked` marker

**Cherry-pick to `6.1.x` & `6.0.x`**
@garyrussell
Copy link
Contributor

...and cherry-picked to 6.1.x as 90dfed5 and 6.0.x as c267bd5

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.

ResourceKnownHostsServerKeyVerifier does not consider the specified keytypes

2 participants