vendor_fabric.vault.tools¶
Provider capability functions for HashiCorp Vault operations.
This module provides provider capability functions for Vault operations.
Module Contents¶
Classes¶
Schema for listing Vault secrets. |
|
Schema for reading a Vault secret. |
Functions¶
List secrets recursively from Vault KV v2 engine. |
|
Read a single secret from Vault. |
Data¶
API¶
- class vendor_fabric.vault.tools.ListSecretsSchema(/, **data: Any)¶
Bases:
pydantic.BaseModelSchema for listing Vault secrets.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- root_path: str = 'Field(...)'¶
- mount_point: str = 'Field(...)'¶
- max_depth: int | None = 'Field(...)'¶
- model_config: ClassVar[pydantic.config.ConfigDict] = 'ConfigDict(...)'¶
- classmethod model_fields() dict[str, pydantic.fields.FieldInfo]¶
- classmethod model_computed_fields() dict[str, pydantic.fields.ComputedFieldInfo]¶
- property model_extra: dict[str, Any] | None¶
- property model_fields_set: set[str]¶
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self¶
- model_copy(*, update: collections.abc.Mapping[str, Any] | None = None, deep: bool = False) typing_extensions.Self¶
- model_dump(*, mode: Literal[json, python] | str = 'python', include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) dict[str, Any]¶
- model_dump_json(*, indent: int | None = None, ensure_ascii: bool = False, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) str¶
- classmethod model_json_schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, schema_generator: type[pydantic.json_schema.GenerateJsonSchema] = GenerateJsonSchema, mode: pydantic.json_schema.JsonSchemaMode = 'validation', *, union_format: Literal[any_of, primitive_type_array] = 'any_of') dict[str, Any]¶
- model_post_init(context: Any, /) None¶
- classmethod model_rebuild(*, force: bool = False, raise_errors: bool = True, _parent_namespace_depth: int = 2, _types_namespace: pydantic._internal._namespace_utils.MappingNamespace | None = None) bool | None¶
- classmethod model_validate(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, from_attributes: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self¶
- classmethod model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self¶
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self¶
- dict(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) Dict[str, Any]¶
- json(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Callable[[Any], Any] | None = PydanticUndefined, models_as_dict: bool = PydanticUndefined, **dumps_kwargs: Any) str¶
- classmethod parse_obj(obj: Any) typing_extensions.Self¶
- classmethod parse_raw(b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self¶
- classmethod parse_file(path: str | pathlib.Path, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self¶
- classmethod from_orm(obj: Any) typing_extensions.Self¶
- classmethod construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self¶
- copy(*, include: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, exclude: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, update: Dict[str, Any] | None = None, deep: bool = False) typing_extensions.Self¶
- classmethod schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE) Dict[str, Any]¶
- classmethod schema_json(*, by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, **dumps_kwargs: Any) str¶
- classmethod validate(value: Any) typing_extensions.Self¶
- classmethod update_forward_refs(**localns: Any) None¶
- class vendor_fabric.vault.tools.ReadSecretSchema(/, **data: Any)¶
Bases:
pydantic.BaseModelSchema for reading a Vault secret.
Initialization
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- path: str = 'Field(...)'¶
- mount_point: str = 'Field(...)'¶
- model_config: ClassVar[pydantic.config.ConfigDict] = 'ConfigDict(...)'¶
- classmethod model_fields() dict[str, pydantic.fields.FieldInfo]¶
- classmethod model_computed_fields() dict[str, pydantic.fields.ComputedFieldInfo]¶
- property model_extra: dict[str, Any] | None¶
- property model_fields_set: set[str]¶
- classmethod model_construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self¶
- model_copy(*, update: collections.abc.Mapping[str, Any] | None = None, deep: bool = False) typing_extensions.Self¶
- model_dump(*, mode: Literal[json, python] | str = 'python', include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) dict[str, Any]¶
- model_dump_json(*, indent: int | None = None, ensure_ascii: bool = False, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal[none, warn, error] = True, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, polymorphic_serialization: bool | None = None) str¶
- classmethod model_json_schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, schema_generator: type[pydantic.json_schema.GenerateJsonSchema] = GenerateJsonSchema, mode: pydantic.json_schema.JsonSchemaMode = 'validation', *, union_format: Literal[any_of, primitive_type_array] = 'any_of') dict[str, Any]¶
- model_post_init(context: Any, /) None¶
- classmethod model_rebuild(*, force: bool = False, raise_errors: bool = True, _parent_namespace_depth: int = 2, _types_namespace: pydantic._internal._namespace_utils.MappingNamespace | None = None) bool | None¶
- classmethod model_validate(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, from_attributes: bool | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self¶
- classmethod model_validate_json(json_data: str | bytes | bytearray, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self¶
- classmethod model_validate_strings(obj: Any, *, strict: bool | None = None, extra: pydantic.config.ExtraValues | None = None, context: Any | None = None, by_alias: bool | None = None, by_name: bool | None = None) typing_extensions.Self¶
- dict(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False) Dict[str, Any]¶
- json(*, include: pydantic.main.IncEx | None = None, exclude: pydantic.main.IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, encoder: Callable[[Any], Any] | None = PydanticUndefined, models_as_dict: bool = PydanticUndefined, **dumps_kwargs: Any) str¶
- classmethod parse_obj(obj: Any) typing_extensions.Self¶
- classmethod parse_raw(b: str | bytes, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self¶
- classmethod parse_file(path: str | pathlib.Path, *, content_type: str | None = None, encoding: str = 'utf8', proto: pydantic.deprecated.parse.Protocol | None = None, allow_pickle: bool = False) typing_extensions.Self¶
- classmethod from_orm(obj: Any) typing_extensions.Self¶
- classmethod construct(_fields_set: set[str] | None = None, **values: Any) typing_extensions.Self¶
- copy(*, include: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, exclude: pydantic._internal._utils.AbstractSetIntStr | pydantic._internal._utils.MappingIntStrAny | None = None, update: Dict[str, Any] | None = None, deep: bool = False) typing_extensions.Self¶
- classmethod schema(by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE) Dict[str, Any]¶
- classmethod schema_json(*, by_alias: bool = True, ref_template: str = DEFAULT_REF_TEMPLATE, **dumps_kwargs: Any) str¶
- classmethod validate(value: Any) typing_extensions.Self¶
- classmethod update_forward_refs(**localns: Any) None¶
- vendor_fabric.vault.tools.list_secrets(root_path: str = '/', mount_point: str = 'secret', max_depth: int | None = 10) extended_data.containers.ExtendedList[extended_data.containers.ExtendedDict]¶
List secrets recursively from Vault KV v2 engine.
Args: root_path: Root path to search. mount_point: KV engine mount point. max_depth: Max traversal depth.
Returns: List of secret data dicts with path, mount_point, data, and key_count.
- vendor_fabric.vault.tools.read_secret(path: str, mount_point: str = 'secret') extended_data.containers.ExtendedDict¶
Read a single secret from Vault.
Args: path: Path to the secret. mount_point: KV engine mount point.
Returns: Dict with path, mount_point, data, and found status.
- vendor_fabric.vault.tools.TOOL_DEFINITIONS = None¶