Compare commits

...

1 Commits

Author SHA1 Message Date
Taylor McKinnon 9f79afcd86 f 2021-04-12 13:23:05 -07:00
3 changed files with 15 additions and 0 deletions

View File

@ -276,6 +276,10 @@
"code": 404, "code": 404,
"description": "The object lock configuration was not found" "description": "The object lock configuration was not found"
}, },
"ServerSideEncryptionConfigurationNotFoundError" : {
"code": 404,
"description": "The server side encryption configuration was not found"
},
"NotImplemented": { "NotImplemented": {
"code": 501, "code": 501,
"description": "A header you provided implies functionality that is not implemented." "description": "A header you provided implies functionality that is not implemented."

View File

@ -23,6 +23,7 @@ const sharedActionMap = {
bucketPutReplication: 's3:PutReplicationConfiguration', bucketPutReplication: 's3:PutReplicationConfiguration',
bucketPutVersioning: 's3:PutBucketVersioning', bucketPutVersioning: 's3:PutBucketVersioning',
bucketPutWebsite: 's3:PutBucketWebsite', bucketPutWebsite: 's3:PutBucketWebsite',
bypassGovernanceRetention: 's3:BypassGovernanceRetention',
listMultipartUploads: 's3:ListBucketMultipartUploads', listMultipartUploads: 's3:ListBucketMultipartUploads',
listParts: 's3:ListMultipartUploadParts', listParts: 's3:ListMultipartUploadParts',
multipartDelete: 's3:AbortMultipartUpload', multipartDelete: 's3:AbortMultipartUpload',
@ -90,6 +91,7 @@ const actionMonitoringMapS3 = {
bucketGetPolicy: 'GetBucketPolicy', bucketGetPolicy: 'GetBucketPolicy',
bucketGetReplication: 'GetBucketReplication', bucketGetReplication: 'GetBucketReplication',
bucketGetVersioning: 'GetBucketVersioning', bucketGetVersioning: 'GetBucketVersioning',
bucketGetEncryption: 'GetBucketEncryption',
bucketGetWebsite: 'GetBucketWebsite', bucketGetWebsite: 'GetBucketWebsite',
bucketHead: 'HeadBucket', bucketHead: 'HeadBucket',
bucketPut: 'CreateBucket', bucketPut: 'CreateBucket',
@ -102,6 +104,7 @@ const actionMonitoringMapS3 = {
bucketPutReplication: 'PutBucketReplication', bucketPutReplication: 'PutBucketReplication',
bucketPutVersioning: 'PutBucketVersioning', bucketPutVersioning: 'PutBucketVersioning',
bucketPutWebsite: 'PutBucketWebsite', bucketPutWebsite: 'PutBucketWebsite',
bypassGovernanceRetention: 'BypassGovernanceRetention',
completeMultipartUpload: 'CompleteMultipartUpload', completeMultipartUpload: 'CompleteMultipartUpload',
initiateMultipartUpload: 'CreateMultipartUpload', initiateMultipartUpload: 'CreateMultipartUpload',
listMultipartUploads: 'ListMultipartUploads', listMultipartUploads: 'ListMultipartUploads',

View File

@ -3,6 +3,7 @@ const routesUtils = require('../routesUtils');
function routerGET(request, response, api, log, statsClient, dataRetrievalFn) { function routerGET(request, response, api, log, statsClient, dataRetrievalFn) {
log.debug('routing request', { method: 'routerGET' }); log.debug('routing request', { method: 'routerGET' });
console.log(request.query)
if (request.bucketName === undefined && request.objectKey !== undefined) { if (request.bucketName === undefined && request.objectKey !== undefined) {
routesUtils.responseXMLBody(errors.NoSuchBucket, null, response, log); routesUtils.responseXMLBody(errors.NoSuchBucket, null, response, log);
} else if (request.bucketName === undefined } else if (request.bucketName === undefined
@ -92,6 +93,13 @@ function routerGET(request, response, api, log, statsClient, dataRetrievalFn) {
return routesUtils.responseXMLBody(err, xml, response, return routesUtils.responseXMLBody(err, xml, response,
log, corsHeaders); log, corsHeaders);
}); });
} else if (request.query.encryption !== undefined) {
api.callApiMethod('bucketGetEncryption', request, response, log,
(err, xml, corsHeaders) => {
routesUtils.statsReport500(err, statsClient);
return routesUtils.responseXMLBody(err, xml, response,
log, corsHeaders);
});
} else { } else {
// GET bucket // GET bucket
api.callApiMethod('bucketGet', request, response, log, api.callApiMethod('bucketGet', request, response, log,