Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/samply/teiler-dashboard
Browse files Browse the repository at this point in the history
…into release-1.0.2

# Conflicts:
#	package-lock.json
#	package.json
  • Loading branch information
djuarezgf committed Feb 14, 2024
2 parents 4421054 + 3e0f315 commit 19b107e
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]"
TEILER_ADMIN_PHONE: "+49 123 456789"
Expand Down
8 changes: 4 additions & 4 deletions docker/env.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teiler-dashboard",
"version": "1.0.1",
"version": "1.0.2-SNAPSHOT",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
6 changes: 3 additions & 3 deletions src/app/security/keycloak/keycloak-init.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion src/app/security/teiler-auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) === '/') {
Expand Down
2 changes: 1 addition & 1 deletion src/app/teiler/teiler.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
8 changes: 4 additions & 4 deletions src/assets/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"TEILER_ADMIN_PHONE": "+49 123 456789",
Expand Down

0 comments on commit 19b107e

Please sign in to comment.