nautobot.apps.secrets
¶
Integrations with Nautobot's secrets feature.
nautobot.apps.secrets.SecretsProvider
¶
Bases: ABC
Abstract base class for concrete providers of secret retrieval features.
ParametersForm
abstractmethod
property
¶
Django Form class with inputs for describing the parameter(s) required for a Secret to use this Provider.
The clean() method may be implemented to provide additional input validation.
name
property
¶
Human-friendly name for this class, falling back to the slug if not overridden.
slug
abstractmethod
property
¶
String uniquely identifying this class; will be used as a key to look up the class owning a given Secret.
get_value_for_secret(secret, obj=None, **kwargs)
abstractmethod
classmethod
¶
Retrieve the stored value described by the given Secret record.
May raise a SecretError or one of its subclasses if an error occurs.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
secret |
Secret
|
DB entry describing the secret or family of secrets in question. |
required |
obj |
object
|
Django model instance or similar providing additional context for retrieving the secret. |
None
|