@Override public int getRemainingLifetime() throws GSSException { return credential.getRemainingLifetime(); }
public boolean needsRefresh() throws GSSException { return clientCredential.getRemainingLifetime() < MIN_CREDENTIAL_LIFETIME.getValue(SECONDS); } }
public boolean needsRefresh() throws GSSException { return clientCredential.getRemainingLifetime() < MIN_CREDENTIAL_LIFETIME.getValue(SECONDS); } }
@Override public GSSKerberosCredential create() throws GeneralSecurityException { GSSKerberosCredential currentCredentialCredential = cachedCredential; GSSCredential currentCredential = currentCredentialCredential != null ? currentCredentialCredential.getGssCredential() : null; try { if (currentCredential != null && currentCredential.getRemainingLifetime() >= minimumRemainingLifetime) { log.tracef("Used cached GSSCredential [%s]", currentCredential); return currentCredentialCredential; } log.tracef("No valid cached credential, obtaining new one..."); currentCredentialCredential = rawSupplier.get(); log.tracef("Obtained GSSCredentialCredential [%s]", currentCredentialCredential); this.cachedCredential = currentCredentialCredential; return currentCredentialCredential; } catch (GSSException e) { throw new GeneralSecurityException(e); } }
@Override public int getRemainingLifetime() throws GSSException { return credential.getRemainingLifetime(); }
@Override public int getRemainingLifetime() throws GSSException { return credential.getRemainingLifetime(); }
@Override public int getRemainingLifetime() throws GSSException { return credential.getRemainingLifetime(); }
@Override public int getRemainingLifetime() throws GSSException { return credential.getRemainingLifetime(); }
public boolean needsRefresh() throws GSSException { return clientCredential.getRemainingLifetime() < MIN_CREDENTIAL_LIFETIME.getValue(SECONDS); } }
public boolean needsRefresh() throws GSSException { return clientCredential.getRemainingLifetime() < MIN_CREDENTIAL_LIFETIME.getValue(SECONDS); } }
public boolean needsRefresh() throws GSSException { return clientCredential.getRemainingLifetime() < MIN_CREDENTIAL_LIFETIME.getValue(SECONDS); } }
public boolean needsRefresh() throws GSSException { return clientCredential.getRemainingLifetime() < MIN_CREDENTIAL_LIFETIME.getValue(SECONDS); } }
/** */ private static synchronized CallbackHandler initCallbackHandler(GSSCredential cred) throws GSSException, GramException { if (cred == null) { throw new IllegalArgumentException("cred == null"); } CallbackHandler handler = (CallbackHandler)callbackHandlers.get(cred); if (handler == null) { try { handler = new CallbackHandler(cred, 0); // sets socket timeout to max cred lifetime handler.setTimeout(cred.getRemainingLifetime()); callbackHandlers.put(cred, handler); } catch(IOException e) { throw new GramException(GramException.INIT_CALLBACK_HANDLER_FAILED, e); } } return handler; }
private void renewCredentials(GramJob job) { try { int proxyExpTime = job.getCredentials().getRemainingLifetime(); if (proxyExpTime < GSISecurityContext.CREDENTIAL_RENEWING_THRESH_HOLD) { log.info("Job proxy expired. Trying to renew proxy"); GSSCredential gssCred = ((GSISecurityContext)context. getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).renewCredentials(); job.renew(gssCred); log.info("MyProxy credentials are renewed ."); } } catch (Exception e) { log.error("An error occurred while trying to renew credentials. Job id " + job.getIDAsString()); } }
public GSSCredential getGssCredentails() throws SecurityException { try { System.out.println(gssCredentails); if (gssCredentails == null || gssCredentails.getRemainingLifetime() < 10 * 90) { if (proxyRenewer != null) { gssCredentails = proxyRenewer.renewProxy(); } else if (myproxyUserName != null && myproxyPasswd != null && myproxyServer != null) { this.proxyRenewer = new MyProxyManager(myproxyUserName, myproxyPasswd, MyProxy.MYPROXY_SERVER_PORT, myproxyLifetime, myproxyServer,trustedCertLoc); log.info("loaded credentails from Proxy server"); gssCredentails = this.proxyRenewer.renewProxy(); } } return gssCredentails; } catch (Exception e) { throw new SecurityException(e.getMessage(), e); } }
@Override public GSSKerberosCredential create() throws GeneralSecurityException { GSSKerberosCredential currentCredentialCredential = cachedCredential; GSSCredential currentCredential = currentCredentialCredential != null ? currentCredentialCredential.getGssCredential() : null; try { if (currentCredential != null && currentCredential.getRemainingLifetime() >= minimumRemainingLifetime) { log.tracef("Used cached GSSCredential [%s]", currentCredential); return currentCredentialCredential; } log.tracef("No valid cached credential, obtaining new one..."); currentCredentialCredential = rawSupplier.get(); log.tracef("Obtained GSSCredentialCredential [%s]", currentCredentialCredential); this.cachedCredential = currentCredentialCredential; return currentCredentialCredential; } catch (GSSException e) { throw new GeneralSecurityException(e); } }
@Override public GSSKerberosCredential create() throws GeneralSecurityException { GSSKerberosCredential currentCredentialCredential = cachedCredential; GSSCredential currentCredential = currentCredentialCredential != null ? currentCredentialCredential.getGssCredential() : null; try { if (currentCredential != null && currentCredential.getRemainingLifetime() >= minimumRemainingLifetime) { log.tracef("Used cached GSSCredential [%s]", currentCredential); return currentCredentialCredential; } log.tracef("No valid cached credential, obtaining new one..."); currentCredentialCredential = rawSupplier.get(); log.tracef("Obtained GSSCredentialCredential [%s]", currentCredentialCredential); this.cachedCredential = currentCredentialCredential; return currentCredentialCredential; } catch (GSSException e) { throw new GeneralSecurityException(e); } }
@Override public GSSKerberosCredential create() throws GeneralSecurityException { GSSKerberosCredential currentCredentialCredential = cachedCredential; GSSCredential currentCredential = currentCredentialCredential != null ? currentCredentialCredential.getGssCredential() : null; try { if (currentCredential != null && currentCredential.getRemainingLifetime() >= minimumRemainingLifetime) { log.tracef("Used cached GSSCredential [%s]", currentCredential); return currentCredentialCredential; } log.tracef("No valid cached credential, obtaining new one..."); currentCredentialCredential = rawSupplier.get(); log.tracef("Obtained GSSCredentialCredential [%s]", currentCredentialCredential); this.cachedCredential = currentCredentialCredential; return currentCredentialCredential; } catch (GSSException e) { throw new GeneralSecurityException(e); } }
@Override public GSSKerberosCredential create() throws GeneralSecurityException { GSSKerberosCredential currentCredentialCredential = cachedCredential; GSSCredential currentCredential = currentCredentialCredential != null ? currentCredentialCredential.getGssCredential() : null; try { if (currentCredential != null && currentCredential.getRemainingLifetime() >= minimumRemainingLifetime) { log.tracef("Used cached GSSCredential [%s]", currentCredential); return currentCredentialCredential; } log.tracef("No valid cached credential, obtaining new one..."); currentCredentialCredential = rawSupplier.get(); log.tracef("Obtained GSSCredentialCredential [%s]", currentCredentialCredential); this.cachedCredential = currentCredentialCredential; return currentCredentialCredential; } catch (GSSException e) { throw new GeneralSecurityException(e); } }
int left = -1; try { left = gssCredential.getRemainingLifetime(); } catch (GSSException e) { log.warn(sm.getString("coyoteRequest.gssLifetimeFail",