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

okta-aws passing profile name twice to aws CLI #375

Open
dangeReis opened this issue Aug 3, 2021 · 3 comments · May be fixed by #377
Open

okta-aws passing profile name twice to aws CLI #375

dangeReis opened this issue Aug 3, 2021 · 3 comments · May be fixed by #377

Comments

@dangeReis
Copy link
Contributor

Describe the bug
On MacOS (and probably other linux), it seems that withokta isn't stripping the profile name from the arg list when it calls withokta using the following alias

function okta-aws {
    withokta "aws --profile $1" "$@"
}

All we get is a generic error from aws CLI complaining about bad arguments.

If the function is changed to

function okta-aws {
     withokta "aws --profile" "$@"
}

it seems to work fine, although I'm not sure that's the correct solution.

To Reproduce
Steps to reproduce the behavior:

  1. Run okta-aws test sts get-caller-identity
  2. See error

Expected behavior
Get logged into the profile and get your caller identity.

@hcourse-nydig
Copy link

Pretty sure this is related to #376, I think the fix is straightforward (see my comment).

@dangeReis
Copy link
Contributor Author

@hcourse-nydig yes, it appears to be the same issue (although the fix is slightly different for bash).

hcourse-nydig added a commit to hcourse-nydig/okta-aws-cli-assume-role that referenced this issue Aug 4, 2021
Removes first param from arg lists before calling aws cli. Fixes both bash and fish

Resolves: oktadev#375, oktadev#376
@hcourse-nydig
Copy link

If you've got time, could you double check the PR? This seems like a weirdly fundamental issue to still exist so I wonder if we're missing something? Anyway, should do the job!

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 a pull request may close this issue.

2 participants