Cerberus Python Client is a library for programmatically interacting with Cerberus, Nike's secret management system. It facilitates secure communication via HTTPS, supporting AWS and Cerberus-specific authentication methods. As of version 2.5.4, it primarily supports read-only operations, with write functionality not yet implemented by the maintainers. While the library is stable, its official GitHub repository was archived in January 2024, indicating that active development has ceased.
pip install cerberus-python-clientVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `CerberusClient` using IAM Role or User authentication and then retrieve secrets and files. For IAM Role authentication, ensure the execution environment has the necessary AWS IAM permissions. For User authentication, set `CERBERUS_USERNAME` and `CERBERUS_PASSWORD` environment variables.
Be aware that the library is no longer actively maintained. For critical projects, consider the implications of using an unmaintained library or explore alternative secret management solutions.
Always use `pip install cerberus-python-client` for the client library and `from cerberus.client import CerberusClient`. For the data validation library, use `pip install Cerberus` and `from cerberus import Validator`.
Always open files for upload using `with open('your_file.txt', 'rb') as f: ...`For Lambda functions, consider using AWS Secrets Manager or Parameter Store for better integration, scale, and performance.
Upgrade to `cerberus-python-client` version 2.5.2 or newer to automatically handle trailing slashes in the Cerberus URL. If using an older version, manually ensure the URL does not end with a trailing slash.
Install the library using pip: `pip install cerberus-python-client`
If you meant to use the Cerberus Python Client, install `cerberus-python-client` and import `CerberusClient` from `cerberus.client`: `from cerberus.client import CerberusClient`. If you intended to use the `cerberus` data validation library, install it with `pip install cerberus` and import `Validator` from `cerberus`: `from cerberus import Validator`.
Ensure your AWS environment variables (e.g., `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`), shared credentials file (`~/.aws/credentials`), or IAM role are correctly configured and accessible to the application. You might also need to specify the `region` when initializing `CerberusClient` or `AWSAuth`.
Verify the `cerberus_url`, `username`, `password`, `region`, or `token` provided to the `CerberusClient` constructor are correct. Check network connectivity to the Cerberus instance and ensure your authentication method (e.g., user/pass, AWS IAM role) is properly configured.