Skip to content

Commit 24e9797

Browse files
author
Likitha Shetty
committed
CLOUDSTACK-3112. UserCredentials that is injected in AuthenticationHandler is not picked up
1 parent 814630c commit 24e9797

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

awsapi/src/com/cloud/bridge/auth/ec2/AuthenticationHandler.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939

4040
import com.cloud.bridge.model.UserCredentialsVO;
4141
import com.cloud.bridge.persist.dao.UserCredentialsDao;
42+
import com.cloud.bridge.persist.dao.UserCredentialsDaoImpl;
4243
import com.cloud.bridge.service.UserContext;
4344
import com.cloud.bridge.util.AuthenticationUtils;
4445

4546

4647
public class AuthenticationHandler implements Handler {
4748
protected final static Logger logger = Logger.getLogger(AuthenticationHandler.class);
48-
@Inject protected UserCredentialsDao ucDao;
4949
private DocumentBuilderFactory dbf = null;
5050

5151
protected HandlerDescription handlerDesc = new HandlerDescription( "EC2AuthenticationHandler" );
@@ -117,9 +117,7 @@ public InvocationResponse invoke(MessageContext msgContext) throws AxisFault
117117
logger.debug( "X509 cert's uniqueId: " + uniqueId );
118118

119119
// -> find the Cloud API key and the secret key from the cert's uniqueId
120-
/* UserCredentialsDao credentialDao = new UserCredentialsDao();
121-
UserCredentials cloudKeys = credentialDao.getByCertUniqueId( uniqueId );
122-
*/
120+
UserCredentialsDao ucDao = new UserCredentialsDaoImpl();
123121
UserCredentialsVO cloudKeys = ucDao.getByCertUniqueId(uniqueId);
124122
if ( null == cloudKeys ) {
125123
logger.error( "Cert does not map to Cloud API keys: " + uniqueId );

0 commit comments

Comments
 (0)