Skip to content

Commit 13b1d7f

Browse files
update validation rules for lenses secret masking
1 parent feb8fe0 commit 13b1d7f

File tree

1 file changed

+83
-18
lines changed

1 file changed

+83
-18
lines changed

agent/provisioning.schema-6.1.json

Lines changed: 83 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,11 @@
104104
"value": {
105105
"type": "string",
106106
"description": "Enter the JAAS config string. For SCRAM-SHA-256 or SCRAM-SHA-512: org.apache.kafka.common.security.scram.ScramLoginModule required username=\"<user>\" password=\"<pass>\"; \n\nFor AWS_MSK_IAM: software.amazon.msk.auth.iam.IAMLoginModule required; and additionalProperties sasl.client.callback.handler.class: software.amazon.msk.auth.iam.IAMClientCallbackHandler",
107-
"minLength": 1
107+
"x-secret": true,
108+
"anyOf": [
109+
{ "minLength": 1 },
110+
{ "const": "[secret hidden by Lenses]" }
111+
]
108112
}
109113
},
110114
"required": ["value"],
@@ -128,7 +132,12 @@
128132
"properties": {
129133
"value": {
130134
"type": "string",
131-
"description": "Enter a password for the keystore."
135+
"description": "Enter a password for the keystore.",
136+
"x-secret": true,
137+
"anyOf": [
138+
{ "type": "string" },
139+
{ "const": "[secret hidden by Lenses]" }
140+
]
132141
}
133142
},
134143
"required": ["value"]
@@ -139,7 +148,12 @@
139148
"properties": {
140149
"value": {
141150
"type": "string",
142-
"description": "Enter key password (can be empty)."
151+
"description": "Enter key password (can be empty).",
152+
"x-secret": true,
153+
"anyOf": [
154+
{ "type": "string" },
155+
{ "const": "[secret hidden by Lenses]" }
156+
]
143157
}
144158
},
145159
"required": ["value"]
@@ -162,7 +176,12 @@
162176
"properties": {
163177
"value": {
164178
"type": "string",
165-
"description": "Enter a password for the truststore."
179+
"description": "Enter a password for the truststore.",
180+
"x-secret": true,
181+
"anyOf": [
182+
{ "type": "string" },
183+
{ "const": "[secret hidden by Lenses]" }
184+
]
166185
}
167186
},
168187
"required": ["value"]
@@ -229,7 +248,16 @@
229248
"metricsPassword": {
230249
"type": "object",
231250
"description": "Password for metrics authentication.",
232-
"properties": { "value": { "type": "string" } },
251+
"properties": {
252+
"value": {
253+
"type": "string",
254+
"x-secret": true,
255+
"anyOf": [
256+
{ "type": "string" },
257+
{ "const": "[secret hidden by Lenses]" }
258+
]
259+
}
260+
},
233261
"required": ["value"]
234262
},
235263
"metricsHttpSuffix": {
@@ -291,7 +319,11 @@
291319
"value": {
292320
"type": "string",
293321
"description": "Enter the password (non empty).",
294-
"pattern": "^.+$"
322+
"x-secret": true,
323+
"anyOf": [
324+
{ "pattern": "^.+$" },
325+
{ "const": "[secret hidden by Lenses]" }
326+
]
295327
}
296328
},
297329
"required": ["value"]
@@ -314,7 +346,11 @@
314346
"value": {
315347
"description": "Enter the basic auth user information (non empty).",
316348
"type": "string",
317-
"pattern": "^.+$"
349+
"x-secret": true,
350+
"anyOf": [
351+
{ "pattern": "^.+$" },
352+
{ "const": "[secret hidden by Lenses]" }
353+
]
318354
}
319355
}
320356
},
@@ -384,7 +420,11 @@
384420
"value": {
385421
"type": "string",
386422
"description": "Enter the session token value (non empty).",
387-
"pattern": "^[a-zA-Z0-9-]+$"
423+
"x-secret": true,
424+
"anyOf": [
425+
{ "pattern": "^[a-zA-Z0-9-]+$" },
426+
{ "const": "[secret hidden by Lenses]" }
427+
]
388428
}
389429
},
390430
"required": ["value"]
@@ -550,7 +590,11 @@
550590
"value": {
551591
"type": "string",
552592
"description": "Enter the token value (non empty).",
553-
"pattern": "^[A-Za-z0-9_-]+$"
593+
"x-secret": true,
594+
"anyOf": [
595+
{ "pattern": "^[A-Za-z0-9_-]+$" },
596+
{ "const": "[secret hidden by Lenses]" }
597+
]
554598
}
555599
},
556600
"required": ["value"]
@@ -574,7 +618,11 @@
574618
"value": {
575619
"type": "string",
576620
"description": "Enter the Slack webhook URL (non empty).",
577-
"pattern": "^(https?:\\/\\/.+)$"
621+
"x-secret": true,
622+
"anyOf": [
623+
{ "pattern": "^(https?:\\/\\/.+)$" },
624+
{ "const": "[secret hidden by Lenses]" }
625+
]
578626
}
579627
},
580628
"required": ["value"]
@@ -586,8 +634,11 @@
586634
"value": {
587635
"type": "string",
588636
"description": "Enter the integration key value (non empty).",
589-
"pattern": "^.+$",
590-
"x-secret": true
637+
"x-secret": true,
638+
"anyOf": [
639+
{ "pattern": "^.+$" },
640+
{ "const": "[secret hidden by Lenses]" }
641+
]
591642
}
592643
},
593644
"required": ["value"]
@@ -611,8 +662,11 @@
611662
"value": {
612663
"type": "string",
613664
"description": "Enter the API key value (non empty).",
614-
"pattern": "^.+$",
615-
"x-secret": true
665+
"x-secret": true,
666+
"anyOf": [
667+
{ "pattern": "^.+$" },
668+
{ "const": "[secret hidden by Lenses]" }
669+
]
616670
}
617671
},
618672
"required": ["value"]
@@ -624,8 +678,11 @@
624678
"value": {
625679
"type": "string",
626680
"description": "Enter the application key value (non empty).",
627-
"pattern": "^.+$",
628-
"x-secret": true
681+
"x-secret": true,
682+
"anyOf": [
683+
{ "pattern": "^.+$" },
684+
{ "const": "[secret hidden by Lenses]" }
685+
]
629686
}
630687
},
631688
"required": ["value"]
@@ -636,10 +693,14 @@
636693
"properties": {
637694
"value": {
638695
"type": "array",
696+
"x-secret": true,
639697
"items": {
640698
"type": "string",
641699
"description": "Enter the credential string (non empty).",
642-
"pattern": "^.+$"
700+
"anyOf": [
701+
{ "pattern": "^.+$" },
702+
{ "const": "[secret hidden by Lenses]" }
703+
]
643704
},
644705
"description": "Array of credential strings."
645706
}
@@ -712,7 +773,11 @@
712773
"value": {
713774
"type": "string",
714775
"description": "Enter the Agent key value (non empty).",
715-
"pattern": "^.+$"
776+
"x-secret": true,
777+
"anyOf": [
778+
{ "pattern": "^.+$" },
779+
{ "const": "[secret hidden by Lenses]" }
780+
]
716781
}
717782
},
718783
"required": ["value"]

0 commit comments

Comments
 (0)