ConditionalSecretConfig#

pydantic model phalanx.models.secrets.ConditionalSecretConfig#

Possibly conditional specification for an application secret.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "ConditionalSecretConfig",
   "description": "Possibly conditional specification for an application secret.",
   "type": "object",
   "properties": {
      "if": {
         "title": "Condition",
         "description": "Configuration only applies if this Helm chart setting is set to a true value",
         "type": "string"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "copy": {
         "title": "Copy",
         "description": "Rules for where the secret should be copied from",
         "allOf": [
            {
               "$ref": "#/definitions/ConditionalSecretCopyRules"
            }
         ]
      },
      "generate": {
         "title": "Generate",
         "anyOf": [
            {
               "$ref": "#/definitions/ConditionalSimpleSecretGenerateRules"
            },
            {
               "$ref": "#/definitions/ConditionalSourceSecretGenerateRules"
            }
         ]
      },
      "value": {
         "title": "Value",
         "type": "string",
         "writeOnly": true,
         "format": "password"
      }
   },
   "required": [
      "description"
   ],
   "additionalProperties": false,
   "definitions": {
      "ConditionalSecretCopyRules": {
         "title": "ConditionalSecretCopyRules",
         "description": "Possibly conditional rules for copying a secret value from another.",
         "type": "object",
         "properties": {
            "if": {
               "title": "Condition",
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "type": "string"
            },
            "application": {
               "title": "Application",
               "type": "string"
            },
            "key": {
               "title": "Key",
               "type": "string"
            }
         },
         "required": [
            "application",
            "key"
         ],
         "additionalProperties": false
      },
      "ConditionalSimpleSecretGenerateRules": {
         "title": "ConditionalSimpleSecretGenerateRules",
         "description": "Conditional rules for generating a secret value with no source.",
         "type": "object",
         "properties": {
            "if": {
               "title": "Condition",
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "enum": [
                  "password",
                  "gafaelfawr-token",
                  "fernet-key",
                  "rsa-private-key"
               ],
               "type": "string"
            }
         },
         "required": [
            "type"
         ],
         "additionalProperties": false
      },
      "ConditionalSourceSecretGenerateRules": {
         "title": "ConditionalSourceSecretGenerateRules",
         "description": "Conditional rules for generating a secret from another secret.",
         "type": "object",
         "properties": {
            "if": {
               "title": "Condition",
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "type": "string"
            },
            "type": {
               "title": "Type",
               "enum": [
                  "bcrypt-password-hash",
                  "mtime"
               ],
               "type": "string"
            },
            "source": {
               "title": "Source",
               "type": "string"
            }
         },
         "required": [
            "type",
            "source"
         ]
      }
   }
}

Config:
  • allow_population_by_field_name: bool = True

  • extra: Extra = Extra.forbid

Fields:
Validators:
field condition: Optional[str] = None (alias 'if')#

Configuration only applies if this Helm chart setting is set to a true value

field copy_rules: Optional[ConditionalSecretCopyRules] = None (alias 'copy')#

Rules for where the secret should be copied from

field description: str [Required]#

Description of the secret.

field generate: UnionType[ConditionalSimpleSecretGenerateRules, ConditionalSourceSecretGenerateRules, None] = None#

Rules for how the secret should be generated.

Validated by:
  • _validate_generate

field value: Optional[SecretStr] = None#

Secret value.

Constraints:
  • type = string

  • writeOnly = True

  • format = password

Validated by:
  • _validate_value