String uniqueId = AuthenticationUtils.X509CertUniqueId(userCert);
logger.debug("X509 cert's uniqueId: " + uniqueId);
// -> find the Cloud API key and the secret key from the cert's uniqueId
UserCredentialsDao ucDao = new UserCredentialsDaoImpl();
UserCredentialsVO cloudKeys = ucDao.getByCertUniqueId(uniqueId);
if (null == cloudKeys) {
logger.error("Cert does not map to Cloud API keys: " + uniqueId);
throw new AxisFault("User not properly registered: Certificate does not map to Cloud API Keys", "Client.Blocked");
} else
UserContext.current().initContext(cloudKeys.getAccessKey(), cloudKeys.getSecretKey(), cloudKeys.getAccessKey(), "SOAP Request", null);
//System.out.println( "end of cert match: " + UserContext.current().getSecretKey());
}
} catch (AxisFault e) {
throw e;
} catch (Exception e) {