Examples of AmazonSecurityContext


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

                    OMElement amazon = x.getFirstChildWithName(new QName(null, AMAZON));

                    if (amazon != null) {

                        AmazonSecurityContext amazonSecurityContext = new AmazonSecurityContext();

                        OMElement accessKey = amazon.getFirstChildWithName(new QName(null, ACCESS_KEY_ID));
                        OMElement secretKey = amazon.getFirstChildWithName(new QName(null, SECRET_ACCESS_KEY));

                        amazonSecurityContext.setAccessKey(accessKey.getText());
                        amazonSecurityContext.setSecretKey(secretKey.getText());

                        // set to context
                        MessageContextUtil.addContextToProperty(msgContext, GFacService.SECURITY_CONTEXT, "amazon",
                                amazonSecurityContext);
                    }
View Full Code Here

Examples of org.apache.airavata.gfac.context.security.AmazonSecurityContext

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

Examples of org.apache.airavata.gfac.context.security.AmazonSecurityContext

        jobExecutionContext.setApplicationContext(applicationContext);
        applicationContext.setServiceDescription(serv);
        applicationContext.setApplicationDeploymentDescription(ec2Desc);
        applicationContext.setHostDescription(host);

        AmazonSecurityContext amazonSecurityContext =
                new AmazonSecurityContext(userName, accessKey, secretKey, instanceId);
        jobExecutionContext.addSecurityContext(AmazonSecurityContext.AMAZON_SECURITY_CONTEXT, amazonSecurityContext);

        MessageContext inMessage = new MessageContext();
        ActualParameter genomeInput1 = new ActualParameter();
        ((StringParameterType)genomeInput1.getType()).setValue(sequence1);
View Full Code Here

Examples of org.apache.airavata.gfac.context.security.AmazonSecurityContext

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

Examples of org.apache.airavata.gfac.context.security.AmazonSecurityContext

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

Examples of org.apache.airavata.gfac.context.security.AmazonSecurityContext

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

Examples of org.apache.airavata.gfac.ec2.AmazonSecurityContext

            /* If there is a instance control component connects to this
             * component send information in soap header */
            for (Node n : wsNode.getControlInPort().getFromNodes()) {
                if (n instanceof InstanceNode) {
                    AmazonSecurityContext amazonSecurityContext;
                    final String awsAccessKeyId = config.getAwsAccessKey();
                    final String awsSecretKey = config.getAwsSecretKey();
                    final String username = ((InstanceNode) n).getUsername();

                    if (((InstanceNode) n).isStartNewInstance()) {
                        final String amiId = ((InstanceNode) n).getIdAsValue();
                        final String instanceType = ((InstanceNode) n).getInstanceType();

                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, amiId, instanceType);
                    } else {
                        final String instanceId = ((InstanceNode) n).getIdAsValue();
                        amazonSecurityContext =
                                new AmazonSecurityContext(username, awsAccessKeyId, awsSecretKey, instanceId);
                    }

                    this.config.getConfiguration().setAmazonSecurityContext(amazonSecurityContext);
                }
            }
View Full Code Here

Examples of org.ogce.gfac.context.impl.AmazonSecurityContext

  @Override
  public void initialize(InvocationContext invocationContext) throws GfacException {
    ExecutionContext appExecContext = invocationContext.getExecutionContext();
    ExecutionModel model = appExecContext.getExecutionModel();
   
    AmazonSecurityContext amazonSecurityContext = ((AmazonSecurityContext) invocationContext.getSecurityContext(AMAZON_SECURITY_CONTEXT));
    String access_key = amazonSecurityContext.getAccessKey();
    String secret_key = amazonSecurityContext.getSecretKey();

    //TODO way to read value (header or xregistry)
    String ami_id = "";
    String ins_type = "";
    String ins_id = "";
View Full Code Here

Examples of org.ogce.gfac.context.impl.AmazonSecurityContext

        OMElement amazon = x.getFirstChildWithName(new QName(null, AMAZON));

        if (amazon != null) {

          AmazonSecurityContext amazonSecurityContext = new AmazonSecurityContext();

          OMElement accessKey = amazon.getFirstChildWithName(new QName(null, ACCESS_KEY_ID));
          OMElement secretKey = amazon.getFirstChildWithName(new QName(null, SECRET_ACCESS_KEY));

          amazonSecurityContext.setAccessKey(accessKey.getText());
          amazonSecurityContext.setSecretKey(secretKey.getText());

          // set to context
          MessageContextUtil.addContextToProperty(msgContext, GfacService.SECURITY_CONTEXT, "amazon",amazonSecurityContext);
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.