allow signed admin routes before S3 policy resolution

This commit is contained in:
2026-03-02 23:51:46 +01:00
parent 9b8d0b2b3e
commit 93a3aabf7d

View File

@@ -187,6 +187,17 @@ func (s *Service) AuthenticateRequest(r *http.Request) (RequestContext, error) {
if input.Presigned { if input.Presigned {
authType = "sigv4-presign" authType = "sigv4-presign"
} }
// Admin API authorization is enforced in admin handlers (bootstrap-only).
// We still require valid SigV4 credentials here, but skip S3 action policy checks.
if strings.HasPrefix(r.URL.Path, "/_admin/") {
return RequestContext{
Authenticated: true,
AccessKeyID: identity.AccessKeyID,
AuthType: authType,
}, nil
}
return RequestContext{ return RequestContext{
Authenticated: true, Authenticated: true,
AccessKeyID: identity.AccessKeyID, AccessKeyID: identity.AccessKeyID,