Project

General

Profile

Actions

Bug #23470

closed

presigned URL for PUT with metadata fails: SignatureDoesNotMatch

Added by Robin Johnson about 6 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
mimic, luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

  • Pre-signed URLs for PUT without metadata works fine.
  • Pre-signed URL for PUT with metadata gives SignatureDoesNotMatch

Happens for both v2 & v4 signature. Busy confirming against AWS.

# generate presigned URLs for PUT upload with & without metadata.
host = 'objects-us-west-1.dream.io'
aws_access_key_id = ...
aws_secret_access_key = ...
bucket = ...
key = ...
expires = 900

import boto
from boto.s3.connection import S3Connection
conn = S3Connection(host=host,aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, is_secure=False, debug=3, calling_format = 'boto.s3.connection.OrdinaryCallingFormat')
bucket_obj = boto.s3.bucket.Bucket(connection=conn, name=bucket)
key_obj = boto.s3.key.Key(bucket_obj, key)
print(key_obj.generate_url(expires, method='PUT', force_http=True))
key_obj.metadata['md'] = 'md'
print(key_obj.generate_url(expires, method='PUT', force_http=True))

# do upload with: curl -T testfile -v $URL

Related issues 2 (0 open2 closed)

Copied to rgw - Backport #37558: mimic: presigned URL for PUT with metadata fails: SignatureDoesNotMatchResolvedAshish SinghActions
Copied to rgw - Backport #37559: luminous: presigned URL for PUT with metadata fails: SignatureDoesNotMatchResolvedAshish SinghActions
Actions

Also available in: Atom PDF