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:
@@ -20,6 +20,7 @@ import type { IExternalHooksClass } from '@/Interfaces';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { PostHogClient } from '@/posthog';
|
||||
import { License } from '@/License';
|
||||
import { ExternalSecretsManager } from '@/ExternalSecrets/ExternalSecretsManager.ee';
|
||||
|
||||
export abstract class BaseCommand extends Command {
|
||||
protected logger = LoggerProxy.init(getLogger());
|
||||
@@ -134,6 +135,11 @@ export abstract class BaseCommand extends Command {
|
||||
}
|
||||
}
|
||||
|
||||
async initExternalSecrets() {
|
||||
const secretsManager = Container.get(ExternalSecretsManager);
|
||||
await secretsManager.init();
|
||||
}
|
||||
|
||||
async finally(error: Error | undefined) {
|
||||
if (inTest || this.id === 'start') return;
|
||||
if (Db.connectionState.connected) {
|
||||
|
||||
@@ -195,6 +195,7 @@ export class Start extends BaseCommand {
|
||||
await this.initLicense();
|
||||
await this.initBinaryManager();
|
||||
await this.initExternalHooks();
|
||||
await this.initExternalSecrets();
|
||||
|
||||
if (!config.getEnv('endpoints.disableUi')) {
|
||||
await this.generateStaticAssets();
|
||||
|
||||
@@ -80,6 +80,7 @@ export class Webhook extends BaseCommand {
|
||||
await this.initLicense();
|
||||
await this.initBinaryManager();
|
||||
await this.initExternalHooks();
|
||||
await this.initExternalSecrets();
|
||||
}
|
||||
|
||||
async run() {
|
||||
|
||||
@@ -239,6 +239,7 @@ export class Worker extends BaseCommand {
|
||||
await this.initLicense();
|
||||
await this.initBinaryManager();
|
||||
await this.initExternalHooks();
|
||||
await this.initExternalSecrets();
|
||||
}
|
||||
|
||||
async run() {
|
||||
|
||||
Reference in New Issue
Block a user