Skip to content
Snippets Groups Projects
Commit 08f6dd20 authored by Karolína Dočkalová Burská's avatar Karolína Dočkalová Burská
Browse files

Update local issuer to keycloak

parent 45e5c705
No related branches found
No related tags found
No related merge requests found
image: cypress/browsers:node16.13.0-chrome95-ff94 image: cypress/browsers:node18.12.0-chrome103-ff107
stages: stages:
- codeStyle - codeStyle
......
16.0.0 Update to Angular 16 and update local issuer to keycloak.
15.1.6 Fix commands not displaying. 15.1.6 Fix commands not displaying.
15.1.5 Update boolean directive of command. 15.1.5 Update boolean directive of command.
15.1.4 Fix behavior subject for forbidden commands. 15.1.4 Fix behavior subject for forbidden commands.
......
This diff is collapsed.
...@@ -22,31 +22,31 @@ ...@@ -22,31 +22,31 @@
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@angular-eslint/builder": "~16.3.1", "@angular-eslint/builder": "~16.2.0",
"@angular-eslint/eslint-plugin": "^16.3.1", "@angular-eslint/eslint-plugin": "^16.2.0",
"@angular-eslint/eslint-plugin-template": "^16.3.1", "@angular-eslint/eslint-plugin-template": "^16.2.0",
"@angular-eslint/schematics": "^16.3.1", "@angular-eslint/schematics": "^16.2.0",
"@angular-eslint/template-parser": "^16.3.1", "@angular-eslint/template-parser": "^16.2.0",
"@angular/animations": "^16.2.12", "@angular/animations": "^16.2.3",
"@angular/cdk": "^16.2.14", "@angular/cdk": "^16.2.3",
"@angular/common": "^16.2.12", "@angular/common": "^16.2.3",
"@angular/compiler": "^16.2.12", "@angular/compiler": "^16.2.3",
"@angular/core": "^16.2.12", "@angular/core": "^16.2.3",
"@angular/forms": "^16.2.12", "@angular/forms": "^16.2.3",
"@angular/material": "^16.2.14", "@angular/material": "^16.2.3",
"@angular/platform-browser": "^16.2.12", "@angular/platform-browser": "^16.2.3",
"@angular/platform-browser-dynamic": "^16.2.12", "@angular/platform-browser-dynamic": "^16.2.3",
"@angular/router": "^16.2.12", "@angular/router": "^16.2.3",
"@hpcc-js/wasm": "^1.15.3", "@hpcc-js/wasm": "^2.16.2",
"@sentinel/auth": "~16.1.0", "@sentinel/auth": "~16.1.0",
"@sentinel/common": "~16.2.0", "@sentinel/common": "~16.2.3",
"@sentinel/components": "~16.3.0", "@sentinel/components": "~16.3.0",
"@sentinel/layout": "~16.1.0", "@sentinel/layout": "~16.1.0",
"@types/chart.js": "^2.9.37", "@types/chart.js": "^2.9.37",
"@types/jquery": "^3.5.14", "@types/jquery": "^3.5.14",
"@typescript-eslint/eslint-plugin": "^5.59.2", "@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2", "@typescript-eslint/parser": "^5.59.2",
"angular-mgl-timeline": "^0.4.0", "angular-mgl-timeline": "^1.1.0",
"angular-oauth2-oidc": "^16.0.0", "angular-oauth2-oidc": "^16.0.0",
"angular-oauth2-oidc-jwks": "^16.0.0", "angular-oauth2-oidc-jwks": "^16.0.0",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
......
...@@ -2,32 +2,22 @@ ...@@ -2,32 +2,22 @@
// `ng build --configuration local` replaces `environment.ts` with `environment.local.ts`. // `ng build --configuration local` replaces `environment.ts` with `environment.local.ts`.
// The list of file replacements can be found in `angular.json`. // The list of file replacements can be found in `angular.json`.
const BASE_URL = 'https://172.19.0.22';
const HOME_URL = 'https://localhost:4200'; const HOME_URL = 'https://localhost:4200';
export const environment = { export const environment = {
production: false, production: false,
// OIDC SETTINGS
// Url of the Identity Provider
issuer: 'https://oidc.muni.cz/oidc/',
// URL of the SPA to redirect the user after silent refresh
silentRefreshRedirectUri: HOME_URL,
// URL of the SPA to redirect the user to after login
redirectUri: HOME_URL,
// The SPA's id. The SPA is registered with this id at the config-server
clientId: 'b53f2660-8fa0-4d32-94e4-23a59d7e7077',
// set the scope for the permissions the client should request
scope: 'openid profile email',
sessionChecksEnabled: false, sessionChecksEnabled: false,
commandVisualizationConfig: { commandVisualizationConfig: {
trainingBasePath: 'http://localhost:3000/kypo-rest-training/api/v1/', trainingBasePath: BASE_URL + '/kypo-rest-training/api/v1/',
adaptiveBasePath: 'http://localhost:3000/kypo-adaptive-training/api/v1/', adaptiveBasePath: BASE_URL + '/kypo-adaptive-training/api/v1/',
}, },
authConfig: { authConfig: {
guardMainPageRedirect: 'visualizations', guardMainPageRedirect: 'visualizations',
guardLoginPageRedirect: 'login', guardLoginPageRedirect: 'login',
interceptorAllowedUrls: ['https://172.19.0.22', 'http://localhost', 'https://localhost'], interceptorAllowedUrls: [BASE_URL, 'https://localhost'],
authorizationStrategyConfig: { authorizationStrategyConfig: {
authorizationUrl: 'https://172.19.0.22/kypo-rest-user-and-group/api/v1/users/info', authorizationUrl: BASE_URL + '/kypo-rest-user-and-group/api/v1/users/info',
}, },
providers: [ providers: [
{ {
...@@ -35,12 +25,14 @@ export const environment = { ...@@ -35,12 +25,14 @@ export const environment = {
textColor: 'white', textColor: 'white',
backgroundColor: '#002776', backgroundColor: '#002776',
oidcConfig: { oidcConfig: {
issuer: 'https://172.19.0.22:443/csirtmu-dummy-issuer-server/', requireHttps: true,
clientId: 'dTuBbJOzBhRttfLgDKuLIMNmAzbZjuWgjfGf', issuer: BASE_URL + '/keycloak/realms/KYPO',
clientId: 'KYPO-client',
redirectUri: HOME_URL, redirectUri: HOME_URL,
scope: 'openid email profile', scope: 'openid email profile offline_access',
logoutUrl: 'https://172.19.0.22/csirtmu-dummy-issuer-server/endsession', logoutUrl: BASE_URL + '/keycloak/realms/KYPO/protocol/openid-connect/logout',
postLogoutRedirectUri: HOME_URL, silentRefreshRedirectUri: BASE_URL + '/silent-refresh.html',
postLogoutRedirectUri: HOME_URL + '/logout-confirmed',
clearHashAfterLogin: true, clearHashAfterLogin: true,
}, },
}, },
......
...@@ -2,30 +2,22 @@ ...@@ -2,30 +2,22 @@
// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`. // `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`. // The list of file replacements can be found in `angular.json`.
const BASE_URL = 'https://172.19.0.22';
const HOME_URL = 'https://localhost:4200'; const HOME_URL = 'https://localhost:4200';
export const environment = { export const environment = {
production: true, production: true,
// OIDC SETTINGS
// Url of the Identity Provider
issuer: 'https://oidc.muni.cz/oidc/',
// URL of the SPA to redirect the user after silent refresh
silentRefreshRedirectUri: HOME_URL,
// URL of the SPA to redirect the user to after login
redirectUri: HOME_URL,
// set the scope for the permissions the client should request
scope: 'openid profile email',
sessionChecksEnabled: false, sessionChecksEnabled: false,
commandVisualizationConfig: { commandVisualizationConfig: {
trainingBasePath: 'https://172.19.0.22/kypo-rest-training/api/v1/', trainingBasePath: BASE_URL + '/kypo-rest-training/api/v1/',
adaptiveBasePath: 'https://172.19.0.22/kypo-adaptive-training/api/v1/', adaptiveBasePath: BASE_URL + '/kypo-adaptive-training/api/v1/',
}, },
authConfig: { authConfig: {
guardMainPageRedirect: 'visualizations', guardMainPageRedirect: 'visualizations',
guardLoginPageRedirect: 'login', guardLoginPageRedirect: 'login',
interceptorAllowedUrls: ['https://172.19.0.22', 'http://localhost'], interceptorAllowedUrls: [BASE_URL, 'http://localhost'],
authorizationStrategyConfig: { authorizationStrategyConfig: {
authorizationUrl: 'https://172.19.0.22/kypo-rest-user-and-group/api/v1/users/info', authorizationUrl: BASE_URL + '/kypo-rest-user-and-group/api/v1/users/info',
}, },
providers: [ providers: [
{ {
...@@ -33,12 +25,14 @@ export const environment = { ...@@ -33,12 +25,14 @@ export const environment = {
textColor: 'white', textColor: 'white',
backgroundColor: '#002776', backgroundColor: '#002776',
oidcConfig: { oidcConfig: {
issuer: 'https://172.19.0.22:443/csirtmu-dummy-issuer-server/', requireHttps: true,
clientId: '0bf33f00-2700-4efb-ab09-186076f85c7d', issuer: BASE_URL + '/keycloak/realms/KYPO',
clientId: 'KYPO-client',
redirectUri: HOME_URL, redirectUri: HOME_URL,
scope: 'openid email profile', scope: 'openid email profile offline_access',
logoutUrl: 'https://172.19.0.22/csirtmu-dummy-issuer-server/endsession', logoutUrl: BASE_URL + '/keycloak/realms/KYPO/protocol/openid-connect/logout',
postLogoutRedirectUri: HOME_URL, silentRefreshRedirectUri: BASE_URL + '/silent-refresh.html',
postLogoutRedirectUri: HOME_URL + '/logout-confirmed',
clearHashAfterLogin: true, clearHashAfterLogin: true,
}, },
}, },
......
...@@ -2,30 +2,22 @@ ...@@ -2,30 +2,22 @@
// `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`. // `ng build --configuration production` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`. // The list of file replacements can be found in `angular.json`.
const BASE_URL = 'https://172.19.0.22';
const HOME_URL = 'https://localhost:4200'; const HOME_URL = 'https://localhost:4200';
export const environment = { export const environment = {
production: false, production: false,
// OIDC SETTINGS
// Url of the Identity Provider
issuer: 'https://oidc.muni.cz/oidc/',
// URL of the SPA to redirect the user after silent refresh
silentRefreshRedirectUri: HOME_URL,
// URL of the SPA to redirect the user to after login
redirectUri: HOME_URL,
// set the scope for the permissions the client should request
scope: 'openid profile email',
sessionChecksEnabled: false, sessionChecksEnabled: false,
commandVisualizationConfig: { commandVisualizationConfig: {
trainingBasePath: 'https://172.19.0.22/kypo-rest-training/api/v1/', trainingBasePath: BASE_URL + '/kypo-rest-training/api/v1/',
adaptiveBasePath: 'https://172.19.0.22/kypo-adaptive-training/api/v1/', adaptiveBasePath: BASE_URL + '/kypo-adaptive-training/api/v1/',
}, },
authConfig: { authConfig: {
guardMainPageRedirect: 'visualizations', guardMainPageRedirect: 'visualizations',
guardLoginPageRedirect: 'login', guardLoginPageRedirect: 'login',
interceptorAllowedUrls: ['https://172.19.0.22', 'http://localhost'], interceptorAllowedUrls: [BASE_URL, 'https://localhost'],
authorizationStrategyConfig: { authorizationStrategyConfig: {
authorizationUrl: 'https://172.19.0.22/kypo-rest-user-and-group/api/v1/users/info', authorizationUrl: BASE_URL + '/kypo-rest-user-and-group/api/v1/users/info',
}, },
providers: [ providers: [
{ {
...@@ -33,12 +25,14 @@ export const environment = { ...@@ -33,12 +25,14 @@ export const environment = {
textColor: 'white', textColor: 'white',
backgroundColor: '#002776', backgroundColor: '#002776',
oidcConfig: { oidcConfig: {
issuer: 'https://172.19.0.22:443/csirtmu-dummy-issuer-server/', requireHttps: true,
clientId: 'nYIMhUzEEisLBVADUpEmzFwgGLvvPEPKQpQK', issuer: BASE_URL + '/keycloak/realms/KYPO',
clientId: 'KYPO-client',
redirectUri: HOME_URL, redirectUri: HOME_URL,
scope: 'openid email profile', scope: 'openid email profile offline_access',
logoutUrl: 'https://172.19.0.22/csirtmu-dummy-issuer-server/endsession', logoutUrl: BASE_URL + '/keycloak/realms/KYPO/protocol/openid-connect/logout',
postLogoutRedirectUri: HOME_URL, silentRefreshRedirectUri: BASE_URL + '/silent-refresh.html',
postLogoutRedirectUri: HOME_URL + '/logout-confirmed',
clearHashAfterLogin: true, clearHashAfterLogin: true,
}, },
}, },
......
import { Column, Row, RowExpand, SentinelTable } from '@sentinel/components/table'; import { Column, Row, RowExpand, ExpandableSentinelTable } from '@sentinel/components/table';
import { CommandDetailComponent } from '../detail/command-detail.component'; import { CommandDetailComponent } from '../detail/command-detail.component';
import { AggregatedCommands } from '../model/aggregated-commands'; import { AggregatedCommands } from '../model/aggregated-commands';
export class CommandTable extends SentinelTable<AggregatedCommands> { export class CommandTable extends ExpandableSentinelTable<AggregatedCommands, CommandDetailComponent, null> {
constructor(resource: AggregatedCommands[]) { constructor(resource: AggregatedCommands[]) {
const columns = [ const columns = [
new Column('cmd', 'command', true), new Column('cmd', 'command', true, 'cmd'),
new Column('commandType', 'command type', true), new Column('commandType', 'command type', true, 'commandType'),
new Column('frequency', 'frequency', true), new Column('frequency', 'frequency', true, 'frequency'),
]; ];
const rows = resource.map((command) => new Row(command)); const rows = resource.map((command) => new Row(command));
const expand = new RowExpand(CommandDetailComponent, null);
super(rows, columns); super(rows, columns, expand);
this.expand = new RowExpand(CommandDetailComponent);
} }
} }
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
"name": "@muni-kypo-crp/command-visualizations", "name": "@muni-kypo-crp/command-visualizations",
"version": "15.1.6", "version": "15.1.6",
"peerDependencies": { "peerDependencies": {
"@angular/common": "~14.0.3", "@angular/common": "~16.2.12",
"@angular/core": "~14.0.3", "@angular/core": "~16.2.12",
"@angular/material": "^14.0.3" "@angular/material": "^16.2.14"
}, },
"dependencies": { "dependencies": {
"tslib": "^2.0.0" "tslib": "^2.0.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment