{"record":{"id":"9b2b92c785cbe247","repo":"chroma-core/chroma","slug":"invalid-username-or-password","errorCode":null,"errorMessage":"Invalid username or password","messagePattern":"Invalid username or password","errorType":"exception","errorClass":"AuthError","httpStatus":null,"severity":"error","filePath":"chromadb/auth/basic_authn/__init__.py","lineNumber":120,"sourceCode":"        \"BasicAuthenticationServerProvider.authenticate\", OpenTelemetryGranularity.ALL\n    )\n    @override\n    def authenticate_or_raise(self, headers: Dict[str, str]) -> UserIdentity:\n        try:\n            if AUTHORIZATION_HEADER.lower() not in headers.keys():\n                raise AuthError(AUTHORIZATION_HEADER + \" header not found\")\n            _auth_header = headers[AUTHORIZATION_HEADER.lower()]\n            _auth_header = re.sub(r\"^Basic \", \"\", _auth_header)\n            _auth_header = _auth_header.strip()\n\n            base64_decoded = base64.b64decode(_auth_header).decode(\"utf-8\")\n            if \":\" not in base64_decoded:\n                raise AuthError(\"Invalid Authorization header format\")\n            username, password = base64_decoded.split(\":\", 1)\n            username = str(username)  # convert to string to prevent header injection\n            password = str(password)  # convert to string to prevent header injection\n            if username not in self._creds:\n                raise AuthError(\"Invalid username or password\")\n\n            _pwd_check = bcrypt.checkpw(\n                password.encode(\"utf-8\"),\n                self._creds[username].get_secret_value().encode(\"utf-8\"),\n            )\n            if not _pwd_check:\n                raise AuthError(\"Invalid username or password\")\n            return UserIdentity(user_id=username)\n        except AuthError as e:\n            logger.error(\n                f\"BasicAuthenticationServerProvider.authenticate failed: {repr(e)}\"\n            )\n        except Exception as e:\n            tb = traceback.extract_tb(e.__traceback__)\n            # Get the last call stack\n            last_call_stack = tb[-1]\n            line_number = last_call_stack.lineno\n            filename = last_call_stack.filename","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/auth/basic_authn/__init__.py#L102-L138","documentation":"Error \"Invalid username or password\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/auth/basic_authn/__init__.py:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}