return null;
}
private void addSecurityContext(HostDescription registeredHost, Properties configurationProperties,
JobExecutionContext jobExecutionContext, ContextHeaderDocument.ContextHeader contextHeader) throws WorkflowException {
RequestData requestData;
/* todo fix the credential store and uncomment following code block
SecurityContextDocument.SecurityContext.CredentialManagementService credentialManagementService
= getCredentialManagementService(contextHeader);
GSISecurityContext context;
if (credentialManagementService != null) {
String gatewayId = credentialManagementService.getGatewayId();
String tokenId
= credentialManagementService.getTokenId();
String portalUser = credentialManagementService.getPortalUser();
requestData = new RequestData(tokenId, portalUser, gatewayId);
} else {
requestData = new RequestData("default");
}
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);
}
*/
requestData = new RequestData("default");
GSISecurityContext context;
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 {
String installedParentPath = ((HpcApplicationDeploymentType)
jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType()).getInstalledParentPath();