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": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Configuration only applies if this Helm chart setting is set to a true value",
         "title": "Condition"
      },
      "description": {
         "title": "Description",
         "type": "string"
      },
      "copy": {
         "anyOf": [
            {
               "$ref": "#/$defs/ConditionalSecretCopyRules"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "description": "Rules for where the secret should be copied from"
      },
      "generate": {
         "anyOf": [
            {
               "$ref": "#/$defs/ConditionalSimpleSecretGenerateRules"
            },
            {
               "$ref": "#/$defs/ConditionalSourceSecretGenerateRules"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Generate"
      },
      "onepassword": {
         "allOf": [
            {
               "$ref": "#/$defs/SecretOnepasswordConfig"
            }
         ],
         "default": {
            "encoded": false
         }
      },
      "value": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Value"
      }
   },
   "$defs": {
      "ConditionalSecretCopyRules": {
         "additionalProperties": false,
         "description": "Possibly conditional rules for copying a secret value from another.",
         "properties": {
            "if": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "title": "Condition"
            },
            "application": {
               "title": "Application",
               "type": "string"
            },
            "key": {
               "title": "Key",
               "type": "string"
            }
         },
         "required": [
            "application",
            "key"
         ],
         "title": "ConditionalSecretCopyRules",
         "type": "object"
      },
      "ConditionalSimpleSecretGenerateRules": {
         "additionalProperties": false,
         "description": "Conditional rules for generating a secret value with no source.",
         "properties": {
            "if": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "title": "Condition"
            },
            "type": {
               "enum": [
                  "password",
                  "gafaelfawr-token",
                  "fernet-key",
                  "rsa-private-key"
               ],
               "title": "Type",
               "type": "string"
            }
         },
         "required": [
            "type"
         ],
         "title": "ConditionalSimpleSecretGenerateRules",
         "type": "object"
      },
      "ConditionalSourceSecretGenerateRules": {
         "description": "Conditional rules for generating a secret from another secret.",
         "properties": {
            "if": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Configuration only applies if this Helm chart setting is set to a true value",
               "title": "Condition"
            },
            "type": {
               "enum": [
                  "bcrypt-password-hash",
                  "mtime"
               ],
               "title": "Type",
               "type": "string"
            },
            "source": {
               "title": "Source",
               "type": "string"
            }
         },
         "required": [
            "type",
            "source"
         ],
         "title": "ConditionalSourceSecretGenerateRules",
         "type": "object"
      },
      "SecretOnepasswordConfig": {
         "description": "Configuration for how a static secret is stored in 1Password.",
         "properties": {
            "encoded": {
               "default": false,
               "title": "Encoded",
               "type": "boolean"
            }
         },
         "title": "SecretOnepasswordConfig",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "description"
   ]
}

Config:
  • populate_by_name: bool = True

  • extra: str = forbid

Fields:
Validators:
  • _validate_generate » all fields

field condition: str | None = None (alias 'if')#

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

Validated by:
  • _validate_generate

field copy_rules: ConditionalSecretCopyRules | None = None (alias 'copy')#

Rules for where the secret should be copied from

Validated by:
  • _validate_generate

field description: str [Required]#

Description of the secret.

Validated by:
  • _validate_generate

field generate: ConditionalSecretGenerateRules | None = None#

Rules for how the secret should be generated.

Validated by:
  • _validate_generate

field onepassword: SecretOnepasswordConfig = SecretOnepasswordConfig(encoded=False)#

Configuration for how the secret is stored in 1Password.

Validated by:
  • _validate_generate

field value: SecretStr | None = None#

Secret value.

Validated by:
  • _validate_generate