mirror of https://github.com/apache/cloudstack.git
Correction to cloud-bridge-register and S3RestServlet to use parameter Action in POST
This commit is contained in:
parent
56f4dec1e2
commit
2242ec0ca3
|
|
@ -20,7 +20,7 @@ def get_signature(key, url, query):
|
|||
hmac.new(key, '\n'.join(['GET', netloc, path, query]), sha).digest()))
|
||||
|
||||
def get_url(url, api_key, secret_key, action, query):
|
||||
amzn_string = 'AWSAccessKeyId=' + api_key + '&CloudAction=' + action + '&SignatureMethod=HmacSHA1'
|
||||
amzn_string = 'AWSAccessKeyId=' + api_key + '&Action=' + action + '&SignatureMethod=HmacSHA1'
|
||||
amzn_string += '&SignatureVersion=2&Timestamp='+ datetime.now().isoformat()[:19] +'Z&Version=2010-11-15'
|
||||
query = amzn_string + '&' + query
|
||||
url = url + '?' + query + '&Signature=' + get_signature(secret_key, url, query)
|
||||
|
|
|
|||
|
|
@ -110,12 +110,12 @@ public class S3RestServlet extends HttpServlet {
|
|||
logRequest(request);
|
||||
|
||||
// Our extensions to the S3 REST API for simple management actions
|
||||
// are conveyed with Request parameter CloudAction.
|
||||
// are conveyed with Request parameter "Action".
|
||||
// The present extensions are either to set up the user credentials
|
||||
// (see the cloud-bridge-register script for more detail) or
|
||||
// to report our version of this capability.
|
||||
// -> unauthenticated calls, should still be done over HTTPS
|
||||
String cloudAction = request.getParameter( "CloudAction" );
|
||||
String cloudAction = request.getParameter( "Action" );
|
||||
if (null != cloudAction)
|
||||
{
|
||||
if (cloudAction.equalsIgnoreCase( "SetUserKeys" )) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue