From 2e4cfa41e987e915a5b0b13162c7a5760a2657c0 Mon Sep 17 00:00:00 2001 From: Damian Debkowski Date: Fri, 22 Sep 2023 11:55:20 -0700 Subject: [PATCH] chore: add comment for ToMap method --- internal/credential/state.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/credential/state.go b/internal/credential/state.go index de2ef44..7286dda 100644 --- a/internal/credential/state.go +++ b/internal/credential/state.go @@ -205,6 +205,13 @@ func (s *AwsCredentialPersistedState) GenerateCredentialChain(ctx context.Contex // access_key_id, secret_access_key & creds_last_rotated_time func (s *AwsCredentialPersistedState) ToMap() map[string]any { ct := GetCredentialType(s.CredentialsConfig) + // Dynamic AWS credentials are temporary credentials that expire within an hour. + // ToMap() returns an empty map here so that Boundary does not store temporary + // credentials into the database. + // + // Uknown credentials are not aws compatiable secrets that may have been provided + // for a non-aws s3 compatiable service. These credentials will not be returned + // because the plugin does not know how to manage non-aws credentials. if ct == DynamicAWS || ct == Unknown { return map[string]any{} }