Skip to content

Commit

Permalink
Merge pull request #1317 from tinaboyce/1293-flag-quiet-logs
Browse files Browse the repository at this point in the history
fix: credential-process flag remove logs [#1293]
  • Loading branch information
mapkon committed Jul 21, 2024
2 parents 125cf82 + 2afa50b commit 8d9068b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,8 @@ DUMP_CONTENT=true saml2aws login --verbose

[Credential Process](https://github.com/awslabs/awsprocesscreds) is a convenient way of interfacing credential providers with the AWS Cli.

You can use `saml2aws` as a credential provider by simply configuring it and then adding a profile to the AWS configuration. `saml2aws` has a flag `--credential-process` generating an output with the right JSON format.
You can use `saml2aws` as a credential provider by simply configuring it and then adding a profile to the AWS configuration. `saml2aws` has a flag `--credential-process` generating an output with the right JSON format, as well as a flag `--quiet` that will block the logging from being displayed.
The AWS credential file (typically ~/.aws/credentials) has precedence over the credential_process provider. That means that if credentials are present in the file, the credential process will not trigger. To counter that you can override the aws credential location of `saml2aws` to another file using `--credential-file` or specifying it during `configure`.

The AWS credential file (typically ~/.aws/credentials) has precedence over the credential_process provider. That means that if credentials are present in the file, the credential process will not trigger.

Expand Down
2 changes: 1 addition & 1 deletion cmd/saml2aws/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func main() {
errtpl = "%+v\n"
}

if *quiet || (command == cmdLogin.FullCommand() && loginFlags.CredentialProcess) {
if *quiet {
log.SetOutput(io.Discard)
logrus.SetOutput(io.Discard)
}
Expand Down

0 comments on commit 8d9068b

Please sign in to comment.