mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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:
parent
43ab9506ab
commit
c08b927b86
@ -334,7 +334,7 @@
|
|||||||
</connectors>
|
</connectors>
|
||||||
<contextPath>/awsapi</contextPath>
|
<contextPath>/awsapi</contextPath>
|
||||||
<webXml>${basedir}/web/web.xml</webXml>
|
<webXml>${basedir}/web/web.xml</webXml>
|
||||||
<webAppSourceDirectory>${basedir}/target/generated-webapp</webAppSourceDirectory>
|
<webAppSourceDirectory>${project.build.directory}/${project.build.finalName}</webAppSourceDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@ -399,14 +399,12 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = Transaction.open(Transaction.AWSAPI_DB);
|
||||||
|
txn.start();
|
||||||
// -> use the keys to see if the account actually exists
|
// -> use the keys to see if the account actually exists
|
||||||
ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
|
ServiceProvider.getInstance().getEC2Engine().validateAccount( accessKey[0], secretKey[0] );
|
||||||
/* UserCredentialsDao credentialDao = new UserCredentialsDao();
|
UserCredentialsVO user = new UserCredentialsVO(accessKey[0], secretKey[0]);
|
||||||
credentialDao.setUserKeys( );
|
ucDao.persist(user);
|
||||||
*/ UserCredentialsVO user = new UserCredentialsVO(accessKey[0], secretKey[0]);
|
txn.commit();
|
||||||
ucDao.persist(user);
|
|
||||||
txn.commit();
|
|
||||||
|
|
||||||
} catch( Exception e ) {
|
} catch( Exception e ) {
|
||||||
logger.error("SetUserKeys " + e.getMessage(), e);
|
logger.error("SetUserKeys " + e.getMessage(), e);
|
||||||
response.setStatus(401);
|
response.setStatus(401);
|
||||||
@ -472,10 +470,8 @@ public class EC2RestServlet extends HttpServlet {
|
|||||||
// [C] Associate the cert's uniqueId with the Cloud API keys
|
// [C] Associate the cert's uniqueId with the Cloud API keys
|
||||||
String uniqueId = AuthenticationUtils.X509CertUniqueId( userCert );
|
String uniqueId = AuthenticationUtils.X509CertUniqueId( userCert );
|
||||||
logger.debug( "SetCertificate, uniqueId: " + uniqueId );
|
logger.debug( "SetCertificate, uniqueId: " + uniqueId );
|
||||||
/* UserCredentialsDao credentialDao = new UserCredentialsDao();
|
|
||||||
credentialDao.setCertificateId( accessKey[0], uniqueId );
|
|
||||||
*/
|
|
||||||
txn = Transaction.open(Transaction.AWSAPI_DB);
|
txn = Transaction.open(Transaction.AWSAPI_DB);
|
||||||
|
txn.start();
|
||||||
UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
|
UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]);
|
||||||
user.setCertUniqueId(uniqueId);
|
user.setCertUniqueId(uniqueId);
|
||||||
ucDao.update(user.getId(), user);
|
ucDao.update(user.getId(), user);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user