Commit 0e9f605
Skip username authorization for public web apps sessions
When HqUserDetailsBean.publicSession is true, isAuthorized() no longer
requires the request's username to equal the bean's username. Public web
apps sessions authenticate via a single-use key that HQ validates
server-to-server, and their username is a synthetic per-session string
(not a real account), so echoing it is not a meaningful membership control.
The requested domain is still required to be the session's domain
(domains.contains(domain)). This keeps a session key from being
replayed against a different domain.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ec9ec73 commit 0e9f605
2 files changed
Lines changed: 33 additions & 0 deletions
File tree
- src
- main/java/org/commcare/formplayer/beans/auth
- test/java/org/commcare/formplayer/tests
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
57 | 63 | | |
58 | 64 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
42 | 69 | | |
43 | 70 | | |
44 | 71 | | |
| |||
0 commit comments