Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / Source
What the read token may do
The read token gets GETs and a short list of read-only POSTs, the MCP endpoint among them.
PINNED SOURCE Copied from the repository at this commit. Source, not an execution.
PHAROS at 975a38dMIT license
allowed_forbackend/app/shared/auth.py, lines 126–133Open source
def allowed_for(principal: Principal, method: str, path: str) -> bool: if principal.is_admin: return True if method in ("GET", "HEAD", "OPTIONS"): return True if method != "POST": return False return path in READ_ONLY_POST_PATHS or path.startswith(READ_ONLY_POST_PREFIXES)Where this comes from
- Commit
975a38d5d17839c26ee219295a5be6ac66b6d910- File
backend/app/shared/auth.py- Lines
- 126–133
- Git blob
c77f24b3d7406a6b302764a8fc5e475c40480e60- License
- MIT, © 2024–2026 Pharos Contributors. Notice
Read it on GitHub at this commit
Check it yourself
From a clone of the repository, the first command prints the blob above and the second prints these lines.
git rev-parse 975a38d:backend/app/shared/auth.py
git show 975a38d:backend/app/shared/auth.py | sed -n '126,133p'