Package org.apache.airavata.core.gfac.context.security.impl

Examples of org.apache.airavata.core.gfac.context.security.impl.GSISecurityContext


            DefaultExecutionContext ec = new DefaultExecutionContext();
            ec.addNotifiable(new LoggingNotification());
            ct.setExecutionContext(ec);


            GSISecurityContext gsiSecurityContext = new GSISecurityContext();
            gsiSecurityContext.setMyproxyServer(properties.getProperty("myproxy.server"));
            gsiSecurityContext.setMyproxyUserName(properties.getProperty("myproxy.username"));
            gsiSecurityContext.setMyproxyPasswd(properties.getProperty("myproxy.password"));
            gsiSecurityContext.setMyproxyLifetime(14400);
            gsiSecurityContext.setTrustedCertLoc(properties.getProperty("certificate.path"));

            ct.addSecurityContext(MYPROXY, gsiSecurityContext);

            ct.setServiceName("SimpleEcho");
View Full Code Here


            invocationContext.getExecutionContext().setRegistryService(getRegistry(context));
            invocationContext.getExecutionContext().setSecurityContextHeader(getHeader(messageContext));
            invocationContext.getExecutionContext().addNotifiable(workflowNotification);
            invocationContext.getExecutionContext().addNotifiable(loggingNotification);

            GSISecurityContext gssContext = new GSISecurityContext();
            SecurityContextDocument parse =
                    SecurityContextDocument.Factory.parse(getHeader(messageContext).getFirstChildWithName
                            (new QName("http://schemas.airavata.apache.org/workflow-execution-context", "security-context")).toStringWithConsume());
            SecurityContextDocument.SecurityContext.GridMyproxyRepository gridMyproxyRepository = parse.getSecurityContext().getGridMyproxyRepository();
            if (gridMyproxyRepository==null){
              gssContext.setMyproxyPasswd((String)messageContext.getConfigurationContext().getProperty(MYPROXY_PASS));
                gssContext.setMyproxyUserName((String)messageContext.getConfigurationContext().getProperty(MYPROXY_USER));
                gssContext.setMyproxyLifetime(Integer.parseInt(messageContext.getConfigurationContext().getProperty(MYPROXY_LIFE).toString()));
                gssContext.setMyproxyServer((String)messageContext.getConfigurationContext().getProperty(MYPROXY_SERVER))
            }else{
              gssContext.setMyproxyPasswd(gridMyproxyRepository.getPassword());
              gssContext.setMyproxyUserName(gridMyproxyRepository.getUsername());
              gssContext.setMyproxyLifetime(gridMyproxyRepository.getLifeTimeInhours());
              gssContext.setMyproxyServer(gridMyproxyRepository.getMyproxyServer());
            }
            gssContext.setTrustedCertLoc((String)messageContext.getConfigurationContext().getProperty(TRUSTED_CERT_LOCATION));
           
            invocationContext.addSecurityContext("myproxy",gssContext);

            /*
             * Add workflow context
View Full Code Here

            String proxyServer = loadFromProperty(MYPROXY_SERVER, false);
            String proxyUser = loadFromProperty(MYPROXY_USER, false);
            String proxyPass = loadFromProperty(MYPROXY_PASS, false);
            String proxyTime = loadFromProperty(MYPROXY_LIFE, false);
            if (proxyServer != null && proxyUser != null && proxyPass != null) {
                GSISecurityContext gsi = new GSISecurityContext();
                gsi.setMyproxyServer(proxyServer);
                gsi.setMyproxyUserName(proxyUser);
                gsi.setMyproxyPasswd(proxyPass);
                if (proxyTime != null) {
                    gsi.setMyproxyLifetime(Integer.parseInt(proxyTime));
                }
                context.addSecurityContext(MYPROXY_SECURITY_CONTEXT, gsi);
            }
        }
View Full Code Here

        invocationContext.setServiceName(jobContext.getServiceName());
        invocationContext.getExecutionContext().setRegistryService(gfacConfig.getRegistry());
        invocationContext.getExecutionContext().addNotifiable(workflowNotification);
        invocationContext.getExecutionContext().addNotifiable(loggingNotification);

        GSISecurityContext gssContext = new GSISecurityContext();
//        if (gridMyproxyRepository == null) {
            gssContext.setMyproxyPasswd(gfacConfig.getMyProxyPassphrase());
            gssContext.setMyproxyUserName(gfacConfig.getMyProxyUser());
            gssContext.setMyproxyLifetime(gfacConfig.getMyProxyLifeCycle());
            gssContext.setMyproxyServer(gfacConfig.getMyProxyServer());
//        } else {
//            gssContext.setMyproxyPasswd(gridMyproxyRepository.getPassword());
//            gssContext.setMyproxyUserName(gridMyproxyRepository.getUsername());
//            gssContext.setMyproxyLifetime(gridMyproxyRepository.getLifeTimeInhours());
//            gssContext.setMyproxyServer(gridMyproxyRepository.getMyproxyServer());
//        }
        gssContext.setTrustedCertLoc(gfacConfig.getTrustedCertLocation());

        invocationContext.addSecurityContext("myproxy", gssContext);

        /*
    * Add workflow context
View Full Code Here

            String proxyServer = loadFromProperty(MYPROXY_SERVER, false);
            String proxyUser = loadFromProperty(MYPROXY_USER, false);
            String proxyPass = loadFromProperty(MYPROXY_PASS, false);
            String proxyTime = loadFromProperty(MYPROXY_LIFE, false);
            if (proxyServer != null && proxyUser != null && proxyPass != null) {
                GSISecurityContext gsi = new GSISecurityContext();
                gsi.setMyproxyServer(proxyServer);
                gsi.setMyproxyUserName(proxyUser);
                gsi.setMyproxyPasswd(proxyPass);
                if (proxyTime != null) {
                    gsi.setMyproxyLifetime(Integer.parseInt(proxyTime));
                }
                context.addSecurityContext(MYPROXY_SECURITY_CONTEXT, gsi);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.airavata.core.gfac.context.security.impl.GSISecurityContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.