Answer prose round 1: 0 🔴, 5 🟡 (0 misread); cut the duplicated specificity line and reflow
CI / full-gate (push) Successful in 3m22s
CI / full-gate (push) Successful in 3m22s
This commit is contained in:
+2
-3
@@ -4,9 +4,8 @@ import type { JsonWebKey } from "./jwks.ts";
|
||||
|
||||
// JWS signature verification with the Node stdlib — no `jose`/JWT dep:
|
||||
// `createPublicKey({format:"jwk"})` imports a JWK and verifies the RS*/ES* signatures
|
||||
// the Kratos tokenizer produces (see AGENTS.md). Signature only: the caller
|
||||
// (`jwt-middleware.ts`) adds claim checks (exp/iss/aud, clock skew) and picks the key by `kid`
|
||||
// from the cached JWKS (`jwks.ts` fetches and rotates it).
|
||||
// the Kratos tokenizer produces. Signature only: `jwt-middleware.ts`
|
||||
// picks the key by `kid` and checks the claims.
|
||||
|
||||
// JOSE `alg` → Node verify parameters. ES* signatures are raw r‖s (IEEE P1363), not DER.
|
||||
// Extend this map to widen support. Security invariant: never add `HS*`/`none` — this map
|
||||
|
||||
+2
-2
@@ -40,8 +40,8 @@ export interface CompletedLogin {
|
||||
// The coarse permissions a user holds — directly (`Permission:<name>#granted@user:<id>`) or transitively via a
|
||||
// group granted the permission. Enumerates the defined permissions (the distinct objects in the Permission
|
||||
// namespace) and asks Keto to check each grant, so a permission granted to a group reaches the JWT —
|
||||
// matching the OPL model. At login/refresh only, never per
|
||||
// request; permission count is small, so the per-permission checks are cheap and run in parallel.
|
||||
// matching the OPL model. At login/refresh only, never per request; permission count is small, so the
|
||||
// per-permission checks are cheap and run in parallel.
|
||||
export async function readPermissions(keto: KetoClient, userId: string): Promise<string[]> {
|
||||
const subject_id = `user:${userId}`;
|
||||
const names = new Set<string>();
|
||||
|
||||
Reference in New Issue
Block a user