LuxelEspañol

Luxel v0.2 · Security · part 3 of 3

Luxel threat model (3)

ThreatMitigationTest
An agent's JSON that injects markup, events outside the contract, unbounded lists, lower data classClosed grammar and policies before projection; untrusted text only in data of diagnosticssprint7.test.mjs, the surface fuzz target
A malformed surface that crashes the checkerEvery field type-checked (a numeric bind crashed before Sprint 11)fuzz-regressions.test.mjs

5.7 Supply chain

ThreatMitigationEvidence
A compromised runtime dependencyThe runtime has no third-party dependencydocs/security/dependency-audit.md
Known vulnerabilitiesnpm audit: 0 at every severity (Sprint 12)same
Tampered packagesLockfiles with integrity for every entry; the provenance's SBOMsame, ADR-048
Secrets in the historyScanned (gitleaks, trufflehog)docs/security/secret-scan.md

5.8 Identity from a trusted gateway (Sprint 13.5, ADR-065)

Only with identity.mode: "gateway-jwt". The gateway (Envoy Gateway, oauth2-proxy, Cloudflare Access) signs the person in and forwards a JWT of the identity provider; luxel-host verifies it on every request that uses a session.

ThreatMitigationTest
Forged identity headers (X-User-*, X-Actor, X-Forwarded-User…)Never read; without a token they are logged by family, never by valuetests/security/s13-5-gateway-id.test.mjs
alg: none, HS256 signed with the public key, an algorithm not allowedAn allowed list of asymmetric algorithms; none/HS\* refused in the configuration; symmetric keys never loadedjwt.test.ts, SEC-GATEWAY-ID
A token signed by another key, an unknown kid, a key injected through jku/x5u/jwkKeys only from the configured JWKS URL, by kid, of the type the algorithm needsjwt.test.ts, SEC-GATEWAY-ID
A token of another client of the same provider (Keycloak aud: account)azp and/or aud required by the configurationSEC-GATEWAY-ID
An expired or not-yet-valid tokenexp, nbf, iat with a bounded skew; the session closesSEC-GATEWAY-ID, H-GATEWAY-ID
A stolen session cookie, with the thief's own token or with noneThe session is bound to the token's subject: another subject's token or no token ends itSEC-GATEWAY-ID, H-GATEWAY-ID
A provider outage or a tampered key set fetchFail closed: from a failed fetch until one works, every token is denied (503), cached ones included; https in production; redirects not followed; the body bounded as it streams; a bounded refresh on an unknown kidSEC-GATEWAY-ID, jwt.test.ts, identity-hardening.test.ts
A provider outage used to end sessions (a malformed token, an algorithm not allowed, two token fields, no token)During an outage nothing is judged: the same generic 503, no session touchedidentity-outage.test.ts, SEC-GATEWAY-ID
A cached verification reused after a key rotation under the same kid; a key set read in part; a duplicated kid; malformed UTF-8 in a tokenA cache hit needs the very key that verified; a set over 32 keys refused whole; a kid named twice trusted for no key; a fatal UTF-8 decoderjwt.test.ts
An event in flight acting after its session ended or its token expiredThe session is checked again after the body is read, before dispatch, and inside the event's transaction right before the handler (adapters of @luxel-framework/server; a hand-written adapter that skips sessionLive keeps a window: GAPS)SEC-GATEWAY-ID (concurrent), identity.test.ts, server.test.ts
Verification or session opening driven by requests the host refuses anywayRoute (well-formed manifest addresses only), every header-only event refusal, Origin/CSRF header and address bucket before verification; events never open sessions; bounded caches evict in constant timeSEC-GATEWAY-ID
Two subjects sharing a binding (lone surrogates); a required claim met by an inherited property; two token header fieldsMalformed subjects refused; own properties only; raw header fields countedidentity-hardening.test.ts, SEC-GATEWAY-ID
A token, a claim value, a path or a store's error in a log line or a pageNever logged or written; refusals are generic; a gate failure is logged with a fixed reason only (no path, no exception message); luxel build refuses a jwksUrl with credentials, a query or a fragment, and writes only known identity fieldsSEC-GATEWAY-ID, identity-config.test.ts

Not protected: a request that reaches luxel-host directly with a valid token for the client (route all traffic through the gateway); revocation inside a token's lifetime; the gateway's own session and sign-out.

6. What Luxel does NOT protect

  • Data from whoever controls the browser. A user (or malware on their machine) can read and send everything their own page can. Templates, tokens and the absence of app code are not protection.
  • Weak authentication in the app. Password storage, the second factor and the account recovery belong to the app's handlers and backend. Luxel gives the hooks (signIn, accountLimit: 'handler'), not the policy.
  • The app's authorization rules. Luxel enforces the roles and scopes the app declares. A wrong scope function is the app's bug.
  • Enumeration through the app's handler. The framework cannot make an arbitrary handler answer the same way.
  • A compromised host or operator. Provenance proves what starts. It does not protect a running process from whoever controls it.
  • Denial of service by volume. The rate limits and bounds keep each request's cost small. A flood is the network's and the balancer's problem.
  • The TLS terminator, HSTS, the balancer, backups.
  • Old browsers without Fetch Metadata on static forms. They are refused. Use a non-static sign-in.

7. Assumptions

  • TLS terminates in front of luxel-host, and the host is reachable only through it (LUXEL_TRUST_PROXY lists that proxy's addresses; a request from any other peer keeps its socket address).
  • The signing key never reaches a host. View keys are 32+ random bytes from a secret store.
  • The app's handlers, bindings and their own modules are trusted code, deployed with the build. The handlers bundle, the bindings and the app's own server modules are covered by the provenance (RT-8); since Sprint 12 the installed production dependencies are hashed file by file too (S12-6).
  • PostgreSQL and the other shared stores are reachable only by the hosts.
Edit this page on GitHub

This page: 7.9 KB of JavaScript (Luxel's shared runtime), 0 KB from your app.

Measured when the site is built: the runtime files this page loads, compressed as they are sent.

Made by IntiOps. The Luxel 0.1.0 betas are on npm (0.1.0-beta.1, 0.1.0-beta.2), with an alpha of 0.2 (0.2.0-alpha.1): no external security review yet.