Compare commits

..

1 Commits

Author SHA1 Message Date
renovate-bot 06a937dc0e Update Node.js to v26
CI / full-gate (push) Failing after 9s
Release-Bump: major
2026-11-08 23:04:32 +01:00
9 changed files with 14 additions and 21 deletions
+4 -4
View File
@@ -7,7 +7,7 @@
"name": "plainpages", "name": "plainpages",
"dependencies": { "dependencies": {
"@larvit/log": "2.3.0", "@larvit/log": "2.3.0",
"ejs": "7.0.2", "ejs": "6.0.1",
"lucide-static": "1.70.0", "lucide-static": "1.70.0",
"postgres": "3.4.9" "postgres": "3.4.9"
}, },
@@ -409,9 +409,9 @@
} }
}, },
"node_modules/ejs": { "node_modules/ejs": {
"version": "7.0.2", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/ejs/-/ejs-7.0.2.tgz", "resolved": "https://registry.npmjs.org/ejs/-/ejs-6.0.1.tgz",
"integrity": "sha512-LcDSEP6Oclb9sTiSyG0MpG0RuKvLDRxCOOt+2sIk+kdk1rMkFU8SRnT0qaNt5zvU0LOV1YXXOvIoZL/sKwabvw==", "integrity": "sha512-UaaM14yby8U3k02ihS1Bmj5Kz2d7CCQM1scxpgs4Mhkq8F1wR2gl3+Ts4h5Ne4Mnt7M9m4Dw7jsuMr3+xO4vZA==",
"license": "Apache-2.0", "license": "Apache-2.0",
"bin": { "bin": {
"ejs": "bin/cli.js" "ejs": "bin/cli.js"
+1 -1
View File
@@ -17,7 +17,7 @@
}, },
"dependencies": { "dependencies": {
"@larvit/log": "2.3.0", "@larvit/log": "2.3.0",
"ejs": "7.0.2", "ejs": "6.0.1",
"lucide-static": "1.70.0", "lucide-static": "1.70.0",
"postgres": "3.4.9" "postgres": "3.4.9"
}, },
+1 -2
View File
@@ -4,9 +4,8 @@
import { test } from "node:test"; import { test } from "node:test";
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { readFileSync } from "node:fs"; import { readFileSync } from "node:fs";
import { createPrivateKey, sign } from "node:crypto"; import { createPrivateKey, sign, type JsonWebKey } from "node:crypto";
import { generateJwks, rotateJwks } from "./gen-jwks.ts"; import { generateJwks, rotateJwks } from "./gen-jwks.ts";
import type { JsonWebKey } from "./jwks.ts";
import { verifyJws } from "./jwt.ts"; import { verifyJws } from "./jwt.ts";
const b64url = (s: string) => Buffer.from(s).toString("base64url"); const b64url = (s: string) => Buffer.from(s).toString("base64url");
+2 -2
View File
@@ -1,9 +1,9 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { generateKeyPairSync } from "node:crypto"; import { generateKeyPairSync, type JsonWebKey } from "node:crypto";
import { dirname, join } from "node:path"; import { dirname, join } from "node:path";
import { test } from "node:test"; import { test } from "node:test";
import { fileURLToPath, pathToFileURL } from "node:url"; import { fileURLToPath, pathToFileURL } from "node:url";
import { cachingJwks, createJwksProvider, loadJwks, staticJwks, type JsonWebKey } from "./jwks.ts"; import { cachingJwks, createJwksProvider, loadJwks, staticJwks } from "./jwks.ts";
const jwk = (kid: string): JsonWebKey => ({ ...(generateKeyPairSync("ec", { namedCurve: "P-256" }).publicKey.export({ format: "jwk" }) as JsonWebKey), alg: "ES256", kid }); const jwk = (kid: string): JsonWebKey => ({ ...(generateKeyPairSync("ec", { namedCurve: "P-256" }).publicKey.export({ format: "jwk" }) as JsonWebKey), alg: "ES256", kid });
const committed = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "ory/kratos/tokenizer/jwks.json"); const committed = join(dirname(fileURLToPath(import.meta.url)), "..", "..", "ory/kratos/tokenizer/jwks.json");
+1 -4
View File
@@ -1,4 +1,4 @@
import type { webcrypto } from "node:crypto"; import type { JsonWebKey } from "node:crypto";
import { readFileSync } from "node:fs"; import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url"; import { fileURLToPath } from "node:url";
import { currentLog } from "../logger.ts"; import { currentLog } from "../logger.ts";
@@ -8,9 +8,6 @@ import { currentLog } from "../logger.ts";
// (or re-reads a mounted file), caches for a TTL, and reloads once on a `kid` miss so a rotated- // (or re-reads a mounted file), caches for a TTL, and reloads once on a `kid` miss so a rotated-
// in key is picked up without a restart (README: zero-downtime rotation). `createJwksProvider` // in key is picked up without a restart (README: zero-downtime rotation). `createJwksProvider`
// picks the right one from the configured URL scheme and primes it at boot (fail loud). // picks the right one from the configured URL scheme and primes it at boot (fail loud).
// node:crypto exports the JWK type only under webcrypto since @types/node 26.
export type JsonWebKey = webcrypto.JsonWebKey;
export interface JwksProvider { export interface JwksProvider {
getKey(kid: string | undefined): Promise<JsonWebKey | null>; getKey(kid: string | undefined): Promise<JsonWebKey | null>;
} }
+2 -2
View File
@@ -1,7 +1,7 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { generateKeyPairSync, sign, type KeyObject } from "node:crypto"; import { generateKeyPairSync, sign, type JsonWebKey, type KeyObject } from "node:crypto";
import { test } from "node:test"; import { test } from "node:test";
import { staticJwks, type JsonWebKey } from "./jwks.ts"; import { staticJwks } from "./jwks.ts";
import { authenticate, claimsToUser, resolveSession, verifyToken } from "./jwt-middleware.ts"; import { authenticate, claimsToUser, resolveSession, verifyToken } from "./jwt-middleware.ts";
import { SESSION_COOKIE } from "./login.ts"; import { SESSION_COOKIE } from "./login.ts";
+1 -2
View File
@@ -1,7 +1,6 @@
import assert from "node:assert/strict"; import assert from "node:assert/strict";
import { generateKeyPairSync, sign } from "node:crypto"; import { generateKeyPairSync, sign } from "node:crypto";
import type { KeyObject } from "node:crypto"; import type { JsonWebKey, KeyObject } from "node:crypto";
import type { JsonWebKey } from "./jwks.ts";
import { test } from "node:test"; import { test } from "node:test";
import { decodeJws, verifyJws } from "./jwt.ts"; import { decodeJws, verifyJws } from "./jwt.ts";
+1 -2
View File
@@ -1,6 +1,5 @@
import { createPublicKey, verify } from "node:crypto"; import { createPublicKey, verify } from "node:crypto";
import type { KeyObject } from "node:crypto"; import type { JsonWebKey, KeyObject } from "node:crypto";
import type { JsonWebKey } from "./jwks.ts";
// JWS signature verification with the Node stdlib — no `jose`/JWT dep: // JWS signature verification with the Node stdlib — no `jose`/JWT dep:
// `createPublicKey({format:"jwk"})` imports a JWK and verifies the RS*/ES* signatures // `createPublicKey({format:"jwk"})` imports a JWK and verifies the RS*/ES* signatures
+1 -2
View File
@@ -1,5 +1,4 @@
import { generateKeyPairSync, sign } from "node:crypto"; import { generateKeyPairSync, sign, type JsonWebKey } from "node:crypto";
import type { JsonWebKey } from "../auth/jwks.ts";
import type { AddressInfo } from "node:net"; import type { AddressInfo } from "node:net";
import type { TestContext } from "node:test"; import type { TestContext } from "node:test";
import type { HydraAdmin } from "../auth/hydra-admin.ts"; import type { HydraAdmin } from "../auth/hydra-admin.ts";