From dd26bfb3282dee336c9b4f083d06d50745f6a7ba Mon Sep 17 00:00:00 2001 From: Diogo Pimenta Date: Tue, 18 Jan 2022 14:57:31 +0000 Subject: [PATCH 1/2] AST-8622 SAST description - Add base auth URI --- src/main/wrapper/CxConfig.ts | 3 ++- src/main/wrapper/CxWrapper.ts | 7 +++++++ src/tests/BaseTest.ts | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/wrapper/CxConfig.ts b/src/main/wrapper/CxConfig.ts index 853d82e4..ee089e09 100644 --- a/src/main/wrapper/CxConfig.ts +++ b/src/main/wrapper/CxConfig.ts @@ -1,8 +1,9 @@ export class CxConfig { baseUri: string = ""; + baseAuthUri: string = ""; pathToExecutable: string = ""; clientId: string = ""; clientSecret: string = ""; apiKey: string = ""; - tenant:string =""; + tenant: string = ""; } \ No newline at end of file diff --git a/src/main/wrapper/CxWrapper.ts b/src/main/wrapper/CxWrapper.ts index 6e260972..d03f2b79 100644 --- a/src/main/wrapper/CxWrapper.ts +++ b/src/main/wrapper/CxWrapper.ts @@ -41,6 +41,9 @@ export class CxWrapper { if (cxScanConfig.baseUri) { this.config.baseUri = cxScanConfig.baseUri; } + if (cxScanConfig.baseAuthUri) { + this.config.baseAuthUri = cxScanConfig.baseAuthUri; + } if (cxScanConfig.tenant) { this.config.tenant = cxScanConfig.tenant; } @@ -64,6 +67,10 @@ export class CxWrapper { list.push(CxConstants.BASE_URI); list.push(this.config.baseUri); } + if (this.config.baseAuthUri) { + list.push(CxConstants.BASE_AUTH_URI); + list.push(this.config.baseAuthUri); + } if (this.config.tenant) { list.push(CxConstants.TENANT); list.push(this.config.tenant); diff --git a/src/tests/BaseTest.ts b/src/tests/BaseTest.ts index 9baa3c9c..1cdbe054 100644 --- a/src/tests/BaseTest.ts +++ b/src/tests/BaseTest.ts @@ -1,5 +1,6 @@ export class BaseTest { baseUri: string = ""; + baseAuthUri: string = ""; clientId: string = ""; clientSecret: string = ""; apiKey: string = ""; @@ -8,6 +9,7 @@ export class BaseTest { constructor() { this.baseUri = process.env["CX_BASE_URI"]; + this.baseAuthUri = process.env["CX_BASE_AUTH_URI"]; this.clientId = process.env["CX_CLIENT_ID"]; this.clientSecret = process.env["CX_CLIENT_SECRET"]; this.tenant = process.env["CX_TENANT"]; From 804866c5446e1b4d4c58ab77854f6e121c65ad74 Mon Sep 17 00:00:00 2001 From: Diogo Pimenta Date: Wed, 19 Jan 2022 13:55:22 +0000 Subject: [PATCH 2/2] AST-8622 SAST description - Add missing newline --- src/main/wrapper/CxConfig.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/wrapper/CxConfig.ts b/src/main/wrapper/CxConfig.ts index ee089e09..eb7ad3cd 100644 --- a/src/main/wrapper/CxConfig.ts +++ b/src/main/wrapper/CxConfig.ts @@ -6,4 +6,4 @@ export class CxConfig { clientSecret: string = ""; apiKey: string = ""; tenant: string = ""; -} \ No newline at end of file +}