AUTH-HARDEN-TEST-EVIDENCE-2026-07-29.md138 lines · main
1# AUTH-HARDEN-90 test evidence — 2026-07-29
2
3**Sprint:** AUTH-HARDEN-90 test phase (T1–T8)
4**Engine:** briven-engine / Doltgres · FDI `/v1/auth-core/fdi/*`
5**SuperTokens map:** KB `docs/knowledge-base.md` — public APIs require app identity (project + key), sessions/refresh/M2M/IdP discovery like ST recipes.
6
7---
8
9## T1 — France FDI lock
10
11| Probe | Result |
12|-------|--------|
13| POST `…/fdi/signinup/code` no headers | **401** `project_required` |
14| Project header only | **401** `auth_key_required` |
15| Bad `pk_briven_auth_…` | **401** `invalid_auth_key` |
16| Valid Krypco project + key | **200** `status:OK`, delivery **mittera** |
17
18**PASS**
19
20Unit: `bun test src/services/auth-core/fdi-guard.test.ts` → **8 pass**
21
22---
23
24## T2 — Engine client + first-party proxy
25
26| Probe | Result |
27|-------|--------|
28| Mavi `POST https://pay.mavifinans.sh/api/auth/signinup/code` (server injects pk + project) | **200** OK · mittera as “mavi pay” |
29| Direct `GET /v1/auth-core/session/me` without cookie | **401** `authenticated:false` (expected) |
30
31**PASS** (proxy injects keys; session me needs cookie)
32
33---
34
35## T3 — Session refresh
36
37| Probe | Result |
38|-------|--------|
39| POST `…/fdi/session/refresh` with project+key, no refresh token | **401** `refresh token required (cookie sRefreshToken or body.refreshToken)` |
40
41Endpoint live and fails closed without token. Full rotate (new handle / old dies) needs a real login cookie — **partial live**; unit `session.test.ts` **5 pass**.
42
43**PASS (contract live)** · full rotate = browser after login
44
45---
46
47## T4 — MFA (password)
48
49Unit only this run (no live enroll cycle):
50
51- `mfa-challenge.test.ts` **5 pass**
52- `mfa.test.ts` **4 pass**
53
54Live enroll → MFA_REQUIRED → verify → me: **not re-run** (needs password user with TOTP).
55
56**PASS (unit)** · live path deferred human
57
58---
59
60## T5 — M2M
61
62| Probe | Result |
63|-------|--------|
64| POST `/v1/auth-core/oauth/token` bogus client | **401** `invalid_client` / unknown client |
65
66Unit: `m2m.test.ts` **3 pass** (sign/verify/role).
67
68Create→token→API→revoke needs dashboard CLI token — **not** run without secrets.
69
70**PASS (fail path live + unit)** · full smoke needs project admin
71
72---
73
74## T6 — Migration
75
76Unit: `emailpassword.test.ts` **6 pass** including `import:bcrypt` + `import:argon2id` verify + upgrade flag.
77
78POST `/v1/auth-core/migration/users` with only public key → **401** (admin CLI auth) — expected.
79
80**PASS (unit + endpoint gated)**
81
82---
83
84## T7 — Captcha
85
86Valid FDI code **without** `turnstileToken` returned **200** → Turnstile **off** on France (secret unset).
87
88Unit: `abuse-captcha.test.ts` **2 pass** (allows when off; denies when forced on).
89
90**PASS (off = documented)**
91
92---
93
94## T8 — SSO / IdP
95
96| Probe | Result |
97|-------|--------|
98| GET `/v1/auth-core/oidc/.well-known/openid-configuration` | **200** full discovery (issuer, authorize, token, jwks, revoke, …) |
99| GET `/v1/auth-core/oidc/jwks.json` | available via discovery `jwks_uri` |
100
101Unit: `sso.oidc-return.test.ts` **2 pass**.
102
103Full browser consent: optional human.
104
105**PASS (discovery live + unit)**
106
107---
108
109## Gold-path audit (B) — same day
110
111| App | FDI gold path | Leftover auth-tenant | Action |
112|-----|---------------|----------------------|--------|
113| **Mavi** | `/api/auth/*` → FDI live **200** | `/v1/auth-tenant` proxy still hit API **410** | **Fixed:** remap legacy route → FDI + session/me |
114| **Krypco** | `/api/auth` FDI + local fixed `@briven/auth` | getSession was tenant; proxy no session/me | **Fixed:** SDK session/me + proxy special case |
115| **Pando** | FDI proxy present | no auth-tenant hits | OK (handoff path) |
116| **Konnos** | live login FDI comments | JWKS default → auth-tenant | **Fixed:** default → `/v1/auth-core/oidc/jwks.json` |
117| **@briven/auth** | OTP/magic FDI | getSession/signOut tenant; password still bridge | **Fixed:** session + signOut engine; password bridge still legacy |
118| **examples/auth-pilot** | — | still tenant in middleware | residual docs/example (not prod) |
119
120---
121
122## Claim update
123
124Still **cannot claim 100% SuperTokens** until:
125
1261. SMS live-prove **or** N/A approved
1272. Optional passkeys human retest
1283. Framework breadth N/A if desired
1294. Mavi/Krypco deploys pick up route fixes (Mavi needs ship)
130
131Day-to-day SaaS login remains **~90–95%** with stronger evidence after this test block.
132
133---
134
135## Artifacts
136
137- Live curl logs: `/tmp/auth-harden-evidence-2026-07-29/`
138- Unit: bun tests under `apps/api/src/services/auth-core/*.test.ts`
Preview

