Actions
Feature #18800
closedrgw: support AWS4 authentication for S3 Post Object API
Status:
Resolved
Priority:
Normal
Assignee:
Javier M. Mellid
Target version:
-
% Done:
0%
Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
S3 Post Object API requires different form data for v4 authentication than v2.
http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-authentication-HTTPPOST.html
Current code expects form data for v2 authentication:
int RGWPostObj_ObjStore_S3::get_policy()
{
bufferlist encoded_policy;
if (part_bl("policy", &encoded_policy)) {
// check that the signature matches the encoded policy
string s3_access_key;
if (!part_str("AWSAccessKeyId", &s3_access_key)) {
ldout(s->cct, 0) << "No S3 access key found!" << dendl;
err_msg = "Missing access key";
return -EINVAL;
}
string received_signature_str;
if (!part_str("signature", &received_signature_str)) {
ldout(s->cct, 0) << "No signature found!" << dendl;
err_msg = "Missing signature";
return -EINVAL;
}
...
}
Files
Actions