/** * @module keystone/admin/admin-constants * * Constants for the One-Off Challenge Keystone Admin Review subsystem. */ import { HashAlgorithm } from "@ibgib/helper-gib/dist/helpers/utils-helper.mjs"; /** * Default number of KDF rounds for deriving admin challenge secrets. * 1,000 rounds provides high security with fast server execution (<10ms). */ export const DEFAULT_ADMIN_CHALLENGE_KDF_ROUNDS = 1_000; /** * Default hash algorithm for admin challenge secret KDF. */ export const DEFAULT_ADMIN_CHALLENGE_HASH_ALGORITHM = HashAlgorithm.sha_256; /** * Standard scope for developer handle username exception requests. */ export const ADMIN_CHALLENGE_SCOPE_EXCEPTION_KEYS = "exception-keys"; /** * Default exposure countdown lease window in milliseconds. * * Limits offline brute-force cracking exposure once fetched. * * @default 300_000 (5 minutes) */ export const DEFAULT_EXPOSURE_LEASE_TIMEOUT_MS = 5 * 60 * 1000; /** * Default overall TTL for challenge keystones in milliseconds (7 days). */ export const DEFAULT_ADMIN_CHALLENGE_TTL_MS = 7 * 24 * 60 * 60 * 1000;