From 0f92d57e8c73323bcceaf6ad834af4960c943186 Mon Sep 17 00:00:00 2001 From: Antony Natale Date: Fri, 3 May 2024 15:41:23 -0400 Subject: [PATCH] OSD-22376 | fix: prevents overwriting the client id if set for fedramp with keycloak --- cmd/login/cmd.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmd/login/cmd.go b/cmd/login/cmd.go index e26af9247f..5397b8dced 100644 --- a/cmd/login/cmd.go +++ b/cmd/login/cmd.go @@ -346,9 +346,16 @@ func runWithRuntime(r *rosa.Runtime, cmd *cobra.Command, argv []string) error { if !ok { tokenURL = args.tokenURL } - clientID, ok = fedramp.ClientIDs[env] - if !ok { + + // if client-id is provided, we don't want to just override it + // with Keycloak flow + if args.clientID != "" { clientID = args.clientID + } else { + clientID, ok = fedramp.ClientIDs[env] + if !ok { + clientID = args.clientID + } } } }