diff --git a/CHANGELOG.md b/CHANGELOG.md index c43db9d..6cbebad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ 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] - 2024-02-14 +### Changed +- OIDC instead of KEYCLOAK + + ## [1.0.1] - 2023-12-13 ### Fixed - Router link blank and router link 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/package-lock.json b/package-lock.json index 710a696..1e79391 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "teiler-dashboard", - "version": "1.0.1", + "version": "1.0.2-SNAPSHOT", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "teiler-dashboard", - "version": "1.0.1", + "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 8e8b40a..412f548 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "teiler-dashboard", - "version": "1.0.1", + "version": "1.0.2-SNAPSHOT", "scripts": { "ng": "ng", "start": "ng serve", 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",