Skip to content

Commit

Permalink
Update the default issuer to TCSP
Browse files Browse the repository at this point in the history
-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 <[email protected]>
  • Loading branch information
prkalle committed Sep 16, 2024
1 parent e18fceb commit add16b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions pkg/auth/csp/tanzu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkg/pluginmanager/default_discoveries_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit add16b3

Please sign in to comment.