{"id":4468,"library":"cerberus-python-client","title":"Cerberus Python Client","description":"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.","status":"maintenance","version":"2.5.4","language":"python","source_language":"en","source_url":"https://github.com/Nike-Inc/cerberus-python-client","tags":["aws","secrets-management","nike","security","client"],"install":[{"cmd":"pip install cerberus-python-client","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Used for making HTTP requests to the Cerberus API.","package":"requests","optional":false},{"reason":"Required for AWS IAM Role and STS assumed role authentication.","package":"boto3","optional":false}],"imports":[{"symbol":"CerberusClient","correct":"from cerberus.client import CerberusClient"}],"quickstart":{"code":"import os\nfrom cerberus.client import CerberusClient\n\nCERBERUS_URL = os.environ.get('CERBERUS_URL', 'https://cerberus.example.com')\n# For local development, you might set these via environment variables or pass directly\nCERBERUS_USERNAME = os.environ.get('CERBERUS_USERNAME', '')\nCERBERUS_PASSWORD = os.environ.get('CERBERUS_PASSWORD', '')\n\ntry:\n    # Example 1: IAM Role Authentication (typical for EC2, ECS, Lambda)\n    # Requires appropriate IAM role attached to the execution environment\n    client_iam = CerberusClient(CERBERUS_URL)\n    print(f\"IAM Client initialized: {client_iam.cerberus_url}\")\n\n    # Example 2: User Authentication (for local development or specific use cases)\n    if CERBERUS_USERNAME and CERBERUS_PASSWORD:\n        client_user = CerberusClient(CERBERUS_URL, CERBERUS_USERNAME, CERBERUS_PASSWORD)\n        print(f\"User Client initialized: {client_user.cerberus_url}\")\n\n    # Example: Reading a secret (replace with your actual secret path)\n    secret_path = 'app/my-application/my-secret-key'\n    try:\n        secret_data = client_iam.get_secret(secret_path)\n        print(f\"Retrieved secret from {secret_path}: {secret_data}\")\n    except Exception as e:\n        print(f\"Error retrieving secret {secret_path}: {e}\")\n\n    # Example: Reading a file (replace with your actual file path)\n    file_path = 'app/my-application/path/to/my-file.txt'\n    try:\n        file_content = client_iam.get_file(file_path)\n        print(f\"Retrieved file from {file_path}, content type: {type(file_content)}\")\n        # If it's text, you can decode:\n        # print(f\"File content: {file_content.decode('utf-8')}\")\n    except Exception as e:\n        print(f\"Error retrieving file {file_path}: {e}\")\n\nexcept Exception as e:\n    print(f\"Failed to initialize CerberusClient: {e}\")\n    print(\"Ensure CERBERUS_URL and appropriate authentication (IAM role or credentials) are configured.\")\n","lang":"python","description":"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."},"warnings":[{"fix":"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.","message":"The official GitHub repository for `cerberus-python-client` (Nike-Inc/cerberus-python-client) was archived by its owner on January 12, 2024, and is now read-only. This indicates that active development and maintenance have ceased. While existing versions remain available on PyPI, no new features, bug fixes, or official support are expected.","severity":"breaking","affected_versions":"All versions (future impact)"},{"fix":"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`.","message":"This library (`cerberus-python-client`) is distinct from the general-purpose Python data validation library `Cerberus`. They share a similar name but serve entirely different purposes. Importing or referring to the wrong library can lead to unexpected errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always open files for upload using `with open('your_file.txt', 'rb') as f: ...`","message":"When uploading files to Cerberus, ensure that the file is opened in binary mode (`'rb'`). Failure to do so can result in incorrect size calculations and corrupted uploads.","severity":"gotcha","affected_versions":"All versions"},{"fix":"For Lambda functions, consider using AWS Secrets Manager or Parameter Store for better integration, scale, and performance.","message":"Cerberus is generally not recommended for storing secrets directly accessed by AWS Lambda functions, due to potential issues with scale (thousands of requests per second) and additional latency introduced by authentication and secret retrieval.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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.","message":"Prior to version 2.5.2, users might encounter issues if the `cerberus_url` passed to `CerberusClient` had an inconsistent trailing slash. Version 2.5.2 introduced a fix to remove the trailing slash during initialization, making the client more robust to user input.","severity":"gotcha","affected_versions":"< 2.5.2"}],"env_vars":null,"search_vec":"'2.5.4':37 '2024':67 'activ':70 'archiv':64 'authent':32 'aw':27,74 'ceas':73 'cerberus':1,4,14,30 'cerberus-specif':29 'client':3,6,80 'communic':23 'develop':71 'facilit':21 'function':47 'github':61 'https':25 'implement':50 'indic':68 'interact':12 'januari':66 'librari':9,56 'maintain':53 'manag':18,77 'method':33 'nike':15,78 'offici':60 'oper':44 'primarili':39 'programmat':11 'python':2,5 'read':42 'read-on':41 'repositori':62 'secret':17,76 'secrets-manag':75 'secur':22,79 'specif':31 'stabl':58 'support':26,40 'system':19 'version':36 'via':24 'write':46 'yet':49","created_at":"2026-04-12T13:53:57.184635+00:00","updated_at":"2026-04-16T01:43:56.560051+00:00","problems":[{"fix":"Install the library using pip: `pip install cerberus-python-client`","cause":"The `cerberus-python-client` library has not been installed in your Python environment or the import statement is incorrect.","error":"ModuleNotFoundError: No module named 'cerberus-python-client'"},{"fix":"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`.","cause":"You are trying to import the `cerberus` data validation library, but you intended to use the `cerberus-python-client` library which is a separate package.","error":"ModuleNotFoundError: No module named 'cerberus'"},{"fix":"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`.","cause":"The `cerberus-python-client` cannot find valid AWS credentials in the environment to authenticate with Cerberus, which is necessary for AWS IAM Role authentication.","error":"CerberusClientException: Unable to locate AWS credentials"},{"fix":"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.","cause":"The client could not successfully authenticate with the Cerberus service, which can be due to invalid credentials, incorrect URL, or network issues.","error":"Failed to authenticate"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.5.4","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/Nike-Inc/cerberus-python-client","docs":null,"changelog":null,"pypi":"https://pypi.org/project/cerberus-python-client/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["auth-security","http-networking","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-28","install_tag":null}}