fix(security): enforce S3 boundaries and configure persistent audit

This commit is contained in:
2026-11-20 19:35:35 +03:00
parent d6957b2f79
commit 7f6e8cbd27
13 changed files with 7976 additions and 34 deletions
+7 -1
View File
@@ -389,7 +389,13 @@ func runHTTP(c Config, b Boundary) error {
}
}
if !allowed {
http.Error(w, "Operation denied", 403)
if c.Role == "s3" {
w.Header().Set("Content-Type", "application/xml")
w.WriteHeader(http.StatusForbidden)
io.WriteString(w, "<Error><Code>AccessDenied</Code><Message>Operation denied</Message><RequestId>tls-boundary</RequestId><HostId>local</HostId></Error>")
} else {
http.Error(w, "Operation denied", http.StatusForbidden)
}
return
}
r.Header.Del("X-Forwarded-Client-Cert")