You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by su...@apache.org on 2025/08/03 06:57:16 UTC
(cloudstack) branch main updated: ceph: fix SignatureDoesNotMatch by using correct secret key (#11115)
This is an automated email from the ASF dual-hosted git repository.
sureshanaparti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new ccd86d96d90 ceph: fix SignatureDoesNotMatch by using correct secret key (#11115)
ccd86d96d90 is described below
commit ccd86d96d905ea80fae00683d591d4d0c15eef73
Author: jeanvetorello <je...@gmail.com>
AuthorDate: Sun Aug 3 03:57:09 2025 -0300
ceph: fix SignatureDoesNotMatch by using correct secret key (#11115)
Ensure bucket.getSecretKey() is used when building the S3 client.
Previously, only getAccessKey() was passed for both key and secret,
causing V4 signature validation failures during operations such as
bucket creation and policy updates.
Co-authored-by: Jean Vetorello <je...@paneas.com>
---
.../storage/datastore/driver/CephObjectStoreDriverImpl.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/plugins/storage/object/ceph/src/main/java/org/apache/cloudstack/storage/datastore/driver/CephObjectStoreDriverImpl.java b/plugins/storage/object/ceph/src/main/java/org/apache/cloudstack/storage/datastore/driver/CephObjectStoreDriverImpl.java
index 5b5eaa08dc5..23f155c16c5 100644
--- a/plugins/storage/object/ceph/src/main/java/org/apache/cloudstack/storage/datastore/driver/CephObjectStoreDriverImpl.java
+++ b/plugins/storage/object/ceph/src/main/java/org/apache/cloudstack/storage/datastore/driver/CephObjectStoreDriverImpl.java
@@ -193,19 +193,19 @@ public class CephObjectStoreDriverImpl extends BaseObjectStoreDriverImpl {
policyConfig = "{\"Version\":\"2012-10-17\",\"Statement\":[]}";
}
- AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getAccessKey());
+ AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getSecretKey());
client.setBucketPolicy(new SetBucketPolicyRequest(bucket.getName(), policyConfig));
}
@Override
public BucketPolicy getBucketPolicy(BucketTO bucket, long storeId) {
- AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getAccessKey());
+ AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getSecretKey());
return client.getBucketPolicy(new GetBucketPolicyRequest(bucket.getName()));
}
@Override
public void deleteBucketPolicy(BucketTO bucket, long storeId) {
- AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getAccessKey());
+ AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getSecretKey());
client.deleteBucketPolicy(new DeleteBucketPolicyRequest(bucket.getName()));
}
@@ -255,7 +255,7 @@ public class CephObjectStoreDriverImpl extends BaseObjectStoreDriverImpl {
@Override
public boolean setBucketVersioning(BucketTO bucket, long storeId) {
- AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getAccessKey());
+ AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getSecretKey());
try {
BucketVersioningConfiguration configuration =
new BucketVersioningConfiguration().withStatus("Enabled");
@@ -272,7 +272,7 @@ public class CephObjectStoreDriverImpl extends BaseObjectStoreDriverImpl {
@Override
public boolean deleteBucketVersioning(BucketTO bucket, long storeId) {
- AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getAccessKey());
+ AmazonS3 client = getS3Client(getStoreURL(storeId), bucket.getAccessKey(), bucket.getSecretKey());
try {
BucketVersioningConfiguration configuration =
new BucketVersioningConfiguration().withStatus("Suspended");