Skip to content
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

BC-7028 add description to allowed api keys #4889

Merged
merged 5 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/server/src/modules/server/server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export enum NodeEnvType {
MIGRATION = 'migration',
}

// Envirement keys should be added over configs from modules, directly adding is only allow for legacy stuff
// Maye some of them must be outsource to additional microservice config endpoints.
// Environment keys should be added over configs from modules, directly adding is only allow for legacy stuff
// Maye some of them must be outsourced to additional microservice config endpoints.
export interface ServerConfig
extends CoreModuleConfig,
UserConfig,
Expand Down Expand Up @@ -170,7 +170,7 @@ const config: ServerConfig = {
SYNCHRONIZATION_CHUNK: Configuration.get('SYNCHRONIZATION_CHUNK') as number,
ADMIN_API__ALLOWED_API_KEYS: (Configuration.get('ADMIN_API__ALLOWED_API_KEYS') as string)
.split(',')
.map((apiKey) => apiKey.trim()),
.map((part) => (part.split(':').pop() ?? '').trim()),
Loki-Afro marked this conversation as resolved.
Show resolved Hide resolved
BLOCKLIST_OF_EMAIL_DOMAINS: (Configuration.get('BLOCKLIST_OF_EMAIL_DOMAINS') as string)
.split(',')
.map((domain) => domain.trim()),
Expand Down
2 changes: 1 addition & 1 deletion config/test.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"CLIENT_ID": "schulcloud",
"CLIENT_SECRET": "secret"
},
"ADMIN_API": { "ALLOWED_API_KEYS": "thisistheadminapitokeninthetestconfig" },
"ADMIN_API": { "ALLOWED_API_KEYS": "onlyusedintests:thisistheadminapitokeninthetestconfig,someotherkey" },
"EXIT_ON_ERROR": false,
"TEACHER_STUDENT_VISIBILITY": {
"IS_CONFIGURABLE": false,
Expand Down
Loading