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")
+12 -3
View File
@@ -17,13 +17,22 @@
"protocol": "http",
"allow": {
"spiffe://messenger/api": [
"* /"
"GET /messenger/objects/",
"HEAD /messenger/objects/",
"PUT /messenger/objects/staging/",
"GET /minio/health/"
],
"spiffe://messenger/worker": [
"* /"
"GET /messenger/objects/",
"HEAD /messenger/objects/",
"PUT /messenger/objects/",
"GET /minio/health/"
],
"spiffe://messenger/reconciler": [
"* /"
"GET /messenger",
"HEAD /messenger/objects/",
"DELETE /messenger/objects/",
"GET /minio/health/"
],
"spiffe://messenger/operator": [
"* /"