Skip to content

Commit e8c055e

Browse files
ADFA-5361 docs(adr): say why the WebView User-Agent is read and not pinned
The idea of setting our own suffix so the value is ours came up twice, independently, within one review. It does not hold: getUserAgentString() and the header the WebView sends are the same WebSettings, so there is nothing to pin, and setting one would add a string to maintain plus an "append, never replace" rule in exchange for protection against a drift the platform does not permit. It also would not close the failure it appears to address — a session rejected for any other reason still leaves a silent guest — for which the answer is verifying identity after load, not hardening the input. Recorded so the next reader does not re-derive it.
1 parent 280bd1f commit e8c055e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎controller/docs/ADR-5361-service-session-portability.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ content browsing, for one identity problem.
125125
things that read it: PDF routing picks a pdf.js build from the Chrome major version in the UA, and
126126
the services' templates sniff it for their mobile layout. It would also be two places that must
127127
agree, which is the class of defect this ADR exists to remove.
128+
- **The app reads that string; it does not set one.** The natural next thought — pin our own suffix
129+
so the value is ours and cannot drift — was raised and rejected while writing this ADR, twice and
130+
independently, which is why it is recorded rather than left to be re-derived. There is nothing to
131+
pin: `getUserAgentString()` and the header the WebView sends are the same `WebSettings`, read and
132+
sent in the same process moments apart, so they cannot disagree. Setting one would add a string to
133+
maintain and an "append, never replace" rule to remember, in exchange for protection against a
134+
drift the platform does not permit — and it would not close the failure it appears to address. If
135+
a session is ever rejected again for some other reason (an upstream change, a different component
136+
of the fingerprint), the viewer is silently a guest whatever the User-Agent says. The answer to
137+
that would be **verifying the identity after the page loads**, not hardening the input to a
138+
mechanism whose failure is invisible. That has a real cost and needs its own decision, the day
139+
there is evidence it is needed.
128140
- Kolibri receives the same treatment. Django does not bind sessions to the agent, so it is expected
129141
to be a no-op there; it is applied anyway because one rule per endpoint is the point, and a
130142
per-service exception is what later gets forgotten. Verified not to regress (§7).

0 commit comments

Comments
 (0)