Skip to content

Commit

Permalink
Merge pull request oktadev#213 from AlainODea/ao-BUG-clobbers-aws-and…
Browse files Browse the repository at this point in the history
…-sls-commandfs

🐛 Clobbers aws and sls commands
  • Loading branch information
AlainODea committed Oct 2, 2018
2 parents 01f84d2 + e20107d commit 665986e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Readme.MD
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ Copy scripts from `.okta/bin` to somewhere on your PATH.
Verify your setup with a simple command:

```bash
aws test sts get-caller-identity
okta-aws test sts get-caller-identity
```

This will prompt for Okta credentials, log you into AWS, let you pick a role, and store a session profile called **test** for you.

Run the program again to see session resumption (you won't be asked for Okta credentials until the session expires):

```bash
aws test sts get-caller-identity
okta-aws test sts get-caller-identity
```

## Compiling the application
Expand Down
4 changes: 2 additions & 2 deletions bin/Install-OktaAwsCli.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ function With-Okta {
$env:OKTA_PROFILE = $OriginalOKTA_PROFILE
}
}
function aws {
function okta-aws {
Param([string]$Profile)
With-Okta -Profile $Profile aws --profile $Profile @args
}
function sls {
function okta-sls {
Param([string]$Profile)
With-Okta -Profile $Profile sls --stage $Profile @args
}
Expand Down
9 changes: 6 additions & 3 deletions bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ grep '^#OktaAWSCLI' "${bash_functions}" > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo '
function aws {
function okta-aws {
withokta "aws --profile $1" $@
}
function okta-sls {
withokta "sls --stage $1" $@
}
' >> "${bash_functions}"
fi

Expand All @@ -56,10 +59,10 @@ export PATH="$HOME/bin:$PATH"
function withokta
java -Djava.net.useSystemProxies com.okta.tools.WithOkta $argv
end
function aws
function okta-aws
withokta "aws --profile $argv[1]" $argv
end
function sls
function okta-sls
withokta "sls --stage $argv[1]" $argv
end
' >> "${fishConfig}"
Expand Down

0 comments on commit 665986e

Please sign in to comment.