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(core): Redact credentials #13263

Merged
merged 7 commits into from
Feb 14, 2025
Merged

fix(core): Redact credentials #13263

merged 7 commits into from
Feb 14, 2025

Conversation

tomi
Copy link
Collaborator

@tomi tomi commented Feb 14, 2025

Summary

  • Redact credentials from credentials endpoints
  • Redact oauth data and prevent updating it with the PATCH endpoint

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/PAY-2604

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Comment on lines +375 to +377
expect(
(teamCredAsViewer.data as unknown as ICredentialDataDecryptedObject).oauthTokenData,
).toBe(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

For my own clarity, this is testing that we no longer return oauthTokenData but we're just returning true for it instead as the FE needs it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Feb 14, 2025
Copy link

codecov bot commented Feb 14, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ges/cli/src/services/credentials-tester.service.ts 0.00% 2 Missing ⚠️
...ackages/cli/src/credentials/credentials.service.ts 87.50% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

MarcL
MarcL previously approved these changes Feb 14, 2025
Copy link
Contributor

@MarcL MarcL left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for fixing.

Copy link
Contributor

✅ All Cypress E2E specs passed

Copy link

cypress bot commented Feb 14, 2025

n8n    Run #9276

Run Properties:  status check passed Passed #9276  •  git commit c5fc0bd63f: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 tomi 🗃️ e2e/*
Project n8n
Branch Review pay-2604
Run status status check passed Passed #9276
Run duration 04m 43s
Commit git commit c5fc0bd63f: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 tomi 🗃️ e2e/*
Committer Tomi Turtiainen
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 5
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 436
View all changes introduced in this branch ↗︎

Copy link
Contributor

@MarcL MarcL left a comment

Choose a reason for hiding this comment

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

Good spot that we need this too! :shipit:

Copy link
Contributor

✅ All Cypress E2E specs passed

@tomi tomi merged commit 052f177 into master Feb 14, 2025
38 checks passed
@tomi tomi deleted the pay-2604 branch February 14, 2025 14:46
tomi added a commit that referenced this pull request Feb 15, 2025
@github-actions github-actions bot mentioned this pull request Feb 15, 2025
tomi added a commit that referenced this pull request Feb 15, 2025
@github-actions github-actions bot mentioned this pull request Feb 15, 2025
@janober
Copy link
Member

janober commented Feb 15, 2025

Got released with [email protected]

tomi added a commit that referenced this pull request Feb 15, 2025
@github-actions github-actions bot mentioned this pull request Feb 15, 2025
tomi added a commit that referenced this pull request Feb 15, 2025
@github-actions github-actions bot mentioned this pull request Feb 15, 2025
netroy pushed a commit that referenced this pull request Feb 17, 2025
@github-actions github-actions bot mentioned this pull request Feb 17, 2025
netroy pushed a commit that referenced this pull request Feb 17, 2025
@github-actions github-actions bot mentioned this pull request Feb 17, 2025
netroy pushed a commit that referenced this pull request Feb 17, 2025
@github-actions github-actions bot mentioned this pull request Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team Released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants