feat(auth): add scoped JSON account and session queries for CLI clients
Build and publish container images / images (push) Successful in 18m18s

This commit is contained in:
Anya Tokugawa committed 2026-12-01 08:17:56 +09:00
1 parent 6f9752ea3a
commit b650fe50d7
10 files changed
+640

No files matched your search

+6
View File
@@ -284,6 +284,12 @@ func (s *Server) withAuthorization(next http.Handler) http.Handler {
// No process-wide principal/policy cache: revocation is observed by the
// next request. Read snapshots never authorize mutating store operations.
r = cacheRequestDomain(withReadPolicyContext(r))
// These read-only JSON handlers require a live session even in legacy
// mode; they also own method and domain-admin checks, without HTML redirects.
if authQueryRoute(r.URL.Path) {
next.ServeHTTP(w, r)
return
}
if r.URL.Path == "/g" || strings.HasPrefix(r.URL.Path, "/g/") {
next.ServeHTTP(w, r)
return