feat!: add GRANTED_BROWSER_PROFILE env var support for browser profile override#914
Open
billyjbryant wants to merge 3 commits intofwdcloudsec:mainfrom
Open
feat!: add GRANTED_BROWSER_PROFILE env var support for browser profile override#914billyjbryant wants to merge 3 commits intofwdcloudsec:mainfrom
billyjbryant wants to merge 3 commits intofwdcloudsec:mainfrom
Conversation
…e override Add support for GRANTED_BROWSER_PROFILE environment variable to override the browser profile used when opening AWS console with -c/-s flags. Changes: - Add EnvVars to browser-profile flag to automatically read from GRANTED_BROWSER_PROFILE environment variable - Remove browser-profile from getConsoleURL condition to prevent env var from inadvertently triggering console URL generation - Browser profile from env var is only used when actually launching browser (after all safety checks) BREAKING CHANGE: The --browser-profile flag no longer triggers browser opening by itself. Users must now explicitly use -c or -s flags along with --browser-profile to open a browser. Previously, passing --browser-profile alone would open a browser window, but now it only sets which browser profile to use when a browser is opened via other flags. This prevents the GRANTED_BROWSER_PROFILE environment variable from inadvertently opening browsers. This allows users to set a default browser profile via environment variable that will be used whenever opening the console, while still allowing --browser-profile flag to take precedence. Fixes fwdcloudsec#886
… profile Add support for GRANTED_SSO_BROWSER_PROFILE environment variable to override the browser profile used when launching SSO login flows. When using SSOBrowserLaunchTemplate, the environment variable will be used to specify which browser profile to use for SSO authentication flows. Usage: export GRANTED_SSO_BROWSER_PROFILE="MySSOProfile" assume <profile> # SSO login will use "MySSOProfile" as the browser profile
…env var support - Add --sso-browser-profile flag to assume, granted sso login, generate, and populate commands - Add SSOBrowserProfile field to ConfigOpts to pass browser profile through SSO login flow - Remove redundant environment variable check from idclogin.Login (handled by flag EnvVars) - Add test case for empty browser profile in launcher tests - Support GRANTED_SSO_BROWSER_PROFILE environment variable via flag EnvVars
ff6f3a1 to
40ca546
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Add support for
GRANTED_BROWSER_PROFILEandGRANTED_SSO_BROWSER_PROFILEenvironment variables to override the browser profile used when opening AWS console and during SSO login flows.Fixes #886
Changes
Browser Profile for Console Access (
GRANTED_BROWSER_PROFILE)EnvVarsto--browser-profileflag to automatically read fromGRANTED_BROWSER_PROFILEenvironment variablebrowser-profilefromgetConsoleURLcondition to prevent env var from inadvertently triggering console URL generationSSO Browser Profile (
GRANTED_SSO_BROWSER_PROFILE)--sso-browser-profileflag toassume,granted sso login,granted sso generate, andgranted sso populatecommandsSSOBrowserProfilefield toConfigOptsto pass browser profile through SSO login flowGRANTED_SSO_BROWSER_PROFILEenvironment variable via flagEnvVarsBreaking Changes
The
--browser-profileflag no longer triggers browser opening by itself.Users must now explicitly use
-cor-sflags along with--browser-profileto open a browser with the desired profile.Previously, passing
--browser-profilealone would open a browser window, but now it only sets which browser profile to use when a browser is opened via other flags. This prevents theGRANTED_BROWSER_PROFILEenvironment variable from inadvertently opening browsers.Usage
Console Browser Profile
Users can now set a default browser profile via environment variable for console access:
The
--browser-profileflag still takes precedence over the environment variable.SSO Browser Profile
Users can set a default browser profile for SSO login flows:
Or use the flag directly:
The
--sso-browser-profileflag takes precedence over theGRANTED_SSO_BROWSER_PROFILEenvironment variable.Testing
BREAKING CHANGE: The
--browser-profileflag no longer triggers browser opening by itself. Users must now explicitly use-cor-sflags along with--browser-profileto open a browser with the desired profile.