Remove Jobname/Jobid/Node headers, add nosniff for static files - #211
Merged
Conversation
Every response carried three headers naming the address space -- Jobname, Jobid and Node -- including unauthenticated 401s, disclosing live system state (the STC's job number, the SMF ID) to anyone who can reach the port. A scan across the ecosystem (mvsMF Desktop and tests, mbt's deploy path, the shutdown scripts) found no consumer of any of the three: everything that identifies the answering job does so via the jobs API JSON or the MTT, not these headers. Static files served from the DOCROOT now carry X-Content-Type-Options: nosniff, matching what mvsMF already sends on its own responses; the mvsMF Desktop is served from exactly this path. The realm keeps using the SMF ID (httprlm.c); its comment and docs/auth-redesign.md no longer cite the removed Node: header as its precedent. Fixes #209
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #209
What
httpresp()no longer emitsJobname:,Jobid:andNode:— no response identifies the address space any more, authenticated or not. A comment at the former emission site records why, so they do not quietly come back.X-Content-Type-Options: nosniff(emitted inhttpget.cright afterContent-Type, so the SSI path is covered too). mvsMF already sends it on its own responses (Harden the session cookie, align the /zosmf/info payload, and write the common headers once mvsmf#327); this closes the gap for the Desktop assets served by httpd itself.httprlm.c's comment anddocs/auth-redesign.mdno longer cite the removedNode:header as the precedent for the SMF-ID realm. The realm itself is untouched — it reads__smfid()directly.Why removal (option 3) is safe
Scanned every repo under the ecosystem root — shell/Python/JS/REXX/C, test suites, deploy tooling, docs — for consumers of the three headers and for header-reading patterns generally:
jobname/jobidhits inmvsmf/tests/curl-jobs.sh,mbt/scripts/mbt/mvsmf.pyand the docs are jobs-API JSON fields (jq -r '.jobid',resp.get("jobname")), unaffected by this change.ETag(datasets.js).JOBNAMEonly as an environment variable for console commands.Verification
make modulesclean (cc370,-Wall -Werror)make test-host: 6 tests, 98 assertions, 0 failNot covered by an automated test: header emission needs a socket, so the header set itself is only checkable against a live instance (
curl -s -ion any path — the three headers must be absent, static files must showX-Content-Type-Options: nosniff).