mirror of
https://github.com/minio/minio.git
synced 2025-02-26 04:49:16 -05: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:
parent
e3eec89d24
commit
110458cd10
@ -84,7 +84,10 @@ func (api objectAPIHandlers) SelectObjectContentHandler(w http.ResponseWriter, r
|
||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||
return
|
||||
}
|
||||
|
||||
if crypto.S3KMS.IsRequested(r.Header) { // SSE-KMS is not supported
|
||||
writeErrorResponse(w, ErrNotImplemented, r.URL)
|
||||
return
|
||||
}
|
||||
vars := mux.Vars(r)
|
||||
bucket := vars["bucket"]
|
||||
object := vars["object"]
|
||||
@ -620,7 +623,7 @@ func (api objectAPIHandlers) CopyObjectHandler(w http.ResponseWriter, r *http.Re
|
||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||
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
|
||||
return
|
||||
}
|
||||
@ -966,7 +969,7 @@ func (api objectAPIHandlers) PutObjectHandler(w http.ResponseWriter, r *http.Req
|
||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||
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
|
||||
return
|
||||
}
|
||||
@ -1218,7 +1221,7 @@ func (api objectAPIHandlers) NewMultipartUploadHandler(w http.ResponseWriter, r
|
||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||
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
|
||||
return
|
||||
}
|
||||
@ -1310,7 +1313,7 @@ func (api objectAPIHandlers) CopyObjectPartHandler(w http.ResponseWriter, r *htt
|
||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||
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
|
||||
return
|
||||
}
|
||||
@ -1532,7 +1535,7 @@ func (api objectAPIHandlers) PutObjectPartHandler(w http.ResponseWriter, r *http
|
||||
writeErrorResponse(w, ErrServerNotInitialized, r.URL)
|
||||
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
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user