Package org.ietf.jgss

Examples of org.ietf.jgss.GSSCredential


      // Kerberos Principal Name Form
      Oid principalName=new Oid("1.2.840.113554.1.2.2.1");

      GSSManager mgr=GSSManager.getInstance();

      GSSCredential crd=null;
      /*
      try{
        GSSName _user=mgr.createName(user, principalName);
        crd=mgr.createCredential(_user,
                                 GSSCredential.DEFAULT_LIFETIME,
View Full Code Here


            ) throws GSSException{
        GSSManager manager = GSSManager.getInstance();
        Oid oid = null;
        GSSName serviceName = null;
        GSSName clientName = null;
        GSSCredential clientCreds = null;
       
        oid = new Oid(OID);

        serviceName = manager.createName(
                service + "@" + host, GSSName.NT_HOSTBASED_SERVICE, oid);
View Full Code Here

        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
        GridFtp ftp = new GridFtp();

        try {
            GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentails();

            if (gridFTPEndpointArray == null || gridFTPEndpointArray.length == 0) {
              gridFTPEndpointArray = new String[]{hostType.getHostAddress()};
            }
            boolean success = false;
View Full Code Here


        ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();
        GridFtp ftp = new GridFtp();
        URI destURI = null;
        GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentails();

        for (String endpoint : gridFTPEndpointArray) {
            URI inputURI = GFacUtils.createGsiftpURI(endpoint, app.getInputDataDirectory());
            String fileName = new File(gridftpURL.getPath()).getName();
            String s = inputURI.getPath() + File.separator + fileName;
View Full Code Here

       GridFtp ftp = new GridFtp();
       File localStdErrFile = null;
       Map<String, ActualParameter> stringMap = new HashMap<String, ActualParameter>();
       try {
          GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentails();
          String[] hostgridFTP = gridFTPEndpointArray;
            if (hostgridFTP == null || hostgridFTP.length == 0) {
                hostgridFTP = new String[]{hostName};
            }
            for (String endpoint : gridFTPEndpointArray) {
View Full Code Here

        for (String paramName : parameters.keySet()) {
            ActualParameter actualParameter = (ActualParameter) parameters
                    .get(paramName);

            GridFtp ftp = new GridFtp();
            GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentails();
            try {
                if ("URI".equals(actualParameter.getType().getType().toString())) {
                    for (String endpoint : gridFTPEndpointArray) {
                        ((URIParameterType) actualParameter.getType()).setValue(doStaging(outputFileStagingPath,
                                MappingFactory.toString(actualParameter), ftp, gssCred, endpoint));
View Full Code Here

    public void waitFor() throws InterruptedException, GSSException, GramException, SecurityException,GFacException {
        while (!isFinished()) {
            int proxyExpTime = job.getCredentials().getRemainingLifetime();
            if (proxyExpTime < JOB_PROXY_REMAINING_TIME_LIMIT) {
                log.info("Job proxy expired. Trying to renew proxy");
                GSSCredential gssCred = ((GSISecurityContext)context.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentails();
                job.renew(gssCred);
                log.info("Myproxy renewed");
            }

            synchronized (this) {
View Full Code Here

    public GSSCredential renewProxy() throws MyProxyException, IOException {
        init();
       
        String proxyloc = null;
        MyProxy myproxy = new MyProxy(hostname, port);
        GSSCredential proxy = myproxy.get(username, password, lifetime);
        GlobusCredential globusCred = null;
        if (proxy instanceof GlobusGSSCredentialImpl) {
            globusCred = ((GlobusGSSCredentialImpl) proxy).getGlobusCredential();
            log.debug("got proxy from myproxy for " + username + " with " + lifetime + " lifetime.");
            String uid = username;
View Full Code Here

    // this should be reused by the above method
    public GlobusCredential getGlobusCredential() throws Exception{
    init();
    String proxyloc = null;
    MyProxy myproxy = new MyProxy(hostname, port);
    GSSCredential proxy = myproxy.get(username, password, lifetime);
    GlobusCredential globusCred = null;
    if (proxy instanceof GlobusGSSCredentialImpl) {
      globusCred = ((GlobusGSSCredentialImpl) proxy)
          .getGlobusCredential();
      log.debug("got proxy from myproxy for " + username + " with "
View Full Code Here

                    if (!auth.validateInitialUser(session, username)) {
                        return Boolean.FALSE;
                    }

                    GSSManager mgr = auth.getGSSManager();
                    GSSCredential creds = auth.getGSSCredential(mgr);

                    if (creds == null) {
                        return Boolean.FALSE;
                    }
View Full Code Here

TOP

Related Classes of org.ietf.jgss.GSSCredential

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.