Encrypt/decrypt app secret variables (#17394)

Closes https://github.com/twentyhq/core-team-issues/issues/1724
From PR https://github.com/twentyhq/twenty/pull/15283, followed same
implementation
- Introduce EnvironmentModule to provide type safety for env-only
variables
- Encrypt secret variables
- When querying app secret variable, display up to first 5 characters
(depending on secret length) then `******`
This commit is contained in:
Marie
2026-01-27 16:59:37 +01:00
committed by GitHub
parent a913ac7452
commit 7e3d9cd85a
19 changed files with 865 additions and 156 deletions
-5
View File
@@ -4,7 +4,6 @@ import {
Module,
RequestMethod,
} from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { GraphQLModule } from '@nestjs/graphql';
import { ServeStaticModule } from '@nestjs/serve-static';
@@ -48,10 +47,6 @@ const MIGRATED_REST_METHODS = [
@Module({
imports: [
SentryModule.forRoot(),
ConfigModule.forRoot({
isGlobal: true,
envFilePath: process.env.NODE_ENV === 'test' ? '.env.test' : '.env',
}),
GraphQLModule.forRootAsync<YogaDriverConfig>({
driver: YogaDriver,
imports: [GraphQLConfigModule, MetricsModule, DataloaderModule],