mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 05:30:24 +03:00
Fix: Disallow requests with SSE-KMS headers (#6587)
Addresses issue #6582. Minio server currently does not have SSE-KMS support. Reject requests with SSE-KMS headers with NotImplementedErr
This commit is contained in:
@@ -84,7 +84,10 @@ func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r
|
|||||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if crypto.S3KMS.IsRequested(r.Header) { // SSE-KMS is not supported
|
||||||
|
writeErrorResponse(w, ErrNotImplemented, r.URL)
|
||||||
|
return
|
||||||
|
}
|
||||||
vars := mux.Vars(r)
|
vars := mux.Vars(r)
|
||||||
bucket := vars["bucket"]
|
bucket := vars["bucket"]
|
||||||
object := vars["object"]
|
object := vars["object"]
|
||||||
@@ -620,7 +623,7 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
|||||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !objectAPI.IsEncryptionSupported() && crypto.S3KMS.IsRequested(r.Header) {
|
if crypto.S3KMS.IsRequested(r.Header) {
|
||||||
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -966,7 +969,7 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
|
|||||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !objectAPI.IsEncryptionSupported() && crypto.S3KMS.IsRequested(r.Header) {
|
if crypto.S3KMS.IsRequested(r.Header) {
|
||||||
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1218,7 +1221,7 @@ func (api objectAPIHandlers) NewMultipartUploadHandler(w http.ResponseWriter, r
|
|||||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !objectAPI.IsEncryptionSupported() && crypto.S3KMS.IsRequested(r.Header) {
|
if crypto.S3KMS.IsRequested(r.Header) {
|
||||||
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1310,7 +1313,7 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt
|
|||||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !objectAPI.IsEncryptionSupported() && crypto.S3KMS.IsRequested(r.Header) {
|
if crypto.S3KMS.IsRequested(r.Header) {
|
||||||
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -1532,7 +1535,7 @@ func (api objectAPIHandlers) PutObjectPartHandler(w http.ResponseWriter, r *http
|
|||||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !objectAPI.IsEncryptionSupported() && crypto.S3KMS.IsRequested(r.Header) {
|
if crypto.S3KMS.IsRequested(r.Header) {
|
||||||
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
writeErrorResponse(w, ErrNotImplemented, r.URL) // SSE-KMS is not supported
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user