Files
prowler/ui/lib/provider-credentials/fixtures/union-credential-schema.json
T

72 lines
1.8 KiB
JSON

{
"description": "Acme API credentials.",
"discriminator": {
"mapping": {
"basic": "#/$defs/AcmeBasicCredentials",
"token": "#/$defs/AcmeTokenCredentials"
},
"propertyName": "auth_method"
},
"oneOf": [
{
"additionalProperties": false,
"description": "A long-lived API token issued from the console.",
"properties": {
"auth_method": {
"const": "token",
"default": "token",
"title": "Authentication Method",
"type": "string"
},
"host": {
"description": "Hostname of the API.",
"examples": ["api.acme.test"],
"title": "API Host",
"type": "string"
},
"token": {
"description": "API token.",
"format": "password",
"title": "Token",
"type": "string",
"writeOnly": true
}
},
"required": ["host", "token"],
"title": "API token",
"type": "object"
},
{
"additionalProperties": false,
"description": "A username and password exchanged for a session token.",
"properties": {
"auth_method": {
"const": "basic",
"title": "Authentication Method",
"type": "string"
},
"host": {
"description": "Hostname of the API.",
"examples": ["api.acme.test"],
"title": "API Host",
"type": "string"
},
"username": {
"title": "Username",
"type": "string"
},
"password": {
"format": "password",
"title": "Password",
"type": "string",
"writeOnly": true
}
},
"required": ["auth_method", "host", "username", "password"],
"title": "Username and password",
"type": "object"
}
],
"title": "AcmeStaticCredentials"
}