SourceSecretGenerateRules#
- pydantic model phalanx.models.secrets.SourceSecretGenerateRules#
Rules for generating a secret from another secret.
- Parameters:
type (
Literal[SecretGenerateType.bcrypt_password_hash,SecretGenerateType.mtime])source (
str)
Show JSON schema
{ "title": "SourceSecretGenerateRules", "description": "Rules for generating a secret from another secret.", "type": "object", "properties": { "type": { "description": "Type of secret", "enum": [ "bcrypt-password-hash", "mtime" ], "title": "Secret type", "type": "string" }, "source": { "description": "Key of secret on which this secret is based. This may only be set by secrets of type ``bcrypt-password-hash`` or ``mtime``.", "title": "Source key", "type": "string" } }, "additionalProperties": false, "required": [ "type", "source" ] }
- Config:
extra: str = forbid
populate_by_name: bool = True
- Fields:
- field source: str [Required]#
Key of secret on which this secret is based. This may only be set by secrets of type
bcrypt-password-hashormtime.
- field type: Literal[SecretGenerateType.bcrypt_password_hash, SecretGenerateType.mtime] [Required]#
Type of secret
- generate(source)#
Generate a new secret following these rules.
- Parameters:
source (
SecretStr) – Source secret from which to generate the secret.- Returns:
New secret.
- Return type:
SecretStr