1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Add known hosts checking for SFTP storage driver.

By default require a known hosts match as part of the SFTP storage driver's authentication process, i.e. repo-sftp-host-key-check-type=strict. The match is expected to be found in the default list or in a list of known hosts files provided by the user. An exception is made if a fingerprint has been manually configured with repo-sftp-host-fingerprint or repo-sftp-host-key-check-type=accept-new can be used to automatically add new hosts.

Also allow host key verification to be skipped, as before, but require the user to explicitly set this (repo-sftp-host-key-check-type=none) rather than it being the default.
This commit is contained in:
Reid Thompson
2023-09-15 20:22:38 -04:00
committed by GitHub
parent f5c730fd03
commit ce9ba0fade
17 changed files with 3855 additions and 231 deletions

View File

@@ -15,6 +15,18 @@
<p>Add <br-option>--repo-storage-tag</br-option> option to create object tags.</p>
</release-item>
<release-item>
<github-pull-request id="2125"/>
<release-item-contributor-list>
<release-item-contributor id="reid.thompson"/>
<release-item-reviewer id="stephen.frost"/>
<release-item-reviewer id="david.steele"/>
</release-item-contributor-list>
<p>Add known hosts checking for <proper>SFTP</proper> storage driver.</p>
</release-item>
<release-item>
<commit subject="Adjust Wait object to be more accurate when nested."/>
<commit subject="Aggregate error retries in ErrorRetry output."/>

View File

@@ -2579,6 +2579,14 @@
<p>Commands are run exactly as if the repository were stored on a local disk.</p>
<execute-list host="{[host-pg1]}">
<title>Add sftp-server fingerprint to known_hosts file since <br-option>repo4-sftp-host-key-check-type</br-option> defaults to <quote>strict</quote></title>
<execute user="postgres" user-force="y">
<exe-cmd>ssh-keyscan -H {[host-sftp]} >> {[pg-home-path]}/.ssh/known_hosts 2>/dev/null</exe-cmd>
</execute>
</execute-list>
<execute-list host="{[host-pg1]}">
<title>Create the stanza</title>