Licensing: Redact license when overriden by env variable (#81726)

pull/81738/head
lean.dev 2 years ago committed by GitHub
parent 2d83feaa5b
commit 7ab833d28c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      pkg/setting/setting.go
  2. 6
      pkg/setting/setting_test.go

@ -587,6 +587,7 @@ func RedactedValue(key, value string) string {
"ENCRYPTION_KEY",
"VAULT_TOKEN",
"CLIENT_SECRET",
"ENTERPRISE_LICENSE",
} {
if match, err := regexp.MatchString(pattern, uppercased); match && err == nil {
return RedactedPassword

@ -830,6 +830,12 @@ func TestRedactedValue(t *testing.T) {
value: "/path/to/key",
expected: RedactedPassword,
},
{
desc: "license key with non-empty value",
key: "GF_ENTERPRISE_LICENSE_TEXT",
value: "some_license_key_test",
expected: RedactedPassword,
},
{
desc: "sensitive key with empty value",
key: "private_key_path",

Loading…
Cancel
Save