CLOUDSTACK-3295. Code should look for xes.keystore under cloud-awsapi-4.2.0-SNAPSHOT and not under generated-webapp.

This commit is contained in:
Likitha Shetty 2013-07-03 12:28:24 +05:30
parent 43ab9506ab
commit c08b927b86
2 changed files with 6 additions and 10 deletions

View File

@ -334,7 +334,7 @@
</connectors>
<contextPath>/awsapi</contextPath>
<webXml>${basedir}/web/web.xml</webXml>
<webAppSourceDirectory>${basedir}/target/generated-webapp</webAppSourceDirectory>
<webAppSourceDirectory>${project.build.directory}/${project.build.finalName}</webAppSourceDirectory>
</configuration>
</plugin>
<plugin>

View File

@ -399,14 +399,12 @@ public class EC2RestServlet extends HttpServlet {
}
try {
txn = Transaction.open(Transaction.AWSAPI_DB);
txn.start();
// -> use the keys to see if the account actually exists
ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
/* UserCredentialsDao credentialDao = new UserCredentialsDao();
credentialDao.setUserKeys( );
*/ UserCredentialsVO user = new UserCredentialsVO(accessKey[0], secretKey[0]);
ucDao.persist(user);
txn.commit();
UserCredentialsVO user = new UserCredentialsVO(accessKey[0], secretKey[0]);
ucDao.persist(user);
txn.commit();
} catch( Exception e ) {
logger.error("SetUserKeys " + e.getMessage(), e);
response.setStatus(401);
@ -472,10 +470,8 @@ public class EC2RestServlet extends HttpServlet {
// [C] Associate the cert's uniqueId with the Cloud API keys
String uniqueId = AuthenticationUtils.X509CertUniqueId( userCert );
logger.debug( "SetCertificate, uniqueId: " + uniqueId );
/* UserCredentialsDao credentialDao = new UserCredentialsDao();
credentialDao.setCertificateId( accessKey[0], uniqueId );
*/
txn = Transaction.open(Transaction.AWSAPI_DB);
txn.start();
UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
user.setCertUniqueId(uniqueId);
ucDao.update(user.getId(), user);