
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
A unified interface for managing secrets across multiple cloud providers. This package includes concrete implementations for Azure Key Vault and Google Cloud Secret Manager, providing a consistent and simplified API for secret creation, retrieval, and management. It is designed to facilitate secure and efficient secret handling in cloud-based applications, promoting best practices in secret management.
Cloud Secret Manager is a Python package providing a unified interface for managing secrets across multiple cloud providers. With concrete implementations for Azure Key Vault and Google Cloud Secret Manager, this package offers a consistent and simplified API for the creation, retrieval, and management of secrets, tailored for secure and efficient handling in cloud-based applications.
The project is organized as follows:
.
āāā README.md
āāā cloudsecretmanager
ā āāā __init__.py
ā āāā azure.py # Azure Key Vault implementation
ā āāā gcp.py # Google Cloud Secret Manager implementation
ā āāā secret_manager.py # Abstract base class for secret managers
āāā poetry.lock
āāā pyproject.toml
āāā tests
āāā __init__.py
āāā test_az_mock.py # Mock tests for Azure implementation
āāā test_az_real_connection.py # Real connection tests for Azure implementation
This package can be installed using pip:
pip install cloudsecretmanager
To use the Cloud Secret Manager, first import the appropriate class for your cloud provider:
from cloudsecretmanager.azure import AzureKeyVaultManager
from cloudsecretmanager.gcp import GCPSecretManager
The Cloud Secret Manager package is designed with a unified API, meaning it offers a consistent set of methods and interfaces for managing secrets, regardless of the underlying cloud provider. This unified approach simplifies secret management in multi-cloud environments and makes the code more maintainable and scalable.
The same set of methods (create
, get
) can be used for different cloud providers. This consistency greatly simplifies the learning curve when switching between or working with multiple cloud environments.
With a unified API, you can easily switch between cloud providers without significantly altering your codebase. This flexibility is crucial for scenarios where applications might migrate or span multiple cloud services.
# Create an instance of AzureKeyVaultManager
azure_manager = AzureKeyVaultManager(vault_url="https://your-vault-url.vault.azure.net/")
# Create or update a secret
azure_manager.create(secret_id="your-secret-id", payload="your-secret-value")
# Retrieve a secret
secret_value = azure_manager.get(secret_id="your-secret-id")
# Create an instance of GCPSecretManager
gcp_manager = GCPSecretManager(project_id="your-gcp-project-id")
# Create or update a secret
gcp_manager.create(secret_id="your-secret-id", payload="your-secret-value")
# Retrieve a secret
secret_value = gcp_manager.get(secret_id="your-secret-id")
The package includes unit tests for both Azure and GCP implementations. These tests are designed to ensure the integrity and correctness of the package functionalities.
To run the tests, you'll need to have Python and the necessary dependencies installed. You can run the tests directly using the Python unittest
module from the root directory of the project.
Follow these steps to execute the tests:
Navigate to the root directory of the project.
Run the tests using the following command:
python -m unittest discover -s tests
Contributions to the Cloud Secret Manager are welcome! Please refer to the contributing guidelines for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
A unified interface for managing secrets across multiple cloud providers. This package includes concrete implementations for Azure Key Vault and Google Cloud Secret Manager, providing a consistent and simplified API for secret creation, retrieval, and management. It is designed to facilitate secure and efficient secret handling in cloud-based applications, promoting best practices in secret management.
We found that cloudsecretmanager demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.Ā It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600Ć faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.