mirror of
https://github.com/ferdzo/fs.git
synced 2026-04-05 08:46:24 +00:00
allow signed admin routes before S3 policy resolution
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user