{"record":{"id":"f7973c6052a7cafe","repo":"BerriAI/litellm","slug":"rubrik-webhook-url-not-configured-set-rubrik-webh","errorCode":null,"errorMessage":"Rubrik webhook URL not configured. Set RUBRIK_WEBHOOK_URL or pass api_base.","messagePattern":"Rubrik webhook URL not configured\\. Set RUBRIK_WEBHOOK_URL or pass api_base\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/integrations/rubrik.py","lineNumber":149,"sourceCode":"        self._parse_sampling_rate()\n\n        self.key = api_key or os.getenv(\"RUBRIK_API_KEY\")\n        if not self.key:\n            verbose_logger.warning(\"Rubrik: No API key configured. Requests will be unauthenticated.\")\n\n        self._parse_batch_size()\n\n        # Cap the in-memory retry queue so a Rubrik webhook outage cannot let\n        # authenticated traffic accumulate prompt/response payloads until the\n        # proxy runs out of memory. Once the cap is reached, oldest events are\n        # dropped to make room for fresh ones (drop-oldest backpressure).\n        self.max_queue_size = _MAX_QUEUE_SIZE\n        self._dropped_since_warning = 0\n        self._last_drop_warning_time = 0.0\n\n        _webhook_url = api_base or os.getenv(\"RUBRIK_WEBHOOK_URL\")\n        if not _webhook_url:\n            raise ValueError(\"Rubrik webhook URL not configured. Set RUBRIK_WEBHOOK_URL or pass api_base.\")\n\n        _webhook_url = _webhook_url.rstrip(\"/\").removesuffix(\"/v1\")\n        self._setup_clients(_webhook_url)\n\n        self._headers: Mapping[str, str] = MappingProxyType(\n            {\"Content-Type\": \"application/json\", \"Authorization\": f\"Bearer {self.key}\"}\n            if self.key\n            else {\"Content-Type\": \"application/json\"}\n        )\n\n        self._periodic_flush_task: asyncio.Task[None] | None = self._start_periodic_flush_task()\n\n    @classmethod\n    def get_supported_event_hooks(cls) -> list[GuardrailEventHooks]:\n        \"\"\"Return the guardrail event hooks this integration supports.\n\n        Prompt moderation (``pre_call``) evaluates the user's message before\n        the LLM is called. Response moderation (``post_call``) evaluates the","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/integrations/rubrik.py#L131-L167","documentation":"RubrikSecurityLogger.__init__ resolves its webhook target as api_base argument or the RUBRIK_WEBHOOK_URL env var; if both are empty it raises ValueError, because every moderation post would have nowhere to go. This is a hard constructor failure — the callback cannot start.","triggerScenarios":"Adding litellm.callbacks = [\"rubrik\"] (or instantiating RubrikSecurityLogger) without RUBRIK_WEBHOOK_URL exported; passing api_base=None/'' while the env var is also unset; env var defined only in a shell that is not the proxy process's environment.","commonSituations":"Deploying the proxy with Rubrik DLP integration before copying the env template; Docker/K8s deployments where the secret was not mounted; local runs where .env loading happens after callback construction.","solutions":["Set RUBRIK_WEBHOOK_URL (e.g. https://rubrik.example.com/api/v1) in the proxy environment and restart","Or pass the URL programmatically: RubrikSecurityLogger(api_base=\"https://rubrik.example.com\") and add it via litellm.callbacks = [logger_instance]","In containers, verify with printenv RUBRIK_WEBHOOK_URL inside the same process context"],"exampleFix":"# before\nlitellm.callbacks = [\"rubrik\"]  # ValueError: Rubrik webhook URL not configured\n\n# after\nimport os\nos.environ[\"RUBRIK_WEBHOOK_URL\"] = \"https://rubrik.example.com\"\nlitellm.callbacks = [\"rubrik\"]\n\n# or explicitly\nfrom litellm.integrations.rubrik import RubrikSecurityLogger\nlitellm.callbacks = [RubrikSecurityLogger(api_base=\"https://rubrik.example.com\")]","handlingStrategy":"validation","validationCode":"import os\n\nRUBRIK_URL = os.getenv(\"RUBRIK_WEBHOOK_URL\") or explicit_api_base\nif not RUBRIK_URL:\n    raise RuntimeError(\"Configure RUBRIK_WEBHOOK_URL before enabling the rubrik callback\")\nlitellm.callbacks = [\"rubrik\"]","typeGuard":null,"tryCatchPattern":"try:\n    from litellm.integrations.rubrik import RubrikSecurityLogger\n    rubrik = RubrikSecurityLogger()\nexcept ValueError as e:\n    if \"webhook URL not configured\" in str(e):\n        rubrik = None\n        logger.warning(\"Rubrik DLP disabled: RUBRIK_WEBHOOK_URL not set\")\n    else:\n        raise","preventionTips":["Put RUBRIK_WEBHOOK_URL in the same secret store as provider keys and mount it before proxy start","Add a startup assertion listing every required env var for enabled callbacks (rubrik, s3, sqs, supabase...)","Decide explicitly whether a missing DLP config should hard-fail startup or degrade — do not discover it on the first request"],"tags":["rubrik","security","webhook","configuration","environment"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}