Security-related Helm/config schemas should fail fast on invalid or unintended authentication settings.
Apply:
additionalProperties: false so typos/mistyped fields are rejected at helm template/validation time (instead of silently producing insecure runtime behavior).credentials.name and credentials.key when auth is on).sourceLables don’t slip through.base_key) implicitly allow unrelated security flags.Example pattern (ServiceMonitor-style strict auth):
{
"authorization": {
"type": "object",
"description": "Bearer-token auth for scrape",
"additionalProperties": false,
"properties": {
"type": {"type": "string"},
"credentials": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {"type": "string"},
"key": {"type": "string"}
},
"required": ["name", "key"]
}
},
"required": ["type", "credentials"]
}
}
Outcome: invalid auth configs (typos, missing required credential fields, or flags applied to the wrong provider) are rejected early, preventing insecure or broken authentication behavior at runtime.