Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix issue with key based credentials not being read correctly #6824

Conversation

Joffcom
Copy link
Member

@Joffcom Joffcom commented Aug 1, 2023

Github issue / Community forum post (link here to close automatically):

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2023

Great PR! Please pay attention to the following items before merging:

Files matching packages/**:

  • If fixing bug, added test to cover scenario.
  • If addressing forum or Github issue, added link to description.

Files matching packages/**/*.ts:

  • Added unit tests to cover new or updated functionality.

Files matching packages/nodes-base/nodes/**:

  • Added workflow tests for nodes if possible.

Make sure to check off this list before asking for review.

Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps these should be separate PRs, so that these fixes show up as individual entries in the diff and in the changelog.

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team node/improvement New feature or request labels Aug 1, 2023
@maspio maspio changed the title fix: Fix issue where some nodes are not able to authenticate with keys fix: Fix issue with authentication keys for FTP, MQTT, MySQL, Postgres, RabbitMQ and SSH nodes Aug 2, 2023
maspio
maspio previously approved these changes Aug 2, 2023
Copy link
Contributor

@maspio maspio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok looks good to me.

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Patch coverage: 6.25% and project coverage change: -0.01% ⚠️

Comparison is base (aa76dcb) 24.79% compared to head (d840d6b) 24.79%.
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6824      +/-   ##
==========================================
- Coverage   24.79%   24.79%   -0.01%     
==========================================
  Files        3137     3137              
  Lines      191132   191145      +13     
  Branches    21062    21065       +3     
==========================================
+ Hits        47400    47403       +3     
- Misses     142766   142776      +10     
  Partials      966      966              
Files Changed Coverage Δ
...s-base/credentials/CiscoUmbrellaApi.credentials.ts 0.00% <ø> (ø)
...se/credentials/CrowdStrikeOAuth2Api.credentials.ts 0.00% <ø> (ø)
.../nodes-base/credentials/MetabaseApi.credentials.ts 0.00% <ø> (ø)
...tials/VenafiTlsProtectDatacenterApi.credentials.ts 0.00% <ø> (ø)
...ges/nodes-base/credentials/WekanApi.credentials.ts 0.00% <ø> (ø)
...des/Cisco/Webex/descriptions/MeetingDescription.ts 0.00% <ø> (ø)
packages/nodes-base/nodes/Ftp/Ftp.node.ts 0.00% <0.00%> (ø)
...des/GoToWebinar/descriptions/WebinarDescription.ts 0.00% <ø> (ø)
...s-base/nodes/Google/GSuiteAdmin/UserDescription.ts 0.00% <ø> (ø)
packages/nodes-base/nodes/Jira/JiraTrigger.node.ts 0.00% <ø> (ø)
... and 11 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cypress
Copy link

cypress bot commented Aug 2, 2023

Passing run #1830 ↗︎

0 221 0 0 Flakiness 0

Details:

🌳 node-569-make-sure-private-key-fields-in-creds-arent-password-fields 🖥️ brow...
Project: n8n Commit: d840d6b360
Status: Passed Duration: 07:08 💡
Started: Aug 9, 2023 11:23 AM Ended: Aug 9, 2023 11:30 AM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2023

✅ All Cypress E2E specs passed

@WebWeave
Copy link

WebWeave commented Aug 9, 2023

Hi, we are really looking forward to this pull request being merged 😄
Is there any ETA?

@Joffcom
Copy link
Member Author

Joffcom commented Aug 9, 2023

Hey @WebWeave,

I would say maybe 45 minutes until it is merged 🙂

…e-private-key-fields-in-creds-arent-password-fields
@Joffcom Joffcom changed the title fix: Fix issue with authentication keys for FTP, MQTT, MySQL, Postgres, RabbitMQ and SSH nodes fix: Fix issue with private keys not being read correctly Aug 9, 2023
@Joffcom Joffcom changed the title fix: Fix issue with private keys not being read correctly fix: Fix issue with key based credentials not being read correctly Aug 9, 2023
maspio
maspio previously approved these changes Aug 9, 2023
* @param privateKey - The private key to format.
* @returns The formatted private key.
*/
export function formatPrivateKey(privateKey: string): string {
Copy link
Member

@netroy netroy Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general we should be moving code out of this file, and into this.helpers. That way these utility functions are also available to 3rd-party nodes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@netroy that isn't a bad idea, Fancy making a tech debt ticket for it and we can move them all out on our next node team tech debt day

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

✅ All Cypress E2E specs passed

@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

✅ All Cypress E2E specs passed

@Joffcom Joffcom merged commit db21a8d into master Aug 9, 2023
49 checks passed
@Joffcom Joffcom deleted the node-569-make-sure-private-key-fields-in-creds-arent-password-fields branch August 9, 2023 11:30
@github-actions github-actions bot mentioned this pull request Aug 9, 2023
@janober
Copy link
Member

janober commented Aug 9, 2023

Got released with n8n@1.2.1

@github-actions github-actions bot mentioned this pull request Aug 17, 2023
@github-actions github-actions bot mentioned this pull request Aug 17, 2023
netroy added a commit that referenced this pull request Aug 17, 2023
#
[0.237.0](https://github.com/n8n-io/n8n/compare/n8n@0.236.3...n8n@0.237.0)
(2023-08-17)


### Bug Fixes

* **API:** Fix issue with workflow setting not supporting newer nanoids
([#6699](#6699))
([2e64c9d](2e64c9d))
* **AwsS3 Node:** Fix issue if bucket name contains a '.'
([#6542](#6542))
([219f897](219f897))
* **core:** Add missing primary key on the `execution_data` table on
postgres ([#6797](#6797))
([1c5f98d](1c5f98d))
* **core:** Fix `continueOnFail` for expression error in Set
([#6939](#6939))
([2a3937f](2a3937f))
* **core:** Fix property existence checks on AugmentObject
([#6842](#6842))
([3e4483a](3e4483a))
* **core:** Log crash causes to console when sentry is disabled
([#6890](#6890))
([f19c9c1](f19c9c1))
* **core:** Restrict read/write file paths access
([#6582](#6582))
([6e6b90e](6e6b90e))
* **core:** Serialize BigInts
([#6805](#6805))
([17ce49b](17ce49b))
* **core:** Update frontend urls when using the `--tunnel` option
([#6898](#6898))
([ec3c066](ec3c066))
* **core:** Update packages to address CVE-2023-2142 and CVE-2020-28469
([#6844](#6844))
([6dd0850](6dd0850))
* Correct typos in Taiga and ServiceNow nodes
([#6814](#6814))
([b9f52ec](b9f52ec))
* **editor:** Fix code node’s content property to be reactive
([#6931](#6931))
([f3b380d](f3b380d))
* **editor:** Prevent Code node linter from erroring on `null` parse
([#6934](#6934))
([baada92](baada92))
* **Email Trigger (IMAP) Node:** UTF-8 attachments are not correctly
named ([#6856](#6856))
([f3f1c14](f3f1c14))
* **Email Trigger (IMAP) Node:** Fix connection issue with unexpected
spaces in host ([#6886](#6886))
([35c29ac](35c29ac))
* Fix issue with key based credentials not being read correctly
([#6824](#6824))
([2459b0a](2459b0a))
* Fix issue with key formatting if null or undefined
([#6924](#6924))
([59d33db](59d33db))
* Fix issue with key formatting introduced in 1.2.0
([#6896](#6896))
([8423153](8423153))
* **FTP Node:** List recursive ignore . and .. to prevent infinite loops
([#6707](#6707))
([6a787dd](6a787dd))
* **GitLab Trigger Node:** Fix trigger activation 404 error
([#6711](#6711))
([8c5145b](8c5145b))
* **Gmail Trigger Node:** Early returns in case of no data
([#6727](#6727))
([df2f1d6](df2f1d6))
* **Google BigQuery Node:** Error description improvement
([#6715](#6715))
([261d73e](261d73e))
* **GoToWebinar Node:** Fix issue with timezone incorrectly being
required ([#6865](#6865))
([2f61e34](2f61e34))
* **HTTP Request Node:** Improve error handling for TCP socket errors
when `Continue On Fail` is enabled
([#6925](#6925))
([e8e4c9e](e8e4c9e))
* **Lemlist Node:** Fix pagination issues with campaigns and activities
([#6734](#6734))
([73eddc6](73eddc6))
* **Salesforce Node:** Fix Account update owner operation
([#6958](#6958))
([e71ff76](e71ff76))
* **Telegram Trigger Node:** Add guard to 'include' call on null or
undefined ([#6730](#6730))
([c3c845c](c3c845c))
* **Todoist Node:** Fix issue with section id being ignored
([#6799](#6799))
([e53f4a0](e53f4a0))


### Features

* Add support for not requiring SMTP auth with user management
([#3742](#3742))
([fc97d18](fc97d18))
* **core:** Add support for ready hooks, and credentials overwrite
endpoint in workers ([#6954](#6954))
([e5986c5](e5986c5))
* **editor:** Add "Download" button if JSON data is to large
([#6850](#6850))
([3d815cf](3d815cf))
* Enable parallel processing on multiple queue nodes
([#6295](#6295))
([e45461a](e45461a))

Co-authored-by: netroy <netroy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team node/improvement New feature or request Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants