-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
feat: Add external secrets #6477
feat: Add external secrets #6477
Conversation
…-to-credentials-expressions
…-to-credentials-expressions
* feat: add secrets page with dummy data * chore: update api * feat: add secrets provider modal * feat: replace external-secrets dummy api call with actual REST api * fix: fix externalSecrets store name * feat: add bindings for secrets in code editor and expressions
…ub.com:n8n-io/n8n into pay-442-add-secrets-to-credentials-expressions
…ub.com:n8n-io/n8n into pay-442-add-secrets-to-credentials-expressions
…ub.com:n8n-io/n8n into pay-442-add-secrets-to-credentials-expressions
Great PR! Please pay attention to the following items before merging: Files matching
Files matching
Make sure to check off this list before asking for review. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #6477 +/- ##
==========================================
+ Coverage 25.22% 32.12% +6.90%
==========================================
Files 3160 3183 +23
Lines 193299 195615 +2316
Branches 21236 21337 +101
==========================================
+ Hits 48754 62842 +14088
+ Misses 143565 131784 -11781
- Partials 980 989 +9
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reviewed BE only but I've also found something that affects FE so might be worth checking with @alexgrozav how to address this.
}); | ||
|
||
async function fetchAllSecrets() { | ||
state.secrets = await externalSecretsApi.getExternalSecrets(rootStore.getRestApiContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Running n8n as non-owner is causing this endpoint to return 403, causing the UI to break when browsing /credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we discussed opening up the endpoint. Did you guys decide against that? Should I handle this on the front end instead?
packages/cli/src/eventbus/MessageEventBusDestination/MessageEventBusDestinationWebhook.ee.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice. love it
const image = computed( | ||
() => | ||
({ | ||
doppler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will add doppler support sometime soon. It'll allow back end to add the integration without any front end intervention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like tech debt until we do it..
packages/editor-ui/src/components/CodeNodeEditor/completions/secrets.completions.ts
Show resolved
Hide resolved
packages/editor-ui/src/components/CodeNodeEditor/completions/secrets.completions.ts
Outdated
Show resolved
Hide resolved
packages/editor-ui/src/components/CodeNodeEditor/completions/secrets.completions.ts
Show resolved
Hide resolved
(accu: boolean, value: CredentialInformation) => | ||
accu || (typeof value === 'string' && value.startsWith('=')), | ||
accu || | ||
(typeof value === 'string' && isExpression(value) && !isTestableExpression(value)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@valya I think you worked on this part. Can you check and answer please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It needs to be an and
since the true case causes it to not be tested. Either way, it should be working now. There was a backend issue but I've sorted it now
packages/editor-ui/src/plugins/codemirror/completions/datatype.completions.ts
Show resolved
Hide resolved
@@ -37,12 +39,18 @@ export function datatypeCompletions(context: CompletionContext): CompletionResul | |||
|
|||
let options: Completion[] = []; | |||
|
|||
const isCredential = isCredentialsModalOpen(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we update the completion tests? and add some e2e tests for this?
infisical: { | ||
siteURL: 'https://app.infisical.com', | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we setting the default here if we are getting the providers from the BE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requested by product. I didn't like it either, but it is what it is...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Product requested that this be implemented on the FE? why cannot the backend return this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the default config is blank, and we're using the blank state of the config to determine the provider connection state. I suggested using it as a fallback and making the field optional, but there was push back for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm okay
…-to-credentials-expressions
1 flaky tests on run #1999 ↗︎
Details:
cypress/e2e/24-ndv-paired-item.cy.ts • 1 flaky test
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. |
✅ All Cypress E2E specs passed |
# [1.5.0](https://github.com/n8n-io/n8n/compare/n8n@1.4.0...n8n@1.5.0) (2023-08-31) ### Bug Fixes * **Agile CRM Node:** Fix issue with company address not working ([#6997](#6997)) ([2f81652](2f81652)) * **Code Node:** Switch over to vm2 fork ([#7018](#7018)) ([dfe0fa6](dfe0fa6)) * **core:** Invalid NODES_INCLUDE should not crash the app ([#7038](#7038)) ([04e3178](04e3178)), closes [#6683](#6683) * **core:** Setup websocket keep-live messages ([#6866](#6866)) ([8bdb07d](8bdb07d)), closes [#6757](#6757) * **core:** Throw `NodeSSLError` only for nodes that allow ignoring SSL issues ([#6928](#6928)) ([a01c3fb](a01c3fb)) * **Date & Time Node:** Dont parse date if it's not set (null or undefined) ([#7050](#7050)) ([d72f79f](d72f79f)) * **editor:** Fix sending of Ask AI tracking events ([#7002](#7002)) ([fb05afa](fb05afa)) * **Microsoft Excel 365 Node:** Support for more extensions in workbook rlc ([#7020](#7020)) ([d6e1cf2](d6e1cf2)) * **MongoDB Node:** Stringify response ObjectIDs ([#6990](#6990)) ([9ca990b](9ca990b)) * **MongoDB Node:** Upgrade mongodb package to address CVE-2021-32050 ([#7054](#7054)) ([d3f6356](d3f6356)) * **Postgres Node:** Empty return data fix for Postgres and MySQL ([#7016](#7016)) ([176ccd6](176ccd6)) * **Webhook Node:** Fix URL params for webhooks ([#6986](#6986)) ([596b569](596b569)) ### Features * **core:** External Secrets storage for credentials ([#6477](#6477)) ([ed927d3](ed927d3)) * **core:** Add MFA ([#4767](#4767)) ([2b7ba6f](2b7ba6f)) * **core:** Add filtering, selection and pagination to users ([#6994](#6994)) ([b716241](b716241)) * **editor:** Debug executions in the editor ([#6834](#6834)) ([c833078](c833078)) * **RSS Read Node:** Add support for self signed certificates ([#7039](#7039)) ([3b9f0fe](3b9f0fe)) Co-authored-by: netroy <netroy@users.noreply.github.com>
Got released with |
Github issue / Community forum post (link here to close automatically):