Skip to content

Commit

Permalink
Adjust configs
Browse files Browse the repository at this point in the history
  • Loading branch information
dyedwiper committed Oct 15, 2024
1 parent 539f32e commit 92dbf9d
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion apps/server/src/infra/auth-guard/auth-guard.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export interface AuthGuardConfig {
ADMIN_API__ALLOWED_API_KEYS: string[];
JWT_AUD: string;
JWT_LIFETIME: string;
AUTHENTICATION: string;
JWT_PUBLIC_KEY: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { XApiKeyConfig } from '@infra/auth-guard';
import { AccountConfig } from '@modules/account';

export interface AuthenticationConfig extends AccountConfig, XApiKeyConfig {
AUTHENTICATION: string;
DISABLED_BRUTE_FORCE_CHECK: boolean;
FEATURE_JWT_EXTENDED_TIMEOUT_ENABLED: boolean;
JWT_PRIVATE_KEY: string;
JWT_PUBLIC_KEY: string;
JWT_LIFETIME: string;
JWT_TIMEOUT_SECONDS: number;
JWT_LIFETIME_SUPPORT_SECONDS: number;
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/h5p-editor/h5p-editor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const h5pEditorConfig: H5PEditorConfig = {
ADMIN_API__ALLOWED_API_KEYS: [],
JWT_AUD: Configuration.get('JWT_AUD') as string,
JWT_LIFETIME: Configuration.get('JWT_LIFETIME') as string,
AUTHENTICATION: Configuration.get('AUTHENTICATION') as string,
JWT_PUBLIC_KEY: Configuration.get('JWT_PUBLIC_KEY') as string,
};

export const translatorConfig = {
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/server/admin-api-server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const config: AdminApiServerConfig = {
.map((part) => (part.split(':').pop() ?? '').trim()),
JWT_AUD: Configuration.get('JWT_AUD') as string,
JWT_LIFETIME: Configuration.get('JWT_LIFETIME') as string,
AUTHENTICATION: Configuration.get('AUTHENTICATION') as string,
JWT_PUBLIC_KEY: Configuration.get('JWT_PUBLIC_KEY') as string,
LOGIN_BLOCK_TIME: 0,
TEACHER_STUDENT_VISIBILITY__IS_CONFIGURABLE: Configuration.get(
'TEACHER_STUDENT_VISIBILITY__IS_CONFIGURABLE'
Expand Down
3 changes: 2 additions & 1 deletion apps/server/src/modules/server/server.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ export interface ServerConfig
}

const config: ServerConfig = {
AUTHENTICATION: Configuration.get('AUTHENTICATION') as string,
ACCESSIBILITY_REPORT_EMAIL: Configuration.get('ACCESSIBILITY_REPORT_EMAIL') as string,
ADMIN_TABLES_DISPLAY_CONSENT_COLUMN: Configuration.get('ADMIN_TABLES_DISPLAY_CONSENT_COLUMN') as boolean,
ALERT_STATUS_URL:
Expand Down Expand Up @@ -189,6 +188,8 @@ const config: ServerConfig = {
JWT_TIMEOUT_SECONDS: Configuration.get('JWT_TIMEOUT_SECONDS') as number,
JWT_LIFETIME_SUPPORT_SECONDS: Configuration.get('JWT_LIFETIME_SUPPORT_SECONDS') as number,
JWT_EXTENDED_TIMEOUT_SECONDS: Configuration.get('JWT_EXTENDED_TIMEOUT_SECONDS') as number,
JWT_PRIVATE_KEY: Configuration.get('JWT_PRIVATE_KEY') as string,
JWT_PUBLIC_KEY: Configuration.get('JWT_PUBLIC_KEY') as string,
NOT_AUTHENTICATED_REDIRECT_URL: Configuration.get('NOT_AUTHENTICATED_REDIRECT_URL') as string,
DOCUMENT_BASE_DIR: Configuration.get('DOCUMENT_BASE_DIR') as string,
SC_THEME: Configuration.get('SC_THEME') as SchulcloudTheme,
Expand Down
4 changes: 0 additions & 4 deletions config/default.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@
"default": 86400,
"description": "Maximum time in seconds a generated pin is handled as valid."
},
"AUTHENTICATION": {
"type": "string",
"description": "The secret that is used for create and validate the jwt."
},
"JWT_PRIVATE_KEY": {
"type": "string",
"description": "The private key used to sign JWTs."
Expand Down
1 change: 0 additions & 1 deletion config/development.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "./default.schema.json",
"AUTHENTICATION": "secrets",
"JWT_PRIVATE_KEY": "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEA0/oW2sIZWvVt0AEgQ8PS80/udJzfWXu6t2QWjUcQA2THGvDS\nXXMH6YMMY2czyBgf6L7hHV/9p1Trfpe7YgxYhOoGsxhXG1keAYQ4+mdveaUAa3ui\nACdEodsB0OFjVUdgOHCyUIXFfhSsp2p2tmZeFi/bE2v/05kYO+ExgQuzUDbB8bCr\n1sc7gMS/2dC2iE/BVw/I0F14oZkZn0fshojg4qoaLbLVKB7Iw53IXF2878zXp81J\ndnnvHdwVbGWqoII6sHZFQs8ob5S/WGMl4QnBHN98x0KmORUFyTv5kK4cdcC8LJ1H\npoVWNC6js84iF9yFRhYXY2RHqh7BwaZZ4XZym/MetTdQTBDaSvhXe0A3WdahNG+D\nGriehd6doWk98Adb49InaodH64ZRkurxiX61GEtzjMRq9EfGS5R/IfcWyPQbiir6\nymKXfOUtywRjcm3FZzmT7j3c0UHzQVEH0NBfTMj+QKz5NILNP230j0DcjNImDbHH\ncVH1quSb6e0WXjKANTkf4gaTOw7jdQDFw0Ou3aEmwPg+Xk1cwCwSHOOmPSSssZwg\njpzGodPO3vsMGfRYTwcGbzgdQFFj0qTmvgnM5MHtEy8qCyvM4OsAPnE0zQWn48p7\nPVdJm6j0H/1BYgVw1KxecIVk/HryoTOkgS9lhLu8iEIyrpAlWascIK7Uw58CAwEA\nAQKCAgAA0/lC4X83272SEm8N1LX+PVGxIuu8bb9M+BcediiZ2srsUASCWPCu+NQT\nj1OkdHOrdRNsCfPzs2E4HV+eAm5WFpPwHyg38yEq4FlYoQ7OataVlOYNGhoqh7B6\nIGdC7gRyM/5+UgdzdqE2B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EiGMEZg\nt1VWdHgL+FpNuZsKzuZ9jwfALj27LAkkJLjpH9DXDo6e7aJlCqbe8ili1gLo80FZ\np65W4wIRQSChoMcOHgZCbOBebUSW0zXLvccXoq+BGlt+qLM830Y0UFolbckHrF1O\nCTSPG6IaRisx3D2hNNrZIcyZaIwZeHhvj7fib/5hMRerXzSTH1QMXPc2bH4=\n-----END RSA PRIVATE KEY-----\n",
"JWT_PUBLIC_KEY": "-----BEGIN RSA PUBLIC KEY-----\nMIICCgKCAgEA0/oW2sIZWvVt0AEgQ8PS80/udJzfWXu6t2QWjUcQA2THGvDSXXMH\n6YMMY2czyBgf6L7hHV/9p1Trfpe7YgxYhOoGsxhXG1keAYQ4+mdveaUAa3uiACdE\nodsB0OFjVUdgOHCyUIXFfhSsp2p2tmZeFi/bE2v/05kYO+ExgQuzUDbB8bCr1sc7\ngMS/2dC2iE/BVw/I0F14oZkZn0fshojg4qoaLbLVKB7Iw53IXF2878zXp81Jdnnv\nHdwVbGWqoII6sHZFQs8ob5S/WGMl4QnBHN98x0KmORUFyTv5kK4cdcC8LJ1HpoVW\nNC6js84iF9yFRhYXY2RHqh7BwaZZ4XZym/MetTdQTBDaSvhXe0A3WdahNG+DGrie\nhd6doWk98Adb49InaodH64ZRkurxiX61GEtzjMRq9EfGS5R/IfcWyPQbiir6ymKX\nfOUtywRjcm3FZzmT7j3c0UHzQVEH0NBfTMj+QKz5NILNP230j0DcjNImDbHHcVH1\nquSb6e0WXjKANTkf4gaTOw7jdQDFw0Ou3aEmwPg+Xk1cwCwSHOOmPSSssZwgjpzG\nodPO3vsMGfRYTwcGbzgdQFFj0qTmvgnM5MHtEy8qCyvM4OsAPnE0zQWn48p7PVdJ\nm6j0H/1BYgVw1KxecIVk/HryoTOkgS9lhLu8iEIyrpAlWascIK7Uw58CAwEAAQ==\n-----END RSA PUBLIC KEY-----\n",
"SC_DOMAIN": "localhost",
Expand Down
1 change: 0 additions & 1 deletion config/test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "./default.schema.json",
"AUTHENTICATION": "secrets",
"JWT_PRIVATE_KEY": "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEA0/oW2sIZWvVt0AEgQ8PS80/udJzfWXu6t2QWjUcQA2THGvDS\nXXMH6YMMY2czyBgf6L7hHV/9p1Trfpe7YgxYhOoGsxhXG1keAYQ4+mdveaUAa3ui\nACdEodsB0OFjVUdgOHCyUIXFfhSsp2p2tmZeFi/bE2v/05kYO+ExgQuzUDbB8bCr\n1sc7gMS/2dC2iE/BVw/I0F14oZkZn0fshojg4qoaLbLVKB7Iw53IXF2878zXp81J\ndnnvHdwVbGWqoII6sHZFQs8ob5S/WGMl4QnBHN98x0KmORUFyTv5kK4cdcC8LJ1H\npoVWNC6js84iF9yFRhYXY2RHqh7BwaZZ4XZym/MetTdQTBDaSvhXe0A3WdahNG+D\nGriehd6doWk98Adb49InaodH64ZRkurxiX61GEtzjMRq9EfGS5R/IfcWyPQbiir6\nymKXfOUtywRjcm3FZzmT7j3c0UHzQVEH0NBfTMj+QKz5NILNP230j0DcjNImDbHH\ncVH1quSb6e0WXjKANTkf4gaTOw7jdQDFw0Ou3aEmwPg+Xk1cwCwSHOOmPSSssZwg\njpzGodPO3vsMGfRYTwcGbzgdQFFj0qTmvgnM5MHtEy8qCyvM4OsAPnE0zQWn48p7\nPVdJm6j0H/1BYgVw1KxecIVk/HryoTOkgS9lhLu8iEIyrpAlWascIK7Uw58CAwEA\nAQKCAgAA0/lC4X83272SEm8N1LX+PVGxIuu8bb9M+BcediiZ2srsUASCWPCu+NQT\nj1OkdHOrdRNsCfPzs2E4HV+eAm5WFpPwHyg38yEq4FlYoQ7OataVlOYNGhoqh7B6\nIGdC7gRyM/5+UgdzdqE2BjRwgfXcIFO6v7FAIlj14utOlb0dkxku2IHTVPPmjN4y\n+5266pTWwjkGl1bhSrfO53kFDYPTXta7Vvd+MKCYIwWlVrhmN2agQS0ISXGlrDZp\nNfx0pA2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+qLM830Y0UFolbckHrF1O\nCTSPG6IaRisx3D2hNNrZIcyZaIwZeHhvj7fib/5hMRerXzSTH1QMXPc2bH4=\n-----END RSA PRIVATE KEY-----\n",
"JWT_PUBLIC_KEY": "-----BEGIN RSA PUBLIC KEY-----\nMIICCgKCAgEA0/oW2sIZWvVt0AEgQ8PS80/udJzfWXu6t2QWjUcQA2THGvDSXXMH\n6YMMY2czyBgf6L7hHV/9p1Trfpe7YgxYhOoGsxhXG1keAYQ4+mdveaUAa3uiACdE\nodsB0OFjVUdgOHCyUIXFfhSsp2p2tmZeFi/bE2v/05kYO+ExgQuzUDbB8bCr1sc7\ngMS/2dC2iE/BVw/I0F14oZkZn0fshojg4qoaLbLVKB7Iw53IXF2878zXp81Jdnnv\nHdwVbGWqoII6sHZFQs8ob5S/WGMl4QnBHN98x0KmORUFyTv5kK4cdcC8LJ1HpoVW\nNC6js84iF9yFRhYXY2RHqh7BwaZZ4XZym/MetTdQTBDaSvhXe0A3WdahNG+DGrie\nhd6doWk98Adb49InaodH64ZRkurxiX61GEtzjMRq9EfGS5R/IfcWyPQbiir6ymKX\nfOUtywRjcm3FZzmT7j3c0UHzQVEH0NBfTMj+QKz5NILNP230j0DcjNImDbHHcVH1\nquSb6e0WXjKANTkf4gaTOw7jdQDFw0Ou3aEmwPg+Xk1cwCwSHOOmPSSssZwgjpzG\nodPO3vsMGfRYTwcGbzgdQFFj0qTmvgnM5MHtEy8qCyvM4OsAPnE0zQWn48p7PVdJ\nm6j0H/1BYgVw1KxecIVk/HryoTOkgS9lhLu8iEIyrpAlWascIK7Uw58CAwEAAQ==\n-----END RSA PUBLIC KEY-----\n",
"host": "localhost",
Expand Down

0 comments on commit 92dbf9d

Please sign in to comment.