From 5aafcc051b52db2798222c1383c88fdc08428f66 Mon Sep 17 00:00:00 2001 From: juarez Date: Wed, 13 Dec 2023 21:51:30 +0100 Subject: [PATCH 1/4] Release 1.0.2 --- CHANGELOG.md | 4 ++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c43db9d..0890bf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.2] - 2023-12-13 +### Added + + ## [1.0.1] - 2023-12-13 ### Fixed - Router link blank and router link diff --git a/package-lock.json b/package-lock.json index 7a33cba..1e79391 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "teiler-dashboard", - "version": "1.0.1-SNAPSHOT", + "version": "1.0.2-SNAPSHOT", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "teiler-dashboard", - "version": "1.0.1-SNAPSHOT", + "version": "1.0.2-SNAPSHOT", "dependencies": { "@angular/animations": "^17.0.4", "@angular/cdk": "^17.0.1", diff --git a/package.json b/package.json index b91c938..412f548 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "teiler-dashboard", - "version": "1.0.1-SNAPSHOT", + "version": "1.0.2-SNAPSHOT", "scripts": { "ng": "ng", "start": "ng serve", From aa8cc144492d4b32769b338fb5124c43b8d7e101 Mon Sep 17 00:00:00 2001 From: juarez Date: Tue, 13 Feb 2024 19:05:11 +0100 Subject: [PATCH 2/4] Changed: OIDC instead of KEYCLOAK --- CHANGELOG.md | 3 ++- docker-compose.yml | 6 +++--- docker/env.template.js | 8 ++++---- src/app/security/keycloak/keycloak-init.factory.ts | 6 +++--- src/app/security/teiler-auth.service.ts | 2 +- src/app/teiler/teiler.service.ts | 2 +- src/assets/env.js | 8 ++++---- 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0890bf5..dd07b7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [1.0.2] - 2023-12-13 -### Added +### Changed +- OIDC instead of KEYCLOAK ## [1.0.1] - 2023-12-13 diff --git a/docker-compose.yml b/docker-compose.yml index ad904ac..43dd42c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,9 +13,9 @@ services: environment: DEFAULT_LANGUAGE: "DE" TEILER_BACKEND_URL: "http://localhost:8085" - KEYCLOAK_URL: "http://localhost:8380/login" - KEYCLOAK_REALM: "teiler" - KEYCLOAK_CLIENT_ID: "teiler" + OIDC_URL: "http://localhost:8380/login" + OIDC_REALM: "teiler" + OIDC_CLIENT_ID: "teiler" TEILER_ADMIN_NAME: "Max Mustermann" TEILER_ADMIN_EMAIL: "max.mustermann@teiler-example.com" TEILER_ADMIN_PHONE: "+49 123 456789" diff --git a/docker/env.template.js b/docker/env.template.js index 0bc6874..b84a68c 100644 --- a/docker/env.template.js +++ b/docker/env.template.js @@ -5,10 +5,10 @@ window["env"]["teiler"]["config"] = { "DEFAULT_LANGUAGE": "${DEFAULT_LANGUAGE}", "TEILER_BACKEND_URL": "${TEILER_BACKEND_URL}", - "KEYCLOAK_URL": "${KEYCLOAK_URL}", - "KEYCLOAK_REALM": "${KEYCLOAK_REALM}", - "KEYCLOAK_CLIENT_ID": "${KEYCLOAK_CLIENT_ID}", - "KEYCLOAK_TOKEN_GROUP": "${KEYCLOAK_TOKEN_GROUP}", + "OIDC_URL": "${OIDC_URL}", + "OIDC_REALM": "${OIDC_REALM}", + "OIDC_CLIENT_ID": "${OIDC_CLIENT_ID}", + "OIDC_TOKEN_GROUP": "${OIDC_TOKEN_GROUP}", "TEILER_ADMIN_NAME": "${TEILER_ADMIN_NAME}", "TEILER_ADMIN_EMAIL": "${TEILER_ADMIN_EMAIL}", "TEILER_ADMIN_PHONE": "${TEILER_ADMIN_PHONE}", diff --git a/src/app/security/keycloak/keycloak-init.factory.ts b/src/app/security/keycloak/keycloak-init.factory.ts index d20772e..58c0615 100644 --- a/src/app/security/keycloak/keycloak-init.factory.ts +++ b/src/app/security/keycloak/keycloak-init.factory.ts @@ -8,9 +8,9 @@ export function initializeKeycloak(keycloak: KeycloakService){ config: { - url: environment.config.KEYCLOAK_URL, - realm: environment.config.KEYCLOAK_REALM, - clientId: environment.config.KEYCLOAK_CLIENT_ID + url: environment.config.OIDC_URL, + realm: environment.config.OIDC_REALM, + clientId: environment.config.OIDC_CLIENT_ID }, initOptions: { diff --git a/src/app/security/teiler-auth.service.ts b/src/app/security/teiler-auth.service.ts index 9e98d21..cec80a1 100644 --- a/src/app/security/teiler-auth.service.ts +++ b/src/app/security/teiler-auth.service.ts @@ -35,7 +35,7 @@ export class TeilerAuthService { public getGroups(): string[] { const keycloakInstance = this.keycloakService.getKeycloakInstance(); - const result = keycloakInstance?.tokenParsed?.[environment.config.KEYCLOAK_TOKEN_GROUP] || []; + const result = keycloakInstance?.tokenParsed?.[environment.config.OIDC_TOKEN_GROUP] || []; return result.map((group: string) => { if (typeof group === 'string' && group.charAt(0) === '/') { diff --git a/src/app/teiler/teiler.service.ts b/src/app/teiler/teiler.service.ts index 715130b..97d134e 100644 --- a/src/app/teiler/teiler.service.ts +++ b/src/app/teiler/teiler.service.ts @@ -102,7 +102,7 @@ export class TeilerService { } else if (teilerAppRoles.has(TeilerRole.TEILER_PUBLIC)) { isAuthorized = true; } else { - let roles: string[] = (environment.config.KEYCLOAK_TOKEN_GROUP) ? this.authService.getGroups() : this.authService.getRoles(); + let roles: string[] = (environment.config.OIDC_TOKEN_GROUP) ? this.authService.getGroups() : this.authService.getRoles(); for (let role of roles) { let mappedRole = this.fetchRoleFromEnvironment(role); if (mappedRole != undefined && teilerAppRoles.has(mappedRole)) { diff --git a/src/assets/env.js b/src/assets/env.js index 58c4b9e..3d47b59 100644 --- a/src/assets/env.js +++ b/src/assets/env.js @@ -5,10 +5,10 @@ window["env"]["teiler"]["config"] = { "DEFAULT_LANGUAGE": "DE", "TEILER_BACKEND_URL": "http://localhost:8085", - "KEYCLOAK_URL": "https://login.verbis.dkfz.de", - "KEYCLOAK_REALM": "test-realm-01", - "KEYCLOAK_CLIENT_ID": "bridgehead-test", - "KEYCLOAK_TOKEN_GROUP": "groups", + "OIDC_URL": "https://login.verbis.dkfz.de", + "OIDC_REALM": "test-realm-01", + "OIDC_CLIENT_ID": "bridgehead-test", + "OIDC_TOKEN_GROUP": "groups", "TEILER_ADMIN_NAME": "Max Mustermann", "TEILER_ADMIN_EMAIL": "max.mustermann@teiler-example.com", "TEILER_ADMIN_PHONE": "+49 123 456789", From f82f65bed0785a86771c43ef963455ed2f5ae2a8 Mon Sep 17 00:00:00 2001 From: juarez Date: Wed, 14 Feb 2024 10:31:14 +0100 Subject: [PATCH 3/4] Update Changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd07b7a..b13819b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - OIDC instead of KEYCLOAK -## [1.0.1] - 2023-12-13 +## [1.0.1] - 2024-02-14 ### Fixed - Router link blank and router link From 3e0f315c57eb5e65f2ddee74784512e94aa8ba81 Mon Sep 17 00:00:00 2001 From: juarez Date: Wed, 14 Feb 2024 10:35:14 +0100 Subject: [PATCH 4/4] Update Changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b13819b..6cbebad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.0.2] - 2023-12-13 +## [1.0.2] - 2024-02-14 ### Changed - OIDC instead of KEYCLOAK -## [1.0.1] - 2024-02-14 +## [1.0.1] - 2023-12-13 ### Fixed - Router link blank and router link