mirror of
https://github.com/pgsty/minio.git
synced 2026-11-02 05:42:06 +03:00
docs: clarify layered SSE-C key authentication
Signed-off-by: Feng Ruohang <rh@vonng.com>
This commit is contained in:
@@ -356,9 +356,9 @@ func rotateKey(ctx context.Context, oldKey []byte, newKeyID string, newKey []byt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// checkSSECCopySourceKey authenticates the SSE-C copy source key against the
|
// checkSSECCopySourceKey authenticates the SSE-C copy source key against the
|
||||||
// sealed object key held in metadata. GetObjectNInfo builds no decryptor for a
|
// sealed object key held in metadata. This keeps the diverted rotation safe on
|
||||||
// zero byte object, so a copy whose data path never decrypts anything has to
|
// its own and remains defense in depth when the read path also authenticates
|
||||||
// verify the source key explicitly. Mirrors the errors rotateKey reports.
|
// zero-byte objects. Mirrors the errors rotateKey reports.
|
||||||
func checkSSECCopySourceKey(h http.Header, metadata map[string]string, bucket, object string, newKey []byte) error {
|
func checkSSECCopySourceKey(h http.Header, metadata map[string]string, bucket, object string, newKey []byte) error {
|
||||||
oldKey, err := ParseSSECopyCustomerRequest(h, metadata)
|
oldKey, err := ParseSSECopyCustomerRequest(h, metadata)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -508,10 +508,9 @@ func testAPICopyObjectSSECKeyRotationNullVersionWithCompression(obj ObjectLayer,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestAPICopyObjectSSECKeyRotationNullVersionWrongKey pins the source key
|
// TestAPICopyObjectSSECKeyRotationNullVersionWrongKey pins source-key
|
||||||
// authentication of the re-encrypting fallback. A zero byte source has no data
|
// authentication in both the standalone rotation fix and the later zero-byte
|
||||||
// to decrypt, so the copy would otherwise reach the destination write without
|
// read hardening.
|
||||||
// ever proving the caller holds the current key.
|
|
||||||
func TestAPICopyObjectSSECKeyRotationNullVersionWrongKey(t *testing.T) {
|
func TestAPICopyObjectSSECKeyRotationNullVersionWrongKey(t *testing.T) {
|
||||||
defer DetectTestLeak(t)()
|
defer DetectTestLeak(t)()
|
||||||
ExecObjectLayerAPITest(ExecObjectLayerAPITestArgs{
|
ExecObjectLayerAPITest(ExecObjectLayerAPITestArgs{
|
||||||
|
|||||||
Reference in New Issue
Block a user