Add logging during awskms auto-unseal (#9794)

Adds debug and warn logging around AWS credential chain generation,
specifically to help users debugging auto-unseal problems on AWS, by
logging which role is being used in the case of a webidentity token.

Adds a deferred call to flush the log output as well, to ensure logs
are output in the event of an initialization failure.
This commit is contained in:
Theron Voran
2020-09-28 14:06:49 -07:00
committed by GitHub
parent 1c0b92369f
commit 10c0adad72
28 changed files with 348 additions and 80 deletions

View File

@@ -187,6 +187,7 @@ func NewDynamoDBBackend(conf map[string]string, logger log.Logger) (physical.Bac
AccessKey: conf["access_key"],
SecretKey: conf["secret_key"],
SessionToken: conf["session_token"],
Logger: logger,
}
creds, err := credsConfig.GenerateCredentialChain()
if err != nil {