Skip to content

Commit 1248db1

Browse files
committed
style: add more README
1 parent 2f0802d commit 1248db1

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

README.md

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
CLI tool for retrieving AWS temporary credentials using SAML providers.
44

5-
Firstly, this package currently deals with SAML only, however if you have an OIDC IdP provider set up to AWS you can use this [package](https://github.com/openstandia/aws-cli-oidc) and likewise this [package](https://github.com/Versent/saml2aws) for standard SAML only AWS integrations - standard meaning
5+
Firstly, this package currently deals with SAML only, however if you have an OIDC IdP provider set up to AWS you can use this [package](https://github.com/openstandia/aws-cli-oidc) and likewise this [package](https://github.com/Versent/saml2aws) for standard SAML only AWS integrations - standard meaning.
66

7-
If, however, you need to support a non standard user journeys enforced by your IdP i.e. a sub company selection within your organization login portal, or a selection screen for different MFA providers - PingID or RSA HardToken etc.... you cannot reliably automate the flow or it would have to be too specific.
7+
If, however, you need to support a non standard user journeys enforced by your IdP i.e. a sub company selection within your organization login portal, or a selection screen for different MFA providers - PingID or RSA HardToken etc.... you cannot reliably automate the flow or it would have to be too specific.
88

99
As such this approach uses [go-rod](https://github.com/go-rod/rod) library to uniformly allow the user to complete any and all auth steps and selections in a managed browser session up to the point of where the SAMLResponse were to be sent to AWS ACS service `https://signin.aws.amazon.com/saml`. Capturing this via hijack request and posting to AWS STS service to exchange this for the temporary credentials.
1010

11-
The advantage of using SAML is that real users can gain access to the AWS Console UI or programatically and audited as the same person in cloudtrail.
11+
The advantage of using SAML is that real users can gain access to the AWS Console UI or programatically and audited as the same person in cloudtrail.
1212

1313
By default the tool creates the session name - which can be audited including the persons username from the localhost.
1414

@@ -18,28 +18,42 @@ By default the tool creates the session name - which can be audited including th
1818

1919
- Some login forms if not done correctly according to chrome specs and do not specify `type` on the HTML tag with `username` Chromium will not pick it up
2020

21-
## Install
21+
- As the process of re-requesting new credentials is **by design** and should be used in places where it cannot be automated - it is good idea **IF POSSIBLE** to use longer sessions for ***NON LIVE*** AWS accounts so that the prompt is not too frequent.
2222

23-
Download from [Releases page](https://github.com/dnitsch/aws-cli-auth/releases).
23+
## Install
2424

2525
MacOS
2626

2727
```bash
28-
curl -L https://github.com/dnitsch/aws-cli-auth/releases/download/v0.6.2/aws-cli-auth-darwin -o aws-cli-auth
28+
curl -L https://github.com/dnitsch/aws-cli-auth/releases/latest/download/aws-cli-auth-darwin -o aws-cli-auth
2929
chmod +x aws-cli-auth
3030
sudo mv aws-cli-auth /usr/local/bin
3131
```
3232

3333
Linux
34+
3435
```bash
35-
curl -L https://github.com/dnitsch/aws-cli-auth/releases/download/v0.6.2/aws-cli-auth-linux -o aws-cli-auth
36+
curl -L https://github.com/dnitsch/aws-cli-auth/releases/latest/download/aws-cli-auth-linux -o aws-cli-auth
3637
chmod +x aws-cli-auth
3738
sudo mv aws-cli-auth /usr/local/bin
3839
```
3940

4041
Windows
42+
4143
```posh
42-
iwr -Uri "https://github.com/dnitsch/aws-cli-auth/releases/download/v0.6.2/aws-cli-auth-windows.exe" -OutFile "aws-cli-auth"
44+
iwr -Uri "https://github.com/dnitsch/aws-cli-auth/releases/latest/download/aws-cli-auth-windows.exe" -OutFile "aws-cli-auth"
45+
```
46+
47+
### Versioned
48+
49+
Download a specific version from [Releases page](https://github.com/dnitsch/aws-cli-auth/releases)
50+
51+
example for MacOS
52+
53+
```bash
54+
curl -L https://github.com/dnitsch/aws-cli-auth/releases/download/v0.6.2/aws-cli-auth-darwin -o aws-cli-auth
55+
chmod +x aws-cli-auth
56+
sudo mv aws-cli-auth /usr/local/bin
4357
```
4458

4559
## Usage
@@ -68,7 +82,7 @@ Flags:
6882
Use "aws-cli-auth [command] --help" for more information about a command.
6983
```
7084

71-
### SAML
85+
### SAML
7286

7387
```
7488
Get AWS credentials and out to stdout through your SAML provider authentication.
@@ -131,10 +145,21 @@ region = eu-west-1
131145
credential_process=aws-cli-auth saml -p https://your-idp.com/idp/foo?PARTNER=urn:amazon:webservices --principal arn:aws:iam::XXXXXXXXXX:saml-provider/IDP_ENTITY_ID -r arn:aws:iam::XXXXXXXXXX:role/Developer -d 3600
132146
```
133147

148+
Optionally you can still use it as a source profile provided your base role allows AssumeRole on that resource
149+
150+
```
151+
[profile elevated_from_test_nonprod]
152+
role_arn = arn:aws:iam::XXXXXXXXXX:role/ElevatedRole
153+
source_profile = test_nonprod
154+
region = eu-west-1
155+
output = json
156+
```
157+
134158
Notice the missing `-s` | `--store-profile` flag
135159

136160
### Use in CI
137161

162+
Often times in CI you may have multiple credential provider methods enabled for various flows - this method lets you specify the exact credential provider to use without removing environment variables.
138163

139164
```
140165
Initiates a specific crednetial provider [WEB_ID] as opposed to relying on the defaultCredentialChain provider.
@@ -183,7 +208,8 @@ Global Flags:
183208
```
184209

185210
## Licence
186-
WFTPL
211+
212+
WFTPL
187213

188214
## Contribute
189215

@@ -201,5 +227,8 @@ To make a contribution:
201227
- Ensure your PR passes all current (and new) tests
202228

203229
## Acknowledgements
204-
- [Hiroyuki Wada](https://github.com/wadahiro) [package](https://github.com/openstandia/aws-cli-oidc)
205-
- [Mark Wolfe](https://github.com/wolfeidau) [package](https://github.com/Versent/saml2aws)
230+
231+
Inspired by/Borrowed the design for secretStore from these 2 packages:
232+
233+
- [Hiroyuki Wada](https://github.com/wadahiro) [package](https://github.com/openstandia/aws-cli-oidc)
234+
- [Mark Wolfe](https://github.com/wolfeidau) [package](https://github.com/Versent/saml2aws)

0 commit comments

Comments
 (0)