Creates an HS256 KeyStore that resolves the verification key by kid.
Does not enforce the #282 entropy floor. This is the low-level
primitive; the floor belongs at the config boundary, which is
registerBuiltinKeyStores' "local" builder (and AppConfigSchema for
session.secret). A composition root that calls this directly with an
operator-supplied secret owns the check — assertSecretEntropy from
./secretEntropy.mjs is exported from the package root for exactly that.
Rotation (IH-9): when previousSecrets is non-empty, the keystore can
verify tokens signed by an older key whose kid is recorded in that
array. Issuance always uses the current secret/kid. Lookup is by
the JWT kid header — the keystore returns the matching key directly,
never trial-verifies across multiple keys, mirroring the asymmetric
previousKeys rotation path.
Creates an HS256 KeyStore that resolves the verification key by
kid.Does not enforce the #282 entropy floor. This is the low-level primitive; the floor belongs at the config boundary, which is
registerBuiltinKeyStores'"local"builder (andAppConfigSchemaforsession.secret). A composition root that calls this directly with an operator-supplied secret owns the check —assertSecretEntropyfrom./secretEntropy.mjsis exported from the package root for exactly that.Rotation (IH-9): when
previousSecretsis non-empty, the keystore can verify tokens signed by an older key whosekidis recorded in that array. Issuance always uses the currentsecret/kid. Lookup is by the JWTkidheader — the keystore returns the matching key directly, never trial-verifies across multiple keys, mirroring the asymmetricpreviousKeysrotation path.