SimpleSecretGenerateRules#

pydantic model phalanx.models.secrets.SimpleSecretGenerateRules#

Rules for generating a secret value with no source information.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "SimpleSecretGenerateRules",
   "description": "Rules for generating a secret value with no source information.",
   "type": "object",
   "properties": {
      "type": {
         "enum": [
            "password",
            "gafaelfawr-token",
            "fernet-key",
            "rsa-private-key"
         ],
         "title": "Type",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "type"
   ]
}

Config:
  • populate_by_name: bool = True

  • extra: str = forbid

Fields:
  • type (Literal[

field type: Literal[SecretGenerateType.password, SecretGenerateType.gafaelfawr_token, SecretGenerateType.fernet_key, SecretGenerateType.rsa_private_key] [Required]#

Type of secret.

generate()#

Generate a new secret following these rules.

Return type:

SecretStr