Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell arg fix #380

Merged
merged 11 commits into from
Aug 10, 2021
Merged

Shell arg fix #380

merged 11 commits into from
Aug 10, 2021

Conversation

dangeReis
Copy link
Contributor

Problem Statement
Updating the withOkta script to not use the profile broke the okta-aws and okta-sls commands.

Solution
Set the profile in the respective commands. Also remove the profile from the arguments being passed in to aws cli (or sls cli). Additionally this stores the appropriate profile name in the .aws/credentials file.

This should fix #374 #375 #376

@dangeReis
Copy link
Contributor Author

replaces #378

@hcourse-nydig @DavidTanner please confirm that this looks good. I basically took both of your solutions and combined them. Also sorry, not sure if there's a way to modify an existing PR, so created a new one.

bin/install.sh Outdated Show resolved Hide resolved
bin/install.sh Outdated
@@ -111,12 +111,14 @@ fishFunctionsDir="${PREFIX}/fish_functions"
mkdir -p "${fishFunctionsDir}"
cat <<'EOF' >"${fishFunctionsDir}/okta-aws.fish"
function okta-aws
withokta "aws --profile $argv[1]" $argv
set -lx OKTA_PROFILE "$argv[1]"
OKTA_PROFILE="$1" withokta "aws --profile $argv[1]" $argv[2..-1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as below. Doesn't work the same in fish as bash.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link
Contributor

@DavidTanner DavidTanner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dangeReis
Copy link
Contributor Author

@mraible what stands in the way of getting this merged in?

@mraible mraible merged commit 24c2f9e into oktadev:master Aug 10, 2021
@mraible
Copy link

mraible commented Aug 10, 2021

@dangeReis Nothing. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

withokta saving to incorrect aws profile name
4 participants