Skip to content

Commit d1a2731

Browse files
committed
Merge branch 'w/9.0/improvement/CLDSRV-621-backport-bucketownerid' into tmp/octopus/w/9.1/improvement/CLDSRV-621-backport-bucketownerid
2 parents d39cb12 + f2075a3 commit d1a2731

6 files changed

Lines changed: 31 additions & 26 deletions

File tree

lib/api/apiUtils/object/createAndStoreObject.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function createAndStoreObject(bucketName, bucketMD, objectKey, objMD, authInfo,
194194
metadataStoreParams.oldReplayId = objMD.uploadId;
195195
}
196196

197-
if (authInfo.getCanonicalID() != bucketMD.getOwner()) {
197+
if (authInfo.getCanonicalID() !== bucketMD.getOwner()) {
198198
metadataStoreParams.bucketOwnerId = bucketMD.getOwner();
199199
}
200200

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"dependencies": {
2222
"@azure/storage-blob": "^12.25.0",
2323
"@hapi/joi": "^17.1.1",
24-
"arsenal": "git+https://github.com/scality/Arsenal#8.2.21",
24+
"arsenal": "git+https://github.com/scality/Arsenal#8.2.23",
2525
"async": "2.6.4",
2626
"aws-sdk": "^2.1692.0",
2727
"bucketclient": "scality/bucketclient#8.2.4",

tests/unit/api/multipartUpload.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,7 +2764,7 @@ describe('complete mpu with bucket policy', () => {
27642764
json.InitiateMultipartUploadResult.UploadId[0];
27652765
const md5Hash = crypto.createHash('md5').update(partBody);
27662766
const calculatedHash = md5Hash.digest('hex');
2767-
const partRequest = new DummyRequest({
2767+
const partRequest = new DummyRequest(Object.assign({
27682768
bucketName,
27692769
namespace,
27702770
objectKey,
@@ -2786,7 +2786,7 @@ describe('complete mpu with bucket policy', () => {
27862786
socket: {
27872787
remoteAddress: '1.1.1.1',
27882788
},
2789-
}, partBody);
2789+
}, requestFix), partBody);
27902790
objectPutPart(authInfoOtherAcc, partRequest, undefined, log, err => {
27912791
assert.ifError(err);
27922792
const completeBody = '<CompleteMultipartUpload>' +
@@ -2795,7 +2795,7 @@ describe('complete mpu with bucket policy', () => {
27952795
`<ETag>"${calculatedHash}"</ETag>` +
27962796
'</Part>' +
27972797
'</CompleteMultipartUpload>';
2798-
const completeRequest = {
2798+
const completeRequest = new DummyRequest(Object.assign({
27992799
bucketName,
28002800
namespace,
28012801
objectKey,
@@ -2808,7 +2808,7 @@ describe('complete mpu with bucket policy', () => {
28082808
socket: {
28092809
remoteAddress: '1.1.1.1',
28102810
},
2811-
};
2811+
}, requestFix));
28122812
completeMultipartUpload(authInfoOtherAcc,
28132813
completeRequest, log, err => {
28142814
assert.ifError(err);

tests/unit/api/objectCopy.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ describe('objectCopy with versioning', () => {
141141
metadata.putObjectMD.lastCall,
142142
destBucketName,
143143
objectKey,
144-
sinon.match({ _data: { bucketOwnerId: sinon.match.typeOf('undefined') }}),
144+
sinon.match({ _data: { bucketOwnerId: sinon.match.typeOf('undefined') } }),
145145
sinon.match.any,
146146
sinon.match.any,
147147
sinon.match.any
@@ -171,7 +171,7 @@ describe('objectCopy with versioning', () => {
171171
Principal: { AWS: `arn:aws:iam::${authInfo2.shortid}:root` },
172172
Action: ['s3:GetObject'],
173173
Resource: [
174-
`arn:aws:s3:::${sourceBucketName}/*`
174+
`arn:aws:s3:::${sourceBucketName}/*`,
175175
],
176176
},
177177
],
@@ -192,7 +192,7 @@ describe('objectCopy with versioning', () => {
192192
Principal: { AWS: `arn:aws:iam::${authInfo2.shortid}:root` },
193193
Action: ['s3:PutObject'],
194194
Resource: [
195-
`arn:aws:s3:::${destBucketName}/*`
195+
`arn:aws:s3:::${destBucketName}/*`,
196196
],
197197
},
198198
],
@@ -208,14 +208,14 @@ describe('objectCopy with versioning', () => {
208208
metadata.putObjectMD.lastCall,
209209
destBucketName,
210210
objectKey,
211-
sinon.match({_data: { bucketOwnerId: authInfo.canonicalID }}),
211+
sinon.match({ _data: { bucketOwnerId: authInfo.canonicalID } }),
212212
sinon.match.any,
213213
sinon.match.any,
214214
sinon.match.any
215215
);
216216
assert.ifError(err);
217217
done();
218-
});
218+
});
219219
});
220220
});
221221
});

tests/unit/api/objectPut.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ describe('objectPut API', () => {
775775
}, postBody);
776776

777777
bucketPut(authInfo, testPutBucketRequest, log, () => {
778-
objectPut(authInfo, testPutObjectRequest, undefined, log,
778+
objectPut(authInfo, testPutObjectRequest, undefined, log,
779779
err => {
780780
assert.ifError(err);
781781
sinon.assert.calledWith(metadata.putObjectMD.lastCall,

yarn.lock

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@
173173
fast-xml-parser "^5.0.7"
174174
tslib "^2.8.1"
175175

176-
"@azure/identity@^4.10.0":
177-
version "4.10.0"
178-
resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-4.10.0.tgz#10cfe49207b4d111ebe3aab3ade47561c2852c6d"
179-
integrity sha512-iT53Sre2NJK6wzMWnvpjNiR3md597LZ3uK/5kQD2TkrY9vqhrY5bt2KwELNjkOWQ9n8S/92knj/QEykTtjMNqQ==
176+
"@azure/identity@^4.10.1":
177+
version "4.10.1"
178+
resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-4.10.1.tgz#6ce1e7b367d2eb6680d0efa5817382aafcd86f05"
179+
integrity sha512-YM/z6RxRtFlXUH2egAYF/FDPes+MUE6ZoknjEdaq7ebJMMNUzn9zCJ3bd2ZZZlkP0r1xKa88kolhFH/FGV7JnA==
180180
dependencies:
181181
"@azure/abort-controller" "^2.0.0"
182182
"@azure/core-auth" "^1.9.0"
@@ -1296,11 +1296,11 @@ arraybuffer.prototype.slice@^1.0.4:
12961296
get-intrinsic "^1.2.6"
12971297
is-array-buffer "^3.0.4"
12981298

1299-
"arsenal@git+https://github.com/scality/Arsenal#8.2.21":
1300-
version "8.2.21"
1301-
resolved "git+https://github.com/scality/Arsenal#534e10f48d170b0c4dff9bd818376f796eac8aaa"
1299+
"arsenal@git+https://github.com/scality/Arsenal#8.2.23":
1300+
version "8.2.23"
1301+
resolved "git+https://github.com/scality/Arsenal#77d5781ba013708e44251c4e0142428c5f05a643"
13021302
dependencies:
1303-
"@azure/identity" "^4.10.0"
1303+
"@azure/identity" "^4.10.1"
13041304
"@azure/storage-blob" "^12.27.0"
13051305
"@js-sdsl/ordered-set" "^4.4.2"
13061306
"@scality/hdclient" "^1.3.1"
@@ -1321,7 +1321,7 @@ arraybuffer.prototype.slice@^1.0.4:
13211321
joi "^17.13.3"
13221322
level "~5.0.1"
13231323
level-sublevel "~6.6.5"
1324-
mongodb "^6.16.0"
1324+
mongodb "^6.17.0"
13251325
node-forge "^1.3.1"
13261326
prom-client "^15.1.3"
13271327
simple-glob "^0.2.0"
@@ -1635,6 +1635,11 @@ bson@^6.10.3, bson@^6.8.0:
16351635
resolved "https://registry.yarnpkg.com/bson/-/bson-6.10.3.tgz#5f9a463af6b83e264bedd08b236d1356a30eda47"
16361636
integrity sha512-MTxGsqgYTwfshYWTRdmZRC+M7FnG1b4y7RO7p2k3X24Wq0yv1m77Wsj0BzlPzd/IowgESfsruQCUToa7vbOpPQ==
16371637

1638+
bson@^6.10.4:
1639+
version "6.10.4"
1640+
resolved "https://registry.yarnpkg.com/bson/-/bson-6.10.4.tgz#d530733bb5bb16fb25c162e01a3344fab332fd2b"
1641+
integrity sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng==
1642+
16381643
bucketclient@scality/bucketclient#8.2.4:
16391644
version "8.2.4"
16401645
resolved "https://codeload.github.com/scality/bucketclient/tar.gz/99ce471a7e665547317e0103a1ba38d75e331a63"
@@ -4942,13 +4947,13 @@ mongodb@^6.11.0:
49424947
bson "^6.10.3"
49434948
mongodb-connection-string-url "^3.0.0"
49444949

4945-
mongodb@^6.16.0:
4946-
version "6.16.0"
4947-
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-6.16.0.tgz#2a7a1986ec151d9c738fc8ce4cf4324c3f728a2f"
4948-
integrity sha512-D1PNcdT0y4Grhou5Zi/qgipZOYeWrhLEpk33n3nm6LGtz61jvO88WlrWCK/bigMjpnOdAUKKQwsGIl0NtWMyYw==
4950+
mongodb@^6.17.0:
4951+
version "6.17.0"
4952+
resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-6.17.0.tgz#b52da4e3cdf62299e55c51584cb5657283157594"
4953+
integrity sha512-neerUzg/8U26cgruLysKEjJvoNSXhyID3RvzvdcpsIi2COYM3FS3o9nlH7fxFtefTb942dX3W9i37oPfCVj4wA==
49494954
dependencies:
49504955
"@mongodb-js/saslprep" "^1.1.9"
4951-
bson "^6.10.3"
4956+
bson "^6.10.4"
49524957
mongodb-connection-string-url "^3.0.0"
49534958

49544959
ms@2.0.0:

0 commit comments

Comments
 (0)