Skip to content

Commit

Permalink
Merge pull request #1418 from hanicker/patch-1
Browse files Browse the repository at this point in the history
Specify signatureVersion for AWS S3
  • Loading branch information
prafull-opensignlabs authored Nov 18, 2024
2 parents 5f77368 + 124fbfd commit d1a99d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apps/OpenSignServer/cloud/parsefunction/getSignedUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function getPresignedUrl(url, adapter) {
AWS.config.update({ credentials: credentials, region: adapter?.region || process.env.DO_REGION });
const spacesEndpoint = adapter?.endpoint || new AWS.Endpoint(process.env.DO_ENDPOINT);

const s3 = new AWS.S3({ endpoint: spacesEndpoint });
const s3 = new AWS.S3({ endpoint: spacesEndpoint, signatureVersion: "v4" });

// Create a new URL object
const parsedUrl = new URL(url);
Expand Down
1 change: 1 addition & 0 deletions apps/OpenSignServer/cloud/parsefunction/uploadFiletoS3.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ async function uploadFileToS3(buffer, fileName, mimeType, adapter) {
client = new S3Client({
region: adapter?.region,
credentials: { accessKeyId: adapter?.accessKeyId, secretAccessKey: adapter?.secretAccessKey },
signatureVersion: 'v4'
});
}
const prefixId = crypto.randomBytes(16).toString('hex');
Expand Down

0 comments on commit d1a99d5

Please sign in to comment.