<span class="Apple-style-span" style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><div>Yes. I encode the password in String url = signed.sign(params);</div><div> </div><div> You can see &Signature parameter in url.</div>
</span><br><div class="gmail_quote">Em 17 de abril de 2012 12:53, Olivier Sallou <span dir="ltr"><<a href="mailto:olivier.sallou@irisa.fr">olivier.sallou@irisa.fr</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
Did you encode the password in the url?<br>
<br>
Le 4/17/12 5:28 PM, Charles Rodamilans a écrit :
<blockquote type="cite"><div><div class="h5">Hi,
<div><br>
</div>
<div>i tried to use ec2 interface with opennebula 3.2, but I have
problem.</div>
<div><br>
</div>
<div>Ec2 tools work well.</div>
<div>
<div><br>
</div>
<div>[oneadmin@lahpc_cloud_server ~]$ econe-describe-instances </div>
<div>oneadmin i-74 running
192.168.0.22 small </div>
<div>oneadmin i-75 running
192.168.0.20 small </div>
<div>oneadmin i-76 running
192.168.0.21 small </div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I use the java code, bellow, to generate url. It works well
in amazon ec2 (<a href="http://ec2.amazonaws.com" target="_blank">ec2.amazonaws.com</a>), but
is not working in opennebula. </div>
<div>
<br>
</div>
<div>
<div>
<div>[oneadmin@lahpc_cloud_server ~]$ curl "<a href="http://localhost:4567/?AWSAccessKeyId=oneadmin&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-17T14%3A58%3A07Z&Version=2011-01-01&Signature=LdbPDicLCFY%2BLNOqblKTBoY6sNl5jTJezV%2FCTmr5uBs%3D" target="_blank">http://localhost:4567/?AWSAccessKeyId=oneadmin&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-17T14%3A58%3A07Z&Version=2011-01-01&Signature=LdbPDicLCFY%2BLNOqblKTBoY6sNl5jTJezV%2FCTmr5uBs%3D</a>"</div>
<div><Response><Errors><Error><Code>AuthFailure</Code><Message>User
not
authorized</Message></Error></Errors><RequestID>0</RequestID></Response></div>
</div>
</div>
<div>
<div>
<div><br>
</div>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>I tried with others users (serveradmin and clouduser), but
problem is the same.</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>[oneadmin@lahpc_cloud_server ~]$ oneuser list</div>
<div>
<div> ID GROUP NAME AUTH
PASSWORD</div>
<div> 0 oneadmin oneadmin core
b8c388d2e366b7835bcd9fe565fb67a17f84302f</div>
<div> 1 oneadmin serveradmin server_c
96b438cf52a49348d0fbe773ff2c119bb4707994</div>
<div> 22 ec2 clouduser public
b8c388d2e366b7835bcd9fe565fb67a17f84302f</div>
</div>
<div><br>
</div>
<div>
<div>[oneadmin@lahpc_cloud_server ~]$ curl "<a href="http://localhost:4567/?AWSAccessKeyId=serveradmin&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-17T15%3A16%3A06Z&Version=2011-01-01&Signature=J3SPezX2sDZt8XPOKqkqa8Xw0AHyFNMedLJtGZ7IvUQ%3D" target="_blank">http://localhost:4567/?AWSAccessKeyId=serveradmin&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-17T15%3A16%3A06Z&Version=2011-01-01&Signature=J3SPezX2sDZt8XPOKqkqa8Xw0AHyFNMedLJtGZ7IvUQ%3D</a>"</div>
<div><Response><Errors><Error><Code>AuthFailure</Code><Message>User
not
authorized</Message></Error></Errors><RequestID>0</RequestID></Response></div>
</div>
<div><br>
</div>
<div>
<div>
<div>[oneadmin@lahpc_cloud_server ~]$ curl "<a href="http://localhost:4567/?AWSAccessKeyId=clouduser&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-17T15%3A18%3A51Z&Version=2011-01-01&Signature=t58LIMq7WYW0EslTkyn7CKVAX7BdWcw27jsRwSecGe0%3D" target="_blank">http://localhost:4567/?AWSAccessKeyId=clouduser&Action=DescribeInstances&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-04-17T15%3A18%3A51Z&Version=2011-01-01&Signature=t58LIMq7WYW0EslTkyn7CKVAX7BdWcw27jsRwSecGe0%3D</a>"</div>
<div><Response><Errors><Error><Code>AuthFailure</Code><Message>User
not
authorized</Message></Error></Errors><RequestID>0</RequestID></Response></div>
</div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>What is the problem? Any suggestion?</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Charles Rodamilans</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco">
<span style="color:#971365">import</span> java.util.Map;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> org.junit.Test;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">public</span> <span style="color:#971365">class</span> SignedRequestsTest {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#777777"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>@Test</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> <span style="color:#971365">void</span> signed() {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"><span style="color:rgb(0,0,0)"><span style="white-space:pre-wrap"> </span>SignedRequests signed = <span style="color:#971365">new</span> SignedRequests( <span style="color:#492df6">"oneadmin"</span>, <span style="color:#492df6">"password"</span>);</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075">//<span style="white-space:pre-wrap"> </span>SignedRequests signed = new
SignedRequests( "serveradmin", "password");</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075">//<span style="white-space:pre-wrap"> </span>SignedRequests signed = new
SignedRequests( "clouduser", "password");</p>
<div><br>
</div>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>Map<String,
String> params = <span style="color:#971365">new</span>
java.util.HashMap<String, String>();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#492df6"><span style="color:#000000"><span style="white-space:pre-wrap"> </span>params.put(</span>"Action"<span style="color:#000000">, </span>"DescribeInstances"<span style="color:#000000">);</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#492df6"><span style="color:#000000"><span style="white-space:pre-wrap"> </span>params.put(</span>"SignatureMethod"<span style="color:#000000">, </span>"HmacSHA256"<span style="color:#000000">);</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#492df6"><span style="color:#000000"><span style="white-space:pre-wrap"> </span>params.put(</span>"SignatureVersion"<span style="color:#000000">, </span>"2"<span style="color:#000000">);</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#492df6"><span style="color:#000000"><span style="white-space:pre-wrap"> </span>params.put(</span>"Version"<span style="color:#000000">, </span>"2010-06-15"<span style="color:#000000">);</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><span style="white-space:pre-wrap"> </span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
url = signed.sign(params);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>
System.<span style="color:#2121c4">out</span>.println(url);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco">}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco">
<br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075">/*</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"> * Code Reference</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"> * <a href="http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/AuthJavaSampleSig2.html" target="_blank">http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/AuthJavaSampleSig2.html</a></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco">
<span style="color:#971365">import</span>
java.io.UnsupportedEncodingException;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.net.URLEncoder;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span>
java.security.InvalidKeyException;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span>
java.security.NoSuchAlgorithmException;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.text.DateFormat;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span>
java.text.SimpleDateFormat;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.util.Calendar;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.util.Iterator;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.util.Map;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.util.SortedMap;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.util.TimeZone;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> java.util.TreeMap;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span> javax.crypto.Mac;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span>
javax.crypto.spec.SecretKeySpec;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span>
org.apache.commons.codec.binary.Base64;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">import</span>
com.lahpc.cloud.essential.HTTPVerb;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="color:#971365">public</span> <span style="color:#971365">class</span> SignedRequests {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#971365"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>private<span style="color:#000000"> </span>static<span style="color:#000000"> </span>final<span style="color:#000000"> String </span><span style="color:#2121c4">UTF8_CHARSET</span><span style="color:#000000"> = </span><span style="color:#492df6">"UTF-8"</span><span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">private</span><span style="color:#000000"> </span><span style="color:#971365">static</span><span style="color:#000000"> </span><span style="color:#971365">final</span><span style="color:#000000"> String </span>HMAC_SHA256_ALGORITHM<span style="color:#000000"> = </span><span style="color:#492df6">"HmacSHA256"</span><span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#971365"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>private<span style="color:#000000"> </span>static<span style="color:#000000"> </span>final<span style="color:#000000"> String </span><span style="color:#2121c4">REQUEST_URI</span><span style="color:#000000"> = </span><span style="color:#492df6">"/"</span><span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"><span style="color:rgb(82,117,197)"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span></span><span style="color:rgb(82,117,197)">/**</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="requestMethod"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.associationEnd</span>
multiplicity="(1 1)"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">private</span> HTTPVerb <span style="color:#2121c4">requestMethod</span> = HTTPVerb.<span style="color:#2121c4">GET</span>;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span> name="endpoint"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075">//<span style="white-space:pre-wrap"> </span>private String endpoint = "<a href="http://ec2.amazonaws.com" target="_blank">ec2.amazonaws.com</a>";
// must be lowercase</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">private</span><span style="color:#000000"> String </span><span style="color:#2121c4">endpoint</span><span style="color:#000000"> = </span><span style="color:#492df6">"localhost:4567"</span><span style="color:#000000">; </span>// must be lowercase</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="awsAccessKeyId"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">private</span><span style="color:#000000"> String </span><span style="color:#2121c4">awsAccessKeyId</span><span style="color:#000000">; </span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="awsSecretKey"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">private</span><span style="color:#000000"> String </span><span style="color:#2121c4">awsSecretKey</span><span style="color:#000000">; </span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="secretKeySpec"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.associationEnd</span>
multiplicity="(1 1)"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">private</span> SecretKeySpec <span style="color:#2121c4">secretKeySpec</span> = <span style="color:#971365">null</span>;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span> name="mac"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.associationEnd</span>
multiplicity="(1 1)"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#971365"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>private<span style="color:#000000"> Mac </span><span style="color:#2121c4">mac</span><span style="color:#000000">
= </span>null<span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><span style="white-space:pre-wrap"> </span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> SignedRequests(String
awsAccessKeyId, String awsSecretKey)</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">this</span>.setAwsAccessKeyId(awsAccessKeyId);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">this</span>.setAwsSecretKey(awsSecretKey);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>setDefault();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><span style="white-space:pre-wrap"> </span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Monaco"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">private</span> <span style="color:#971365">void</span> setDefault() {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#971365"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>try</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">byte</span>[] secretyKeyBytes = <span style="color:#2121c4">awsSecretKey</span>.getBytes(<span style="color:#2121c4">UTF8_CHARSET</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>secretKeySpec<span style="color:#000000"> =</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">new</span>
SecretKeySpec(secretyKeyBytes, <span style="color:#2121c4">HMAC_SHA256_ALGORITHM</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#2121c4">mac</span> = Mac.getInstance(<span style="color:#2121c4">HMAC_SHA256_ALGORITHM</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>mac<span style="color:#000000">.init(</span>secretKeySpec<span style="color:#000000">);</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>} <span style="color:#971365">catch</span>
(UnsupportedEncodingException e) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>e.printStackTrace();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>} <span style="color:#971365">catch</span> (NoSuchAlgorithmException
e) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>e.printStackTrace();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>} <span style="color:#971365">catch</span> (InvalidKeyException e) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>e.printStackTrace();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> String
sign(Map<String, String> params) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>params.put(<span style="color:#492df6">"AWSAccessKeyId"</span>, <span style="color:#2121c4">awsAccessKeyId</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>params.put(<span style="color:#492df6">"Timestamp"</span>, timestamp());</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>SortedMap<String,
String> sortedParamMap =</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">new</span> TreeMap<String,
String>(params);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
canonicalQS = canonicalize(sortedParamMap);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
toSign =</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#2121c4">requestMethod</span>.toString() + <span style="color:#492df6">"\n"</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>+ <span style="color:#2121c4">endpoint</span> + <span style="color:#492df6">"\n"</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span>+
</span>REQUEST_URI<span style="color:#000000"> + </span><span style="color:#492df6">"\n"</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>+
canonicalQS;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
hmac = hmac(toSign);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
sig = percentEncodeRfc3986(hmac);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075">//<span style="white-space:pre-wrap"> </span>String url = <a>"https://"</a> +
endpoint + REQUEST_URI + "?" +</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#479075">//<span style="white-space:pre-wrap"> </span>canonicalQS +
"&Signature=" + sig;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
url = <span style="color:#492df6"><a>"http://"</a></span> + <span style="color:#2121c4">endpoint</span> + <span style="color:#2121c4">REQUEST_URI</span> + <span style="color:#492df6">"?"</span> +</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>canonicalQS
+ <span style="color:#492df6">"&Signature="</span> + sig;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><span style="white-space:pre-wrap"> </span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><span style="white-space:pre-wrap"> </span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">return</span> url;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">private</span> String hmac(String
stringToSign) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
signature = <span style="color:#971365">null</span>;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">byte</span>[] data;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">byte</span>[] rawHmac;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">try</span> {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>data
= stringToSign.getBytes(<span style="color:#2121c4">UTF8_CHARSET</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>rawHmac
= <span style="color:#2121c4">mac</span>.doFinal(data);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>Base64
encoder = <span style="color:#971365">new</span> Base64();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>signature
= <span style="color:#971365">new</span>
String(encoder.encode(rawHmac));</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>} <span style="color:#971365">catch</span>
(UnsupportedEncodingException e) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">throw</span> <span style="color:#971365">new</span> RuntimeException(<span style="color:#2121c4">UTF8_CHARSET</span> + <span style="color:#492df6">" is unsupported!"</span>, e);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">return</span> signature;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">private</span> String timestamp() {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
timestamp = <span style="color:#971365">null</span>;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>Calendar
cal = Calendar.getInstance();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>DateFormat
dfm = <span style="color:#971365">new</span>
SimpleDateFormat(<span style="color:#492df6">"yyyy-MM-dd'T'HH:mm:ss'Z'"</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>dfm.setTimeZone(TimeZone.getTimeZone(<span style="color:#492df6">"GMT"</span>));</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>timestamp
= dfm.format(cal.getTime());</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">return</span> timestamp;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">private</span> String
canonicalize(SortedMap<String, String> sortedParamMap)</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">if</span> (sortedParamMap.isEmpty()) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#971365"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>return<span style="color:#000000"> </span><span style="color:#492df6">""</span><span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>StringBuffer
buffer = <span style="color:#971365">new</span>
StringBuffer();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>Iterator<Map.Entry<String,
String>> iter =</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>sortedParamMap.entrySet().iterator();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">while</span> (iter.hasNext()) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>Map.Entry<String,
String> kvpair = iter.next();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>buffer.append(percentEncodeRfc3986(kvpair.getKey()));</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>buffer.append(<span style="color:#492df6">"="</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>buffer.append(percentEncodeRfc3986(kvpair.getValue()));</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">if</span> (iter.hasNext()) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>buffer.append(<span style="color:#492df6">"&"</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
cannoical = buffer.toString();</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">return</span> cannoical;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">private</span> String
percentEncodeRfc3986(String s) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>String
out;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">try</span> {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>out
= URLEncoder.encode(s, <span style="color:#2121c4">UTF8_CHARSET</span>)</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>.replace(<span style="color:#492df6">"+"</span>, <span style="color:#492df6">"%20"</span>)</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>.replace(<span style="color:#492df6">"*"</span>, <span style="color:#492df6">"%2A"</span>)</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>.replace(<span style="color:#492df6">"%7E"</span>, <span style="color:#492df6">"~"</span>);</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>} <span style="color:#971365">catch</span>
(UnsupportedEncodingException e) {</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>out
= s;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">return</span> out;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@param</span> verb</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="requestMethod"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> <span style="color:#971365">void</span> setRequestMethod(HTTPVerb
verb )</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">this</span><span style="color:#000000">.</span>requestMethod<span style="color:#000000"> = verb;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#90afc8"><span style="color:#5275c5"><span style="white-space:pre-wrap"> </span> *
</span>@return</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="requestMethod"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> HTTPVerb
getRequestMethod()</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">return</span><span style="color:#000000"> </span>requestMethod<span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@param</span> keyId</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="awsAccessKeyId"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> <span style="color:#971365">void</span> setAwsAccessKeyId(String
keyId)</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">this</span><span style="color:#000000">.</span>awsAccessKeyId<span style="color:#000000"> = keyId;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#90afc8"><span style="color:#5275c5"><span style="white-space:pre-wrap"> </span> *
</span>@return</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="awsAccessKeyId"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> String
getAwsAccessKeyId()</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">return</span><span style="color:#000000"> </span><span style="color:#971365">this</span><span style="color:#000000">.</span>awsAccessKeyId<span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@param</span> secretKey</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="awsSecretKey"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> <span style="color:#971365">void</span> setAwsSecretKey (String
secretKey)</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">this</span>.<span style="color:#2121c4">awsSecretKey</span> = secretKey;</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span>/**</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#90afc8"><span style="color:#5275c5"><span style="white-space:pre-wrap"> </span> *
</span>@return</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> * <span style="color:#90afc8">@uml.property</span>
name="awsSecretKey"</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#5275c5"><span style="white-space:pre-wrap"> </span> */</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span><span style="color:#971365">public</span> String getAwsSecretKey
()</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>{</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;color:#2121c4"><span style="color:#000000"><span style="white-space:pre-wrap"> </span></span><span style="color:#971365">return</span><span style="color:#000000"> </span><span style="color:#971365">this</span><span style="color:#000000">.</span>awsSecretKey<span style="color:#000000">;</span></p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco"><span style="white-space:pre-wrap"> </span>}</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco;min-height:15.0px"><br>
</p>
<p style="margin:0px 0px 0px 0px;font:11.0px Monaco">}</p>
</div>
<div><br>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opennebula.org" target="_blank">Users@lists.opennebula.org</a>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre cols="72">--
Olivier Sallou
IRISA / University of Rennes 1
Campus de Beaulieu, 35000 RENNES - FRANCE
Tel: 02.99.84.71.95
gpg key id: 4096R/326D8438 (<a href="http://keyring.debian.org" target="_blank">keyring.debian.org</a>)
Key fingerprint = 5FB4 6F83 D3B9 5204 6335 D26D 78DC 68DB 326D 8438
</pre>
</font></span></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br>