Skip to content

Commit

Permalink
fix: credential-process flag remove logs [Versent#1293]
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaboyce committed Jul 19, 2024
1 parent f604db6 commit b7d7795
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 b7d7795

Please sign in to comment.