diff --git a/apps/server/src/infra/encryption/encryption.config.ts b/apps/server/src/infra/encryption/encryption.config.ts new file mode 100644 index 00000000000..60baf9efe5d --- /dev/null +++ b/apps/server/src/infra/encryption/encryption.config.ts @@ -0,0 +1,3 @@ +export interface EncryptionConfig { + AES_KEY: string; +} diff --git a/apps/server/src/infra/schulconnex-client/schulconnex-client-config.ts b/apps/server/src/infra/schulconnex-client/schulconnex-client-config.ts index 057392d593e..7663af52449 100644 --- a/apps/server/src/infra/schulconnex-client/schulconnex-client-config.ts +++ b/apps/server/src/infra/schulconnex-client/schulconnex-client-config.ts @@ -1,3 +1,7 @@ export interface SchulconnexClientConfig { SCHULCONNEX_CLIENT__PERSONEN_INFO_TIMEOUT_IN_MS: number; + SCHULCONNEX_CLIENT__API_URL?: string; + SCHULCONNEX_CLIENT__TOKEN_ENDPOINT?: string; + SCHULCONNEX_CLIENT__CLIENT_ID?: string; + SCHULCONNEX_CLIENT__CLIENT_SECRET?: string; } diff --git a/apps/server/src/modules/board/index.ts b/apps/server/src/modules/board/index.ts index 003af17f13c..392953ff22d 100644 --- a/apps/server/src/modules/board/index.ts +++ b/apps/server/src/modules/board/index.ts @@ -1,4 +1,5 @@ export { BoardConfig } from './board.config'; +export { MediaBoardConfig } from './media-board.config'; export { BoardModule } from './board.module'; export { AnyElementContentBody, LinkContentBody, RichTextContentBody } from './controller/dto'; export { diff --git a/apps/server/src/modules/oauth/index.ts b/apps/server/src/modules/oauth/index.ts index d586a4f8380..2172c8ff7d6 100644 --- a/apps/server/src/modules/oauth/index.ts +++ b/apps/server/src/modules/oauth/index.ts @@ -1,4 +1,5 @@ export * from './interface'; export * from './oauth.module'; export * from './service'; +export { OauthConfig } from './oauth.config'; export * from './domain'; diff --git a/apps/server/src/modules/oauth/oauth.config.ts b/apps/server/src/modules/oauth/oauth.config.ts new file mode 100644 index 00000000000..b10dce053ac --- /dev/null +++ b/apps/server/src/modules/oauth/oauth.config.ts @@ -0,0 +1,4 @@ +export interface OauthConfig { + FEATURE_OAUTH_LOGIN: boolean; + FEATURE_LOGIN_LINK_ENABLED: boolean; +} diff --git a/apps/server/src/modules/server/server.config.ts b/apps/server/src/modules/server/server.config.ts index 8ca31f845de..610bda8f962 100644 --- a/apps/server/src/modules/server/server.config.ts +++ b/apps/server/src/modules/server/server.config.ts @@ -1,5 +1,6 @@ import { Configuration } from '@hpi-schul-cloud/commons'; import { XApiKeyConfig } from '@infra/auth-guard'; +import { EncryptionConfig } from '@infra/encryption/encryption.config'; import type { IdentityManagementConfig } from '@infra/identity-management'; import type { MailConfig } from '@infra/mail/interfaces/mail-config'; import type { SchulconnexClientConfig } from '@infra/schulconnex-client'; @@ -8,14 +9,14 @@ import type { TspClientConfig } from '@infra/tsp-client'; import type { AccountConfig } from '@modules/account'; import { AlertConfig } from '@modules/alert'; import type { AuthenticationConfig } from '@modules/authentication'; -import type { BoardConfig } from '@modules/board'; -import type { MediaBoardConfig } from '@modules/board/media-board.config'; +import type { BoardConfig, MediaBoardConfig } from '@modules/board'; import type { CollaborativeTextEditorConfig } from '@modules/collaborative-text-editor'; import { DeletionConfig } from '@modules/deletion'; import type { FilesStorageClientConfig } from '@modules/files-storage-client'; import { SynchronizationConfig } from '@modules/idp-console'; import type { LearnroomConfig } from '@modules/learnroom'; import type { LessonConfig } from '@modules/lesson'; +import { OauthConfig } from '@modules/oauth'; import { ProvisioningConfig } from '@modules/provisioning'; import { RoomConfig } from '@modules/room'; import type { SchoolConfig } from '@modules/school'; @@ -29,7 +30,7 @@ import type { UserLoginMigrationConfig } from '@modules/user-login-migration'; import type { VideoConferenceConfig } from '@modules/video-conference'; import type { BbbConfig } from '@modules/video-conference/bbb'; import type { LanguageType } from '@shared/domain/interface'; -import type { SchulcloudTheme } from '@shared/domain/types'; +import { SchulcloudTheme } from '@shared/domain/types'; import type { CoreModuleConfig } from '@src/core'; import type { Timezone } from './types/timezone.enum'; @@ -73,7 +74,9 @@ export interface ServerConfig TspClientConfig, TspSyncConfig, AlertConfig, - ShdConfig { + ShdConfig, + OauthConfig, + EncryptionConfig { NODE_ENV: NodeEnvType; SC_DOMAIN: string; HOST: string; @@ -97,9 +100,7 @@ export interface ServerConfig FEATURE_COLUMN_BOARD_SHARE: boolean; FEATURE_COLUMN_BOARD_SOCKET_ENABLED: boolean; FEATURE_BOARD_LAYOUT_ENABLED: boolean; - FEATURE_LOGIN_LINK_ENABLED: boolean; FEATURE_CONSENT_NECESSARY: boolean; - FEATURE_SCHOOL_SANIS_USER_MIGRATION_ENABLED: boolean; FEATURE_ALLOW_INSECURE_LDAP_URL_ENABLED: boolean; GHOST_BASE_URL: string; ROCKETCHAT_SERVICE_ENABLED: boolean; @@ -110,14 +111,10 @@ export interface ServerConfig SC_THEME: SchulcloudTheme; SC_TITLE: string; TRAINING_URL: string; - FEATURE_SHOW_OUTDATED_USERS: boolean; FEATURE_NEW_SCHOOL_ADMINISTRATION_PAGE_AS_DEFAULT_ENABLED: boolean; FEATURE_ENABLE_LDAP_SYNC_DURING_MIGRATION: boolean; FEATURE_SHOW_NEW_CLASS_VIEW_ENABLED: boolean; FEATURE_SHOW_NEW_ROOMS_VIEW_ENABLED: boolean; - FEATURE_SHOW_MIGRATION_WIZARD: boolean; - MIGRATION_WIZARD_DOCUMENTATION_LINK?: string; - FEATURE_OTHER_GROUPUSERS_PROVISIONING_ENABLED: boolean; FEATURE_TLDRAW_ENABLED: boolean; TLDRAW__WEBSOCKET_URL: string; TLDRAW__ASSETS_ENABLED: boolean; @@ -128,10 +125,6 @@ export interface ServerConfig I18N__FALLBACK_LANGUAGE: LanguageType; I18N__DEFAULT_TIMEZONE: Timezone; BOARD_COLLABORATION_URI: string; - SCHULCONNEX_CLIENT__API_URL: string | undefined; - SCHULCONNEX_CLIENT__TOKEN_ENDPOINT: string | undefined; - SCHULCONNEX_CLIENT__CLIENT_ID: string | undefined; - SCHULCONNEX_CLIENT__CLIENT_SECRET: string | undefined; FEATURE_AI_TUTOR_ENABLED: boolean; FEATURE_ROOMS_ENABLED: boolean; FEATURE_TSP_SYNC_ENABLED: boolean; @@ -328,6 +321,8 @@ const config: ServerConfig = { ROCKET_CHAT_ADMIN_USER: Configuration.get('ROCKET_CHAT_ADMIN_USER') as string, ROCKET_CHAT_ADMIN_PASSWORD: Configuration.get('ROCKET_CHAT_ADMIN_PASSWORD') as string, CTL_TOOLS__PREFERRED_TOOLS_LIMIT: Configuration.get('CTL_TOOLS__PREFERRED_TOOLS_LIMIT') as number, + AES_KEY: Configuration.get('AES_KEY') as string, + FEATURE_OAUTH_LOGIN: Configuration.get('FEATURE_OAUTH_LOGIN') as boolean, }; export const serverConfig = () => config; diff --git a/apps/server/src/modules/user-import/user-import-config.ts b/apps/server/src/modules/user-import/user-import-config.ts index ce005c20ce5..3d8a56aa003 100644 --- a/apps/server/src/modules/user-import/user-import-config.ts +++ b/apps/server/src/modules/user-import/user-import-config.ts @@ -3,4 +3,5 @@ export interface UserImportConfig { FEATURE_USER_MIGRATION_SYSTEM_ID: string; FEATURE_MIGRATION_WIZARD_WITH_USER_LOGIN_MIGRATION: boolean; IMPORTUSER_SAVE_ALL_MATCHES_REQUEST_TIMEOUT_MS: number; + MIGRATION_WIZARD_DOCUMENTATION_LINK?: string; } diff --git a/apps/server/src/modules/user-login-migration/user-login-migration.config.ts b/apps/server/src/modules/user-login-migration/user-login-migration.config.ts index df503973cce..81f240a853c 100644 --- a/apps/server/src/modules/user-login-migration/user-login-migration.config.ts +++ b/apps/server/src/modules/user-login-migration/user-login-migration.config.ts @@ -1,3 +1,7 @@ export interface UserLoginMigrationConfig { MIGRATION_END_GRACE_PERIOD_MS: number; + FEATURE_SCHOOL_SANIS_USER_MIGRATION_ENABLED: boolean; + FEATURE_MIGRATION_WIZARD_WITH_USER_LOGIN_MIGRATION: boolean; + FEATURE_SHOW_MIGRATION_WIZARD: boolean; + FEATURE_SHOW_OUTDATED_USERS: boolean; }