INNER CODE UNIT · Python

_warn_default_encryption_key

arc53/DocsGPT · docsgpt/app.py:208

def _warn_default_encryption_key() -> None:
    """Say when stored credentials are sealed with the public default key."""
    from docsgpt.security.encryption import is_default_encryption_key

    if not is_default_encryption_key():
        return
    rotate = (
        "Set your own value, put `default-docsgpt-encryption-key` in ENCRYPTION_SECRET_KEY_PREVIOUS, restart, "
        "then run `docsgpt connectors reencrypt`."
    )
    if settings.AUTH_TYPE:
        logging.getLogger(__name__).warning(
            "ENCRYPTION_SECRET_KEY is the public default: new connections are refused, and tool, MCP and "
            "custom-model secrets are sealed with the public key. " + rotate
        )
    else:
        logging.getLogger(__name__).warning(
            "ENCRYPTION_SECRET_KEY is the public default. Stored credentials are only as safe as that key; "

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…