vendor_connectors.secrets.tools
AI framework tools for secrets synchronization operations.
This module provides tools for secrets sync operations that work with multiple AI agent frameworks including LangChain, CrewAI, and AWS Strands.
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”ValidateConfigSchema | Schema for validating a secrets sync configuration. |
|---|---|
RunPipelineSchema | Schema for running the secrets sync pipeline. |
GetConfigInfoSchema | Schema for getting configuration information. |
Functions
Section titled “Functions”validate_config | Validate a secrets sync pipeline configuration file. |
|---|---|
run_pipeline | Run the secrets synchronization pipeline. |
dry_run | Perform a dry run to see what changes would be made. |
get_config_info | Get detailed information about a pipeline configuration. |
get_targets | Get the list of sync targets from a configuration. |
get_sources | Get the list of secret sources from a configuration. |
get_langchain_tools | Get all secrets sync tools as LangChain StructuredTools. |
get_crewai_tools | Get all secrets sync tools as CrewAI tools. |
get_strands_tools | Get all secrets sync tools as plain Python functions for AWS Strands. |
get_tools | Get secrets sync tools for the specified or auto-detected framework. |
TOOL_DEFINITIONS |
|---|
class vendor_connectors.secrets.tools.ValidateConfigSchema
Section titled “class vendor_connectors.secrets.tools.ValidateConfigSchema”Bases: pydantic.BaseModel
Schema for validating a secrets sync configuration.
config_path : str
Section titled “config_path : str”‘Field(…)’
class vendor_connectors.secrets.tools.RunPipelineSchema
Section titled “class vendor_connectors.secrets.tools.RunPipelineSchema”Bases: pydantic.BaseModel
Schema for running the secrets sync pipeline.
config_path : str
Section titled “config_path : str”‘Field(…)’
dry_run : bool
Section titled “dry_run : bool”‘Field(…)’
operation : str
Section titled “operation : str”‘Field(…)’
targets : str | None
Section titled “targets : str | None”‘Field(…)’
continue_on_error : bool
Section titled “continue_on_error : bool”‘Field(…)’
class vendor_connectors.secrets.tools.GetConfigInfoSchema
Section titled “class vendor_connectors.secrets.tools.GetConfigInfoSchema”Bases: pydantic.BaseModel
Schema for getting configuration information.
config_path : str
Section titled “config_path : str”‘Field(…)’
vendor_connectors.secrets.tools.validate_config(config_path: str) → dict[str, Any]
Section titled “vendor_connectors.secrets.tools.validate_config(config_path: str) → dict[str, Any]”Validate a secrets sync pipeline configuration file.
Args: config_path: Path to the YAML configuration file
Returns: Dict with ‘valid’ (bool) and ‘message’ (str) fields
vendor_connectors.secrets.tools.run_pipeline(config_path: str, dry_run: bool = False, operation: str = ‘pipeline’, targets: str | None = None, continue_on_error: bool = False) → dict[str, Any]
Section titled “vendor_connectors.secrets.tools.run_pipeline(config_path: str, dry_run: bool = False, operation: str = ‘pipeline’, targets: str | None = None, continue_on_error: bool = False) → dict[str, Any]”Run the secrets synchronization pipeline.
This executes the two-phase pipeline (merge → sync) to synchronize secrets from HashiCorp Vault to AWS Secrets Manager.
Args: config_path: Path to the YAML configuration file dry_run: If true, compute diff but don’t make changes operation: ‘merge’, ‘sync’, or ‘pipeline’ (full) targets: Comma-separated list of targets (empty for all) continue_on_error: Continue if errors occur
Returns: Dict with sync results including success, counts, and any errors
vendor_connectors.secrets.tools.dry_run(config_path: str) → dict[str, Any]
Section titled “vendor_connectors.secrets.tools.dry_run(config_path: str) → dict[str, Any]”Perform a dry run to see what changes would be made.
Args: config_path: Path to the YAML configuration file
Returns: Dict with what would be changed, including diff output
vendor_connectors.secrets.tools.get_config_info(config_path: str) → dict[str, Any]
Section titled “vendor_connectors.secrets.tools.get_config_info(config_path: str) → dict[str, Any]”Get detailed information about a pipeline configuration.
Args: config_path: Path to the YAML configuration file
Returns: Dict with configuration details including sources and targets
vendor_connectors.secrets.tools.get_targets(config_path: str) → dict[str, Any]
Section titled “vendor_connectors.secrets.tools.get_targets(config_path: str) → dict[str, Any]”Get the list of sync targets from a configuration.
Args: config_path: Path to the YAML configuration file
Returns: Dict with ‘targets’ list and any error message
vendor_connectors.secrets.tools.get_sources(config_path: str) → dict[str, Any]
Section titled “vendor_connectors.secrets.tools.get_sources(config_path: str) → dict[str, Any]”Get the list of secret sources from a configuration.
Args: config_path: Path to the YAML configuration file
Returns: Dict with ‘sources’ list and any error message
vendor_connectors.secrets.tools.TOOL_DEFINITIONS
Section titled “vendor_connectors.secrets.tools.TOOL_DEFINITIONS”None
vendor_connectors.secrets.tools.get_langchain_tools() → list[Any]
Section titled “vendor_connectors.secrets.tools.get_langchain_tools() → list[Any]”Get all secrets sync tools as LangChain StructuredTools.
vendor_connectors.secrets.tools.get_crewai_tools() → list[Any]
Section titled “vendor_connectors.secrets.tools.get_crewai_tools() → list[Any]”Get all secrets sync tools as CrewAI tools.
vendor_connectors.secrets.tools.get_strands_tools() → list[Any]
Section titled “vendor_connectors.secrets.tools.get_strands_tools() → list[Any]”Get all secrets sync tools as plain Python functions for AWS Strands.
vendor_connectors.secrets.tools.get_tools(framework: str = ‘auto’) → list[Any]
Section titled “vendor_connectors.secrets.tools.get_tools(framework: str = ‘auto’) → list[Any]”Get secrets sync tools for the specified or auto-detected framework.
Args: framework: One of ‘auto’, ‘langchain’, ‘crewai’, ‘strands’, ‘functions’
Returns: List of tools in the appropriate format