Alerting: Make Google Chat URL a secure field (#94499)

This commit is contained in:
Santiago
2024-10-10 21:30:16 +02:00
committed by GitHub
parent 0418a7bc0a
commit 75d42d82a3
5 changed files with 6 additions and 5 deletions
@@ -56,7 +56,7 @@ type EmailIntegration struct {
type GooglechatIntegration struct {
DisableResolveMessage *bool `json:"-" yaml:"-" hcl:"disable_resolve_message"`
URL string `json:"url" yaml:"url" hcl:"url"`
URL Secret `json:"url" yaml:"url" hcl:"url"`
Title *string `json:"title,omitempty" yaml:"title,omitempty" hcl:"title"`
Message *string `json:"message,omitempty" yaml:"message,omitempty" hcl:"message"`
@@ -1141,6 +1141,7 @@ func GetAvailableNotifiers() []*NotifierPlugin {
Placeholder: "Google Chat incoming webhook url",
PropertyName: "url",
Required: true,
Secure: true,
},
{
Label: "Title",
@@ -26,7 +26,7 @@ func TestGetSecretKeysForContactPointType(t *testing.T) {
{receiverType: "wecom", expectedSecretFields: []string{"url", "secret"}},
{receiverType: "prometheus-alertmanager", expectedSecretFields: []string{"basicAuthPassword"}},
{receiverType: "discord", expectedSecretFields: []string{"url"}},
{receiverType: "googlechat", expectedSecretFields: []string{}},
{receiverType: "googlechat", expectedSecretFields: []string{"url"}},
{receiverType: "line", expectedSecretFields: []string{"token"}},
{receiverType: "threema", expectedSecretFields: []string{"api_secret"}},
{receiverType: "opsgenie", expectedSecretFields: []string{"apiKey"}},