From add16b3c5a45c48404303e04eed506db8849a106 Mon Sep 17 00:00:00 2001 From: Prem Kumar Kalle Date: Mon, 16 Sep 2024 13:06:14 -0700 Subject: [PATCH] Update the default issuer to TCSP -Update the hardcode default issuer to TCSP. This values will only be used when reading the issuer from the centralconfig DB fails. Signed-off-by: Prem Kumar Kalle --- pkg/auth/csp/tanzu.go | 8 +++----- pkg/pluginmanager/default_discoveries_test.go | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/auth/csp/tanzu.go b/pkg/auth/csp/tanzu.go index f5a7fe66b..1e017d6f4 100644 --- a/pkg/auth/csp/tanzu.go +++ b/pkg/auth/csp/tanzu.go @@ -95,14 +95,12 @@ func GetOrgNameFromOrgID(orgID, accessToken, issuer string) (string, error) { func GetCSPMetadata() TanzuCSPMetadata { cspMetaData := getCSPMetadataFromCentralConfig() // If failed to get the CSP Metadata from central config, - // set the default Issuer URL of VCSP - // TODO(prkalle): Update the default Issuers to TCSP issuer URL( If TCSP is not stable in current release, update it next release) - // This just defaults in the code, defaults in central config can be updated anytime + // set the default Issuer URL of TCSP if cspMetaData.IssuerStaging == "" { - cspMetaData.IssuerStaging = StgIssuer + cspMetaData.IssuerStaging = StgIssuerTCSP } if cspMetaData.IssuerProduction == "" { - cspMetaData.IssuerProduction = ProdIssuer + cspMetaData.IssuerProduction = ProdIssuerTCSP } return cspMetaData diff --git a/pkg/pluginmanager/default_discoveries_test.go b/pkg/pluginmanager/default_discoveries_test.go index 7a180a40b..b700827a8 100644 --- a/pkg/pluginmanager/default_discoveries_test.go +++ b/pkg/pluginmanager/default_discoveries_test.go @@ -87,7 +87,7 @@ metadata: globalOpts: endpoint: https://localhost:8443 auth: - issuer: https://console-stg.cloud.vmware.com/csp/gateway/am/api + issuer: https://console-stg.tanzu.broadcom.com/csp/gateway/am/api userName: anujc accessToken: eyJ IDToken: eyJ