Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(auth): T3 Connect tolerates a host clock a few seconds behind #19640

Mergedevolveperformance(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/19640/headmerged by juliusmarminge View on GitHub

Showing 5 changed files with 57 additions and 35 deletions (loading 2).

x
0 of 5 viewed, 5 left
1 addition and 1 deletionapps/server/src/auth/replayMarkers.tsModified
View file
@@ -15,7 +15,7 @@
const REPLAY_MARKER_PREFIXES = [DPOP_REPLAY_MARKER_PREFIX, ...CLOUD_REPLAY_MARKER_PREFIXES];
​
/**
- * A marker only matters while its proof can pass the time check (about 5 minutes
+ * A marker only matters while its proof can pass the time check (about 10 minutes
* for DPoP, 7 for cloud proofs). After that, the time check rejects a replay by
* itself.
*/
8 additions and 2 deletionsinfra/relay/src/auth/DpopProofs.tsModified
View file
@@ -5,7 +5,11 @@
import * as Schema from "effect/Schema";
import { lt } from "drizzle-orm";
​
-import { DpopVerificationFailureCode, verifyDpopProof } from "@t3tools/shared/dpop";
+import {
+ DPOP_MAX_CLOCK_SKEW_SECONDS,
+ DpopVerificationFailureCode,
+ verifyDpopProof,
+} from "@t3tools/shared/dpop";
import * as RelayDb from "../db.ts";
import { relayDpopProofs } from "../persistence/schema.ts";
​
@@ -129,7 +133,9 @@
thumbprint: result.thumbprint,
jti: result.jti,