Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c1c7c9c

Browse files
don't log secrets even with debug logging enabled (#71)
1 parent a38c356 commit c1c7c9c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

‎secret/vault/vault.go‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (v *VaultSecrets) GetSecretsForTarget(name string) (map[string]string, erro
8787
}
8888

8989
zap.L().Debug("found secrets in vault",
90-
zap.Any("secret", secret))
90+
zap.Strings("secret", keys(env)))
9191

9292
return env, nil
9393
}
@@ -152,6 +152,13 @@ func kvToMap(version int, data map[string]interface{}) (env map[string]string, e
152152
return
153153
}
154154

155+
func keys(m map[string]string) (k []string) {
156+
for x := range m {
157+
k = append(k, x)
158+
}
159+
return
160+
}
161+
155162
// because Vault has no way to know if a kv engine is v1 or v2, we have to check
156163
// for the /config path and if it doesn't exist, attempt to LIST the path, if
157164
// that succeeds, it's a v1, if it doesn't succeed, it *might still* be a v1 but

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /