Mask padded credentials as sent to providers

This commit is contained in:
2026-11-10 20:29:59 +00:00
parent bbac312b32
commit 8a2a19ccd3
4 changed files with 48 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ type transportFunc func(*http.Request) (*http.Response, error)
func (f transportFunc) RoundTrip(r *http.Request) (*http.Response, error) { return f(r) }
func TestRoleClientUsesNativeTargetAndRedactsCredential(t *testing.T) {
t.Setenv("AUDITA_TEST_KEY", "synthetic-secret-value")
t.Setenv("AUDITA_TEST_KEY", " synthetic-secret-value\t ")
dir := t.TempDir()
if err := os.WriteFile(filepath.Join(dir, "config.yml"), []byte("version: 3\n"), 0644); err != nil {
t.Fatal(err)