aws / aws/aws-cli

credential_process is called twice

Open
#5,048 4 comments 1 reaction 0 assignees View on GitHub
credential-provider enhancement feature-request p3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

Using aws-cli/1.18.16 Python/3.7.5 Darwin/19.2.0 botocore/1.15.16

### Steps to reproduce:

1. Create a script that's similar to this one, and put it in your path (make sure to put valid credentials in `/tmp/credentials.json`).

```bash
#!/usr/bin/env bash
date >> /tmp/credentials.log
cat /tmp/credentals.json
```

2. Configure that script as credential_process
```ini
[profile test]
region=eu-west-1
credential_process = credentials.sh
```

3. Call an API
```bash
aws --profile test sts get-caller-identity
{
"UserId": "AROAJHGZ6YXXXXXXXXXX:1583683301060891000",
"Account": "XXXXXXXXXXXX",
"Arn": "arn:aws:sts::XXXXXXXXXXXX:assumed-role/XXXXXXXXXX/1583683301060891000"
}
```

### Expected behavior
There is only one line in the log

### Actual behavior
There are two lines in the log
```
cat /tmp/credentials.log
Sun Mar 8 17:01:59 CET 2020
Sun Mar 8 17:01:59 CET 2020
```

(This was discovered while investigating https://github.com/aws/git-remote-codecommit/issues/7)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.