feat(auth): add scoped JSON account and session queries for CLI clients
Build and publish container images / images (push) Successful in 18m18s
Build and publish container images / images (push) Successful in 18m18s
This commit is contained in:
1 parent
6f9752ea3a
commit
b650fe50d7
10 files changed
+640
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user