diff --git a/.circleci/build_slug.sh b/.circleci/build_slug.sh deleted file mode 100644 index 69c6359..0000000 --- a/.circleci/build_slug.sh +++ /dev/null @@ -1,10 +0,0 @@ -echo "Building slug" -id=$(git archive $CIRCLE_BRANCH | docker run -e "NPM_CONFIG_PRODUCTION=false" -i -a stdin elasticio/appbuilder) -docker attach $id -RC=$? -if [ $RC -eq 0 ];then - echo "Build ok." -else - echo "Build failed" - exit 1 -fi \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ff7195b..645df85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.7.2 (July 25, 2024) +* Updated ssh2-sftp-client to 10.0.3 to fix the issue [All configured authentication methods failed ](https://github.com/mscdex/ssh2/issues/1277). +[Link to the Eio issue](https://github.com/elasticio/sftp-component/issues/133) + ## 1.7.1 (July 02, 2024) * Super minor test fix * Update Sailor version to 2.7.2 diff --git a/README.md b/README.md index 5cb54d5..aeccd06 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,16 @@ Name|Mandatory|Description|Values| * **Host** - (string, required): Host name of SFTP server * **Port** - (number, optional, defaults to 22): Port of SFTP server * **User Name** - (string, required): Username for SFTP server -* **Password** - (string, optional): Password for SFTP server - * **Note**: field `Password` should be empty in case you fill a `Private Key` -* **Private Key** - (string, optional): To access a secure SFTP servers that is configured with a key-based authentication you must at first upload your `Public key` to the SFTP server (please contact your server administrator to do this) and fill in this field with your `Private key` +* **Password** - (string, optional): Password for SFTP server. Must stay empty in case you fill a private key field +* **Private Key** - (string, optional): To access a secure SFTP servers that is configured with a key-based authentication you must at first upload your `Public key` to the SFTP server (please contact your server administrator to do this) and fill in this field with your `Private key. + Must stay empty in case you fill a password key field. + The component has been tested with the following keys: + * rsa (Minimum allowed key length - 2048 bits, minimum recommended - 3072 bits) + * rsa-sha2-256 + * rsa-sha2-512 + * ed25519 + * ecdsa * **Passphrase** - (string, optional): If Private Key was created using passphrase, put it here - * **Note**: field `Private Key` should stay empty in case you fill a password ## Triggers diff --git a/component.json b/component.json index e0b5a9f..779b8eb 100644 --- a/component.json +++ b/component.json @@ -1,7 +1,7 @@ { "title": "SFTP", "description": "Provides file access and transfer using SSH File Transfer Protocol", - "version": "1.7.1", + "version": "1.7.2", "credentials": { "fields": { "host": { diff --git a/package-lock.json b/package-lock.json index a2d748c..4e71bb5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "elasticio-sailor-nodejs": "2.7.2", "micromatch": "4.0.2", "moment": "2.29.4", - "ssh2-sftp-client": "9.0.4" + "ssh2-sftp-client": "10.0.3" }, "devDependencies": { "bunyan": "1.8.14", @@ -1004,9 +1004,9 @@ } }, "node_modules/asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "dependencies": { "safer-buffer": "~2.1.0" } @@ -1330,9 +1330,9 @@ "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==" }, "node_modules/buildcheck": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.3.tgz", - "integrity": "sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz", + "integrity": "sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==", "optional": true, "engines": { "node": ">=10.0.0" @@ -1671,14 +1671,14 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "node_modules/cpu-features": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.4.tgz", - "integrity": "sha512-fKiZ/zp1mUwQbnzb9IghXtHtDoTMtNeb8oYGx6kX2SYfhnG0HNdBEBIzB9b5KlXu5DQPhfy3mInbBxFcgwAr3A==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.10.tgz", + "integrity": "sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==", "hasInstallScript": true, "optional": true, "dependencies": { - "buildcheck": "0.0.3", - "nan": "^2.15.0" + "buildcheck": "~0.0.6", + "nan": "^2.19.0" }, "engines": { "node": ">=10.0.0" @@ -4351,9 +4351,9 @@ } }, "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", + "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==", "optional": true }, "node_modules/nanoid": { @@ -5814,33 +5814,37 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "node_modules/ssh2": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz", - "integrity": "sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", + "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", "hasInstallScript": true, "dependencies": { - "asn1": "^0.2.4", + "asn1": "^0.2.6", "bcrypt-pbkdf": "^1.0.2" }, "engines": { "node": ">=10.16.0" }, "optionalDependencies": { - "cpu-features": "~0.0.4", - "nan": "^2.16.0" + "cpu-features": "~0.0.9", + "nan": "^2.18.0" } }, "node_modules/ssh2-sftp-client": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/ssh2-sftp-client/-/ssh2-sftp-client-9.0.4.tgz", - "integrity": "sha512-fHAXUgmtmqUq/IdMlN9DBhkzrRFQRfORsQYglZMdnvosr4oo/6js+jxrJgGU+alNLW8ZN1IZFfRSoAejyvr8zg==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/ssh2-sftp-client/-/ssh2-sftp-client-10.0.3.tgz", + "integrity": "sha512-Wlhasz/OCgrlqC8IlBZhF19Uw/X/dHI8ug4sFQybPE+0sDztvgvDf7Om6o7LbRLe68E7XkFZf3qMnqAvqn1vkQ==", "dependencies": { "concat-stream": "^2.0.0", "promise-retry": "^2.0.1", - "ssh2": "^1.11.0" + "ssh2": "^1.15.0" }, "engines": { - "node": ">=10.24.1" + "node": ">=16.20.2" + }, + "funding": { + "type": "individual", + "url": "https://square.link/u/4g7sPflL" } }, "node_modules/sshpk": { @@ -7450,9 +7454,9 @@ } }, "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", "requires": { "safer-buffer": "~2.1.0" } @@ -7702,9 +7706,9 @@ "integrity": "sha512-EMetuGFz5SLsT0QTnXzINh4Ksr+oo4i+UGTXEshiGCQWnsgSs7ZhJ8fzlwQ+OzEMs0MpDAMr1hxnblp5a4vcHg==" }, "buildcheck": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.3.tgz", - "integrity": "sha512-pziaA+p/wdVImfcbsZLNF32EiWyujlQLwolMqUQE8xpKNOH7KmZQaY8sXN7DGOEzPAElo9QTaeNRfGnf3iOJbA==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz", + "integrity": "sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==", "optional": true }, "bunyan": { @@ -7964,13 +7968,13 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cpu-features": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.4.tgz", - "integrity": "sha512-fKiZ/zp1mUwQbnzb9IghXtHtDoTMtNeb8oYGx6kX2SYfhnG0HNdBEBIzB9b5KlXu5DQPhfy3mInbBxFcgwAr3A==", + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.10.tgz", + "integrity": "sha512-9IkYqtX3YHPCzoVg1Py+o9057a3i0fp7S530UWokCSaFVTc7CwXPRiOjRjBQQ18ZCNafx78YfnG+HALxtVmOGA==", "optional": true, "requires": { - "buildcheck": "0.0.3", - "nan": "^2.15.0" + "buildcheck": "~0.0.6", + "nan": "^2.19.0" } }, "crc": { @@ -9929,9 +9933,9 @@ } }, "nan": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.20.0.tgz", + "integrity": "sha512-bk3gXBZDGILuuo/6sKtr0DQmSThYHLtNCdSdXk9YkxD/jK6X2vmCyyXBBxyqZ4XcnzTyYEAThfX3DCEnLf6igw==", "optional": true }, "nanoid": { @@ -11041,24 +11045,24 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" }, "ssh2": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.11.0.tgz", - "integrity": "sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw==", + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz", + "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==", "requires": { - "asn1": "^0.2.4", + "asn1": "^0.2.6", "bcrypt-pbkdf": "^1.0.2", - "cpu-features": "~0.0.4", - "nan": "^2.16.0" + "cpu-features": "~0.0.9", + "nan": "^2.18.0" } }, "ssh2-sftp-client": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/ssh2-sftp-client/-/ssh2-sftp-client-9.0.4.tgz", - "integrity": "sha512-fHAXUgmtmqUq/IdMlN9DBhkzrRFQRfORsQYglZMdnvosr4oo/6js+jxrJgGU+alNLW8ZN1IZFfRSoAejyvr8zg==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/ssh2-sftp-client/-/ssh2-sftp-client-10.0.3.tgz", + "integrity": "sha512-Wlhasz/OCgrlqC8IlBZhF19Uw/X/dHI8ug4sFQybPE+0sDztvgvDf7Om6o7LbRLe68E7XkFZf3qMnqAvqn1vkQ==", "requires": { "concat-stream": "^2.0.0", "promise-retry": "^2.0.1", - "ssh2": "^1.11.0" + "ssh2": "^1.15.0" } }, "sshpk": { diff --git a/package.json b/package.json index 6ec12b9..4728a80 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "elasticio-sailor-nodejs": "2.7.2", "micromatch": "4.0.2", "moment": "2.29.4", - "ssh2-sftp-client": "9.0.4" + "ssh2-sftp-client": "10.0.3" }, "devDependencies": { "bunyan": "1.8.14",