mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat: External Secrets storage for credentials (#6477)
Github issue / Community forum post (link here to close automatically): --------- Co-authored-by: Romain Minaud <romain.minaud@gmail.com> Co-authored-by: Valya Bullions <valya@n8n.io> Co-authored-by: Csaba Tuncsik <csaba@n8n.io> Co-authored-by: Giulio Andreini <g.andreini@gmail.com> Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import * as tmpl from '@n8n_io/riot-tmpl';
|
||||
import { DateTime, Duration, Interval } from 'luxon';
|
||||
|
||||
import type {
|
||||
IDataObject,
|
||||
IExecuteData,
|
||||
INode,
|
||||
INodeExecutionData,
|
||||
@@ -66,8 +67,8 @@ export class Expression {
|
||||
this.workflow = workflow;
|
||||
}
|
||||
|
||||
static resolveWithoutWorkflow(expression: string) {
|
||||
return tmpl.tmpl(expression, {});
|
||||
static resolveWithoutWorkflow(expression: string, data: IDataObject = {}) {
|
||||
return tmpl.tmpl(expression, data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -225,6 +225,7 @@ export abstract class ICredentialsHelper {
|
||||
): Promise<ICredentials>;
|
||||
|
||||
abstract getDecrypted(
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
nodeCredentials: INodeCredentialsDetails,
|
||||
type: string,
|
||||
mode: WorkflowExecuteMode,
|
||||
@@ -1775,6 +1776,7 @@ export interface IWorkflowExecuteAdditionalData {
|
||||
executionTimeoutTimestamp?: number;
|
||||
userId: string;
|
||||
variables: IDataObject;
|
||||
secretsHelpers: SecretsHelpersBase;
|
||||
}
|
||||
|
||||
export type WorkflowExecuteMode =
|
||||
@@ -2185,6 +2187,7 @@ export interface IN8nUISettings {
|
||||
variables: boolean;
|
||||
sourceControl: boolean;
|
||||
auditLogs: boolean;
|
||||
externalSecrets: boolean;
|
||||
showNonProdBanner: boolean;
|
||||
debugInEditor: boolean;
|
||||
};
|
||||
@@ -2206,4 +2209,15 @@ export interface IN8nUISettings {
|
||||
};
|
||||
}
|
||||
|
||||
export interface SecretsHelpersBase {
|
||||
update(): Promise<void>;
|
||||
waitForInit(): Promise<void>;
|
||||
|
||||
getSecret(provider: string, name: string): IDataObject | undefined;
|
||||
hasSecret(provider: string, name: string): boolean;
|
||||
hasProvider(provider: string): boolean;
|
||||
listProviders(): string[];
|
||||
listSecrets(provider: string): string[];
|
||||
}
|
||||
|
||||
export type BannerName = 'V1' | 'TRIAL_OVER' | 'TRIAL' | 'NON_PRODUCTION_LICENSE';
|
||||
|
||||
@@ -44,6 +44,7 @@ export {
|
||||
} from './type-guards';
|
||||
|
||||
export { ExpressionExtensions } from './Extensions';
|
||||
export * as ExpressionParser from './Extensions/ExpressionParser';
|
||||
export { NativeMethods } from './NativeMethods';
|
||||
|
||||
export type { DocMetadata, NativeDoc } from './Extensions';
|
||||
|
||||
@@ -125,6 +125,7 @@ export class CredentialsHelper extends ICredentialsHelper {
|
||||
}
|
||||
|
||||
async getDecrypted(
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
nodeCredentials: INodeCredentialsDetails,
|
||||
type: string,
|
||||
): Promise<ICredentialDataDecryptedObject> {
|
||||
|
||||
Reference in New Issue
Block a user