Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions components/server/src/auth/bearer-authenticator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import { UserDB } from "@gitpod/gitpod-db/lib";
import { GitpodTokenType } from "@gitpod/gitpod-protocol";
import { log } from "@gitpod/gitpod-protocol/lib/util/logging";
import * as crypto from "crypto";
import * as express from "express";
import { IncomingHttpHeaders } from "http";
Expand Down Expand Up @@ -48,6 +49,11 @@ export class BearerAuth {
await this.auth(req);
} catch (e) {
if (isBearerAuthError(e)) {
// (AT) while investigating https://github.com/gitpod-io/gitpod/issues/8703 we
// came to the assumption that a workspace pod might start talking to a server pod
// from the other cluster, which is not db-sync'd yet.
// Logging this should allow us to test this assumption.
log.warn("Bearer auth error.", e, { clientRegion: req.get("x-glb-client-region") });
res.status(401).send(e.message);
return;
}
Expand Down