Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Account Recovery JWT Evidence With 3 Controls for JWKS Cache Rotation

Device fingerprints can inform account recovery, but recording every fingerprint to explain every decision expands the telemetry footprint without establishing that the score came from a trusted service. TL;DR: verify the scoring service's JWT locally against an explicitly trusted issuer and audience, retrieve its public keys through a bounded JWKS cache, and keep recovery authorization separate…

Account recovery using JSON Web Tokens (JWT) requires three key controls to ensure security and proper verification with cached JWKS keys. First, verify the JWT's signature against a trusted issuer and audience. This establishes integrity but does not prove the authenticity of the device observations or user control of the account.

Next, retrieve the public keys needed for verification through a bounded JWKS cache. The cache saves time by avoiding repeated retrievals while limiting the keys to those relevant for the service. The cache should have a refresh interval, maximum age, and timeout to ensure key freshness. Never trust the URL supplied in the JWT to fetch keys, as it is not a global namespace.

Finally, keep recovery authorization separate from the risk score. The JWT should contain an assessment of risk, but it should not authorize the replacement of enrolled recovery factors. The decision policy should require both valid assessment evidence and ownership evidence. If either is missing, take the documented challenge or pending path instead of interpreting missing evidence as a favorable score.

To implement this in a Node.js application, configure the expected issuer, audience, and permitted signing algorithms in the JWT verifier. Parse the token header only as untrusted input to select a candidate key from the trusted issuer's set. Use an allowed algorithm to verify the signature, then validate claims and apply the recovery policy. If the issuer or audience is unexpected or required time claims are missing, reject the JWT even if signature verification succeeds.

A JOSE implementation with a verified verification interface should be used to enforce these security controls. Partition key material by issuer or trusted key-set location to avoid confusing failures or unsafe key selection. Following these design rules will help secure account recovery flows using JWTs without relying on unauthorized assumptions.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

Wireshark for Defensive Network Analysis: Read the Traffic Without Guessing

Wireshark for Defensive Network Analysis Wireshark turns network traffic into observable data. It is useful for diagnosing timeouts, incorrect DNS configuration, invalid certificates, and anomalous…

  • Wireshark aids network traffic analysis for defensive purposes
  • Analyze traffic with filters like ip.addr == 192.0.2.10
  • Ensure authorization, scope, and data security before analysis

Security Headers Checker: A Quick First Look at HTTP Security Headers

Security Headers Checker Security Headers Checker is a small Python tool that checks several relevant HTTP security headers.

  • Security Headers Checker is a Python tool for examining HTTP security headers
  • Evaluates 9 key headers: CSP, HSTS, X-Content-Type-Options, X-Frame-Options, etc.
  • Provides JSON output, highlights absent headers and suboptimal configurations

How to scrape SmartRecruiters jobs with Python (free public API, no key)

Disclosure: I built the Apify actor used in the second half of this post. It is a paid tool (pay per job). The first half is free and uses only SmartRecruiters' public API.

  • SmartRecruiters offers free public API for job scraping without requiring API key.
  • Company ID can be obtained from real job link on company's careers page.
  • API allows filtering by job type, location, release date, and returns job details in JSON.

How I Prepare PDF Text for an Audiobook

Part 1 of Building All to Audiobook Our sample PDF has a running "CHAPTER ONE" header above "Chapter II. The shore." I remove the repeated margin text before narration, keeping the chapter title and…

  • Remove repeated margin text, retain chapter titles and opening sentences
  • Separate and handle footnotes, reader decides inclusion method
  • Detect smaller text resembling footnotes, decide on treatment

More from Sunday 22 November →