Skip to content

Commit 8d9068b

Browse files
authored
Merge pull request #1317 from tinaboyce/1293-flag-quiet-logs
fix: credential-process flag remove logs [#1293]
2 parents 125cf82 + 2afa50b commit 8d9068b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,8 @@ DUMP_CONTENT=true saml2aws login --verbose
832832

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

835-
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.
835+
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.
836+
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`.
836837

837838
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.
838839

cmd/saml2aws/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func main() {
178178
errtpl = "%+v\n"
179179
}
180180

181-
if *quiet || (command == cmdLogin.FullCommand() && loginFlags.CredentialProcess) {
181+
if *quiet {
182182
log.SetOutput(io.Discard)
183183
logrus.SetOutput(io.Discard)
184184
}

0 commit comments

Comments
 (0)