Commit 29308ba
* fix(plugin-auth): run the D5.1 /oauth2/authorize env-access gate for a signed bearer (#8102)
ADR-0069 D5.1's cloud-as-IdP gate resolved its subject with an inline copy of
resolveActor -- line for line the same logic, in a second place. #8101 fixed one
bug in the shared resolver and left the copy untouched, so the two diverged.
The shared resolver learned that a bearer credential must have its signature
stripped before lookup: bearer() hands clients the signed form in set-auth-token
(the documented API-lane credential) and accepts it back, while session.token
stores the unsigned value. The copy guarding /oauth2/authorize kept looking the
signed credential up verbatim and resolved nothing.
The unresolved case here is deliberately fail-open, so that miss did not deny
the request -- it skipped the check entirely. An authenticated caller on the
documented API lane was read as unauthenticated, and against a skip_consent
client was issued an authorization code the gate would have refused.
Delete the copy and call resolveActor. Two resolution sites are what let them
diverge, so a second corrected copy would not have fixed the class. The
fail-open default for genuinely unauthenticated callers is preserved unchanged.
resolveActor also returns activeOrgId; this gate deliberately does not consume
it -- the D5.1 host contract is (userId, clientId) and the control plane derives
org membership from the user itself.
Pinned by a dogfood gate that arms a DENYING gate and drives /oauth2/authorize
over the cookie lane and both accepted bearer spellings, asserting the gate was
actually invoked with the caller as its subject and the request refused rather
than issued a code. The cookie and raw-token lanes are controls that pass on the
broken build too; the signed-bearer lane is the pin.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEVB6w7D7uCszR9Mw1BL73
* test(qa): assert the fixture's own discriminator claim in the #8102 pin
The Lane.pinsTheDefect field was declared on every lane and read by nothing --
the same declared-but-unenforced shape this file exists to pin. Assert it: the
suite now fails if a later edit makes a second lane the discriminator or drops
the signed-bearer lane, either of which would leave the file green while
measuring something other than #8102.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PEVB6w7D7uCszR9Mw1BL73
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 37785ed commit 29308ba
3 files changed
Lines changed: 388 additions & 37 deletions
File tree
- .changeset
- packages
- plugins/plugin-auth/src
- qa/dogfood/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1323 | 1323 | | |
1324 | 1324 | | |
1325 | 1325 | | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
1326 | 1340 | | |
1327 | 1341 | | |
1328 | 1342 | | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
1336 | | - | |
1337 | | - | |
1338 | | - | |
1339 | | - | |
1340 | | - | |
1341 | | - | |
1342 | | - | |
1343 | | - | |
1344 | | - | |
1345 | | - | |
1346 | | - | |
1347 | | - | |
1348 | | - | |
1349 | | - | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1365 | 1350 | | |
1366 | | - | |
| 1351 | + | |
1367 | 1352 | | |
1368 | 1353 | | |
1369 | 1354 | | |
| |||
0 commit comments