|| registeredHost.getType() instanceof GsisshHostType) {
SecurityContextDocument.SecurityContext.CredentialManagementService credentialManagementService
= getCredentialManagementService(contextHeader);
GSISecurityContext context;
String gatewayId = contextHeader.getSecurityContext().getCredentialManagementService().getGatewayId();
if (credentialManagementService != null) {
String tokenId
= credentialManagementService.getTokenId();
String portalUser = credentialManagementService.getPortalUser();
requestData = new RequestData(tokenId, portalUser, gatewayId);
} else {
requestData = new RequestData(gatewayId);
}
try {
context = new GSISecurityContext(CredentialReaderFactory.createCredentialStoreReader(), requestData);
} catch (Exception e) {
throw new WorkflowException("An error occurred while creating GSI security context", e);
}
if (registeredHost.getType() instanceof GsisshHostType) {
GSIAuthenticationInfo authenticationInfo
= new MyProxyAuthenticationInfo(requestData.getMyProxyUserName(), requestData.getMyProxyPassword(), requestData.getMyProxyServerUrl(),
requestData.getMyProxyPort(), requestData.getMyProxyLifeTime(), System.getProperty(Constants.TRUSTED_CERTIFICATE_SYSTEM_PROPERTY));
ServerInfo serverInfo = new ServerInfo(requestData.getMyProxyUserName(), registeredHost.getType().getHostAddress());
Cluster pbsCluster = null;
try {
pbsCluster = new PBSCluster(serverInfo, authenticationInfo,
(((HpcApplicationDeploymentType) jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType()).getInstalledParentPath()));
} catch (SSHApiException e) {
e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
}
context.setPbsCluster(pbsCluster);
}
jobExecutionContext.addSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT, context);
} else if (registeredHost.getType() instanceof Ec2HostType) {
if (this.configuration.getAmazonSecurityContext() != null) {