chroma-core/chroma · error · AuthError

Invalid username or password

Error message

Invalid username or password

What it means

Error "Invalid username or password" thrown in chroma-core/chroma.

Source

Thrown at chromadb/auth/basic_authn/__init__.py:120

        "BasicAuthenticationServerProvider.authenticate", OpenTelemetryGranularity.ALL
    )
    @override
    def authenticate_or_raise(self, headers: Dict[str, str]) -> UserIdentity:
        try:
            if AUTHORIZATION_HEADER.lower() not in headers.keys():
                raise AuthError(AUTHORIZATION_HEADER + " header not found")
            _auth_header = headers[AUTHORIZATION_HEADER.lower()]
            _auth_header = re.sub(r"^Basic ", "", _auth_header)
            _auth_header = _auth_header.strip()

            base64_decoded = base64.b64decode(_auth_header).decode("utf-8")
            if ":" not in base64_decoded:
                raise AuthError("Invalid Authorization header format")
            username, password = base64_decoded.split(":", 1)
            username = str(username)  # convert to string to prevent header injection
            password = str(password)  # convert to string to prevent header injection
            if username not in self._creds:
                raise AuthError("Invalid username or password")

            _pwd_check = bcrypt.checkpw(
                password.encode("utf-8"),
                self._creds[username].get_secret_value().encode("utf-8"),
            )
            if not _pwd_check:
                raise AuthError("Invalid username or password")
            return UserIdentity(user_id=username)
        except AuthError as e:
            logger.error(
                f"BasicAuthenticationServerProvider.authenticate failed: {repr(e)}"
            )
        except Exception as e:
            tb = traceback.extract_tb(e.__traceback__)
            # Get the last call stack
            last_call_stack = tb[-1]
            line_number = last_call_stack.lineno
            filename = last_call_stack.filename

View on GitHub (pinned to aecdd12c8a)

When it happens

Trigger: Thrown at chromadb/auth/basic_authn/__init__.py:120 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chroma-core/chroma@aecdd12c8a (2026-08-16). Data as JSON: /api/errors/9b2b92c785cbe247. Report an issue: GitHub.