Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

fix: mark v2 notification channel secrets as password format (#12873)

Pandey57268e50b490
diff --git a/docs/api/openapi.yml b/docs/api/openapi.yml
index 34d7456628..1d7e1814a6 100644
--- a/docs/api/openapi.yml
+++ b/docs/api/openapi.yml
@@ -197,6 +197,7 @@ components:
title:
type: string
webhookUrl:
+ format: password
type: string
required:
- webhookUrl
@@ -215,6 +216,7 @@ components:
title:
type: string
token:
+ format: password
type: string
url:
type: string
@@ -225,6 +227,7 @@ components:
AlertmanagertypesChannelJSMOpsConfig:
properties:
apiKey:
+ format: password
type: string
description:
type: string
@@ -243,6 +246,7 @@ components:
AlertmanagertypesChannelJiraConfig:
properties:
apiToken:
+ format: password
type: string
customFields:
additionalProperties: {}
@@ -317,6 +321,7 @@ components:
title:
type: string
webhookUrl:
+ format: password
type: string
required:
- webhookUrl
@@ -324,6 +329,7 @@ components:
AlertmanagertypesChannelOpsgenieConfig:
properties:
apiKey:
+ format: password
type: string
apiUrl:
type: string
@@ -364,6 +370,7 @@ components:
group:
type: string
routingKey:
+ format: password
type: string
sendResolved:
nullable: true
@@ -380,6 +387,7 @@ components:
AlertmanagertypesChannelSlackConfig:
properties:
apiUrl:
+ format: password
type: string
channel:
type: string
@@ -396,13 +404,16 @@ components:
AlertmanagertypesChannelWebhookConfig:
properties:
bearerToken:
+ format: password
type: string
password:
+ format: password
type: string
sendResolved:
nullable: true
type: boolean
url:
+ format: password
type: string
username:
type: string
diff --git a/frontend/src/api/generated/services/sigNoz.schemas.ts b/frontend/src/api/generated/services/sigNoz.schemas.ts
index 7be039a131..4595edfa13 100644
--- a/frontend/src/api/generated/services/sigNoz.schemas.ts
+++ b/frontend/src/api/generated/services/sigNoz.schemas.ts
@@ -43,6 +43,7 @@ export enum AlertmanagertypesChannelConfigVariantGithubComSigNozSignozPkgTypesAl
export interface AlertmanagertypesChannelSlackConfigDTO {
/**
* @type string
+ * @format password
*/
apiUrl: string;
/**
@@ -113,10 +114,12 @@ export enum AlertmanagertypesChannelConfigVariantGithubComSigNozSignozPkgTypesAl
export interface AlertmanagertypesChannelWebhookConfigDTO {
/**
* @type string
+ * @format password
*/
bearerToken?: string;
/**
* @type string
+ * @format password
*/
password?: string;
/**
@@ -125,6 +128,7 @@ export interface AlertmanagertypesChannelWebhookConfigDTO {
sendResolved?: boolean | null;
/**
* @type string
+ * @format password
*/
url: string;
/**
@@ -180,6 +184,7 @@ export interface AlertmanagertypesChannelPagerdutyConfigDTO {
group?: string;
/**
* @type string
+ * @format password
*/
routingKey: string;
/**
@@ -219,6 +224,7 @@ export type AlertmanagertypesChannelOpsgenieConfigDTODetails = {
export interface AlertmanagertypesChannelOpsgenieConfigDTO {
/**
* @type string
+ * @format password
*/
apiKey: string;
/**
@@ -278,6 +284,7 @@ export interface AlertmanagertypesChannelMSTeamsConfigDTO {
title?: string;
/**
* @type string
+ * @format password
*/
webhookUrl: string;
}
@@ -309,6 +316,7 @@ export interface AlertmanagertypesChannelGoogleChatConfigDTO {
title?: string;
/**
* @type string
+ * @format password
*/
webhookUrl: string;
}
@@ -332,6 +340,7 @@ export type AlertmanagertypesChannelJiraConfigDTOCustomFields = {
export interface AlertmanagertypesChannelJiraConfigDTO {
/**
* @type string
+ * @format password
*/
apiToken: string;
/**
@@ -407,6 +416,7 @@ export enum AlertmanagertypesChannelConfigVariantGithubComSigNozSignozPkgTypesAl
export interface AlertmanagertypesChannelJSMOpsConfigDTO {
/**
* @type string
+ * @format password
*/
apiKey: string;
/**
@@ -466,6 +476,7 @@ export interface AlertmanagertypesChannelIncidentIOConfigDTO {
title?: string;
/**
* @type string
+ * @format password
*/
token: string;
/**
diff --git a/pkg/types/alertmanagertypes/channelconfig.go b/pkg/types/alertmanagertypes/channelconfig.go
index 07059efd6c..c6d1a0a3c8 100644
--- a/pkg/types/alertmanagertypes/channelconfig.go
+++ b/pkg/types/alertmanagertypes/channelconfig.go
@@ -207,7 +207,7 @@ type ChannelSpec interface {
type ChannelSlackConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
- APIURL string `json:"apiUrl" required:"true"`
+ APIURL string `json:"apiUrl" required:"true" format:"password"`
Channel string `json:"channel"`
Title valuer.UnsetOrNonEmptyString `json:"title"`
Text valuer.UnsetOrNonEmptyString `json:"text"`
@@ -312,10 +312,10 @@ func newChannelEmailConfigFromReceiver(_ string, receiver *Receiver) (ChannelSpe
// was really a bearer token.
type ChannelWebhookConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
- URL string `json:"url" required:"true"`
+ URL string `json:"url" required:"true" format:"password"`
Username string `json:"username"`
- Password string `json:"password"`
- BearerToken string `json:"bearerToken"`
+ Password string `json:"password" format:"password"`
+ BearerToken string `json:"bearerToken" format:"password"`
}
func (c ChannelWebhookConfig) Validate() error {
@@ -403,7 +403,7 @@ func newChannelWebhookConfigFromReceiver(name string, receiver *Receiver) (Chann
type ChannelPagerdutyConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
- RoutingKey string `json:"routingKey" required:"true"`
+ RoutingKey string `json:"routingKey" required:"true" format:"password"`
URL string `json:"url"`
Source valuer.UnsetOrNonEmptyString `json:"source"`
Client valuer.UnsetOrNonEmptyString `json:"client"`
@@ -488,7 +488,7 @@ func newChannelPagerdutyConfigFromReceiver(name string, receiver *Receiver) (Cha
type ChannelOpsgenieConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
- APIKey string `json:"apiKey" required:"true"`
+ APIKey string `json:"apiKey" required:"true" format:"password"`
APIURL string `json:"apiUrl"`
Message valuer.UnsetOrNonEmptyString `json:"message"`
Description valuer.UnsetOrNonEmptyString `json:"description"`
@@ -552,7 +552,7 @@ func newChannelOpsgenieConfigFromReceiver(name string, receiver *Receiver) (Chan
type ChannelMSTeamsConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
- WebhookURL string `json:"webhookUrl" required:"true"`
+ WebhookURL string `json:"webhookUrl" required:"true" format:"password"`
Title valuer.UnsetOrNonEmptyString `json:"title"`
Text valuer.UnsetOrNonEmptyString `json:"text"`
}
@@ -600,7 +600,7 @@ func newChannelMSTeamsConfigFromReceiver(name string, receiver *Receiver) (Chann
type ChannelGoogleChatConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
- WebhookURL string `json:"webhookUrl" required:"true"`
+ WebhookURL string `json:"webhookUrl" required:"true" format:"password"`
Title valuer.UnsetOrNonEmptyString `json:"title"`
Text valuer.UnsetOrNonEmptyString `json:"text"`
}
@@ -664,7 +664,7 @@ type ChannelJiraConfig struct {
CustomFields map[string]any `json:"customFields,omitempty"`
Email string `json:"email" required:"true"`
- APIToken string `json:"apiToken" required:"true"`
+ APIToken string `json:"apiToken" required:"true" format:"password"`
}
func (c ChannelJiraConfig) Validate() error {
@@ -785,7 +785,7 @@ func newChannelJiraConfigFromReceiver(name string, receiver *Receiver) (ChannelS
// keyed by the integration API key, which the notifier pins itself.
type ChannelJSMOpsConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
- APIKey string `json:"apiKey" required:"true"`
+ APIKey string `json:"apiKey" required:"true" format:"password"`
Message valuer.UnsetOrNonEmptyString `json:"message"`
Description valuer.UnsetOrNonEmptyString `json:"description"`
Priority string `json:"priority"`
@@ -836,7 +836,7 @@ func newChannelJSMOpsConfigFromReceiver(name string, receiver *Receiver) (Channe
type ChannelIncidentIOConfig struct {
SendResolved *bool `json:"sendResolved,omitempty"`
URL string `json:"url" required:"true"`
- Token string `json:"token" required:"true"`
+ Token string `json:"token" required:"true" format:"password"`
Title valuer.UnsetOrNonEmptyString `json:"title"`
Description valuer.UnsetOrNonEmptyString `json:"description"`
Metadata map[string]string `json:"metadata,omitempty"`