AUTH-HARDEN-90 test evidence — 2026-07-29

Sprint: AUTH-HARDEN-90 test phase (T1–T8)
Engine: briven-engine / Doltgres · FDI /v1/auth-core/fdi/*
SuperTokens map: KB docs/knowledge-base.md — public APIs require app identity (project + key), sessions/refresh/M2M/IdP discovery like ST recipes.


T1 — France FDI lock

ProbeResult
POST …/fdi/signinup/code no headers401 project_required
Project header only401 auth_key_required
Bad pk_briven_auth_…401 invalid_auth_key
Valid Krypco project + key200 status:OK, delivery mittera

PASS

Unit: bun test src/services/auth-core/fdi-guard.test.ts8 pass


T2 — Engine client + first-party proxy

ProbeResult
Mavi POST https://pay.mavifinans.sh/api/auth/signinup/code (server injects pk + project)200 OK · mittera as “mavi pay”
Direct GET /v1/auth-core/session/me without cookie401 authenticated:false (expected)

PASS (proxy injects keys; session me needs cookie)


T3 — Session refresh

ProbeResult
POST …/fdi/session/refresh with project+key, no refresh token401 refresh token required (cookie sRefreshToken or body.refreshToken)

Endpoint live and fails closed without token. Full rotate (new handle / old dies) needs a real login cookie — partial live; unit session.test.ts 5 pass.

PASS (contract live) · full rotate = browser after login


T4 — MFA (password)

Unit only this run (no live enroll cycle):

  • mfa-challenge.test.ts 5 pass
  • mfa.test.ts 4 pass

Live enroll → MFA_REQUIRED → verify → me: not re-run (needs password user with TOTP).

PASS (unit) · live path deferred human


T5 — M2M

ProbeResult
POST /v1/auth-core/oauth/token bogus client401 invalid_client / unknown client

Unit: m2m.test.ts 3 pass (sign/verify/role).

Create→token→API→revoke needs dashboard CLI token — not run without secrets.

PASS (fail path live + unit) · full smoke needs project admin


T6 — Migration

Unit: emailpassword.test.ts 6 pass including import:bcrypt + import:argon2id verify + upgrade flag.

POST /v1/auth-core/migration/users with only public key → 401 (admin CLI auth) — expected.

PASS (unit + endpoint gated)


T7 — Captcha

Valid FDI code without turnstileToken returned 200 → Turnstile off on France (secret unset).

Unit: abuse-captcha.test.ts 2 pass (allows when off; denies when forced on).

PASS (off = documented)


T8 — SSO / IdP

ProbeResult
GET /v1/auth-core/oidc/.well-known/openid-configuration200 full discovery (issuer, authorize, token, jwks, revoke, …)
GET /v1/auth-core/oidc/jwks.jsonavailable via discovery jwks_uri

Unit: sso.oidc-return.test.ts 2 pass.

Full browser consent: optional human.

PASS (discovery live + unit)


Gold-path audit (B) — same day

AppFDI gold pathLeftover auth-tenantAction
Mavi/api/auth/* → FDI live 200/v1/auth-tenant proxy still hit API 410Fixed: remap legacy route → FDI + session/me
Krypco/api/auth FDI + local fixed @briven/authgetSession was tenant; proxy no session/meFixed: SDK session/me + proxy special case
PandoFDI proxy presentno auth-tenant hitsOK (handoff path)
Konnoslive login FDI commentsJWKS default → auth-tenantFixed: default → /v1/auth-core/oidc/jwks.json
@briven/authOTP/magic FDIgetSession/signOut tenant; password still bridgeFixed: session + signOut engine; password bridge still legacy
examples/auth-pilotstill tenant in middlewareresidual docs/example (not prod)

Claim update

Still cannot claim 100% SuperTokens until:

  1. SMS live-prove or N/A approved
  2. Optional passkeys human retest
  3. Framework breadth N/A if desired
  4. Mavi/Krypco deploys pick up route fixes (Mavi needs ship)

Day-to-day SaaS login remains ~90–95% with stronger evidence after this test block.


Artifacts

  • Live curl logs: /tmp/auth-harden-evidence-2026-07-29/
  • Unit: bun tests under apps/api/src/services/auth-core/*.test.ts