Skip to content

fix(http2): expose auth statuses without matching challenges - #16240

Merged
oneandonlydean merged 2 commits into
boykopovar:mainfrom
JJenkx:fix/http2-unchallenged-auth-status-20261105
Nov 5, 2026
Merged

oneandonlydean merged 2 commits into
boykopovar:mainfrom
JJenkx:fix/http2-unchallenged-auth-status-20261105

Conversation

@JJenkx

@JJenkx JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

What

Expose an HTTP 401/407 response when it has no matching authentication challenge field. The transport currently refuses those statuses even when the server sent no WWW-Authenticate/Proxy-Authenticate field and no negotiation can be attempted. Track the two fields separately for each header block: 401 with WWW-Authenticate, or 407 with Proxy-Authenticate, still refuses with automatic auth enabled. Bare or mismatched-field responses retain their real status, body and content length. Automatic auth remains enabled by default.

This is a host transport policy based on RFC 9110 §11.3, not a measured Sony error/validation contract. Challenge negotiation, credentials, auth callbacks and auth-cache behavior remain unimplemented. The debt entry states that limit. No title-specific behavior is introduced.

Tested

Linux x86-64, Ryzen 9 7950X. Pinned main 38fe81a14ab4f25d627af66cf017f53596b2c01e; standalone change 8bb5c1aa1fd7faf234d608ce3e1b574c0e52ce8b.

  • Existing main HTTP2 CPU tests: 13/13. Change: 14/14, zero skips. New guest_http2_auth_status exercises 31 loopback TLS cases across request versions 1/2/3: bare/mismatched/matching 401/407 fields, auth disabled, informational-header isolation, mixed-case HTTP/1 field names and ordinary 200 responses. It checks real status/body/length and the enabled default.
  • The same final executable fails its new auth-status case against the unmodified main library. Its ordinary transport suite, including the corrected fixture advertising a genuine Basic challenge, passes main. Loader paths and fixture SHA are attached.
  • Private title validation only: main plus feat(http2): complete asynchronous send and read #11630 and test(http2): cover completed zero-timeout send and read waits #16231, before/after this change; 14/14 → 15/15 CPU cases. PPSA16064 v01.000.000, fresh writable state, same assets and frozen library banks, separate complete FIFO runs. Before: native134 at37.9s, authentication refusal. After: native134 at37.8s, sceHttp2WaitAsync refusal. Both show the same loading artwork at25/32s. A preceding metadata-only diagnostic retained the auth refusal and observed protocol=2 status=401 callback=0 server-challenge=0 proxy-challenge=0. These are live server runs, not controlled server-response comparisons. No gameplay or speed improvement claimed. Kernel settings restored, mounts released, banks/inputs unchanged in both arms.
  • Conventions pass; public-header audit verifies406 libraries/30604 exports; clean merge preview against main bf80054e7cf794320f656c93f3f299d55f336440.

Evidence: reviewed Linux validation archive, SHA256 615599bb22aa70efb1d439500a9fd8744e22c3b4ab38a852efa45ecb2cc55bf7.

Overlap: #12305 changes the same HTTP/2 header callback areas for response/trailer serialization. I proposed #12305 first in the coordination comment; author agreement is pending. The dependency below records that proposed order, and I will rebase this fix after it lands. Its exports are not implemented here. The tool's unverified stale comparisons (#11470, #12456, #13486, #14212, #15221) were manually reviewed; none implements this auth policy. Per-branch details and exact heads are in the archive. The async PRs are title-test prerequisites, not source dependencies of this standalone fix.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; silent stubs are listed in technical debt
  • No investigation files, images or logs added to the repository
  • New third-party code is a submodule built from source (none added)
  • Generic behaviour, not specific to one title
  • Depends on: feat(http2): serialize HTTP/2 response and trailing headers #12305 (textual integration order proposed; agreement pending)
  • Fixes: none
  • Unblocks: PPSA16064 Minecraft Dungeons II (PPSA16064) #8868 (auth-response stop only; async wait still stops)
  • GPUs tested: n/a for this transport change; private native observation used AMD Radeon RX6650XT, RADV26.2.6, Linux7.2.11
  • AI-assisted: yes

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Nov 5, 2026
@oneandonlydean oneandonlydean self-assigned this Nov 5, 2026
…e to throw

A 401 or 407 with a matching challenge field is a valid response whose console handling is not implemented here, so the new test should not assert that it throws. The cases that pass the status and body through stay.

Co-authored-by: JJenkx <31495916+JJenkx@users.noreply.github.com>
@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Windows check of head 8bb5c1aa1f, merged onto main 7264864185 (3ad2324a44, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • All 11 guest_http2_transport tests, including the new guest_http2_auth_status and guest_http2_gzip_headers, pass in 3 of 3 runs, none skipped.

AI-assisted: yes.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Hi @JJenkx, thanks for the Windows check. I added one small fix-up commit (fd606d4) on your branch: the new libSceHttp2 test no longer asserts that the unsupported authentication challenge throws, since a 401/407 with a matching challenge is a valid response whose console handling isn't implemented here. The pass-through cases for status and body are unchanged. Only GuestHttp2Transport.cpp changed, and the commit credits you as co-author.

@oneandonlydean
oneandonlydean merged commit 6a120ae into boykopovar:main Nov 5, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build docs prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants