Fix for sso access key reading (#1469)

This commit is contained in:
ShahanaFarooqui 2024-11-18 13:28:37 -08:00 committed by GitHub
parent 006b013cf8
commit faf27881f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 7 deletions

View File

@ -8,7 +8,7 @@ import { Database } from '../../utils/database.js';
import { Logger } from '../../utils/logger.js';
import { Common } from '../../utils/common.js';
import { WSServer } from '../../utils/webSocketServer.js';
import { Authentication, SSO } from '../../models/config.model.js';
import { Authentication } from '../../models/config.model.js';
const options = { url: '' };
const logger = Logger;
const common = Common;
@ -114,7 +114,9 @@ export const getApplicationSettings = (req, res, next) => {
if (err) {
// Delete unnecessary data for initial response (without security token)
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
appConfData.SSO = new SSO();
delete appConfData.SSO.rtlCookiePath;
delete appConfData.SSO.cookieValue;
delete appConfData.SSO.logoutRedirectLink;
appConfData.secret2FA = '';
appConfData.dbDirectoryPath = '';
appConfData.nodes[selNodeIdx].authentication = new Authentication();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ import { Database, DatabaseService } from '../../utils/database.js';
import { Logger, LoggerService } from '../../utils/logger.js';
import { Common, CommonService } from '../../utils/common.js';
import { WSServer } from '../../utils/webSocketServer.js';
import { Authentication, SSO } from '../../models/config.model.js';
import { Authentication } from '../../models/config.model.js';
const options = { url: '' };
const logger: LoggerService = Logger;
@ -116,7 +116,9 @@ export const getApplicationSettings = (req, res, next) => {
if (err) {
// Delete unnecessary data for initial response (without security token)
const selNodeIdx = appConfData.nodes.findIndex((node) => node.index === appConfData.selectedNodeIndex) || 0;
appConfData.SSO = new SSO();
delete appConfData.SSO.rtlCookiePath;
delete appConfData.SSO.cookieValue;
delete appConfData.SSO.logoutRedirectLink;
appConfData.secret2FA = '';
appConfData.dbDirectoryPath = '';
appConfData.nodes[selNodeIdx].authentication = new Authentication();

View File

@ -98,7 +98,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
}
this.actions.pipe(
takeUntil(this.unSubs[4]),
filter((action) => action.type === RTLActions.FETCH_APPLICATION_SETTINGS || action.type === RTLActions.LOGIN || action.type === RTLActions.LOGOUT)).
filter((action) => action.type === RTLActions.SET_APPLICATION_SETTINGS || action.type === RTLActions.LOGIN || action.type === RTLActions.LOGOUT)).
subscribe((action: (any)) => {
if (action.type === RTLActions.SET_APPLICATION_SETTINGS) {
if (!this.sessionService.getItem('token')) {