private SSLAuthenticator getSSLAuthenticator() { if (this.sslAuthenticator == null) { this.sslAuthenticator = new SSLAuthenticator() { @Override public Valve getNext() { return new ValveBase() { @Override public void invoke(Request request, Response response) throws IOException, ServletException { // no-op } }; } }; this.sslAuthenticator.setContainer(getContainer()); try { this.sslAuthenticator.start(); } catch (LifecycleException e) { throw new RuntimeException("Error starting SSL authenticator.", e); } } return this.sslAuthenticator; }
String msg = MessageFormat.format(rb.getString(LogFacade.PRINCIPAL_BEEN_AUTHENTICATED_INFO), principal.getName()); log(msg); (HttpServletResponse) response.getResponse(); if (debug >= 1) log(rb.getString(LogFacade.LOOK_UP_CERTIFICATE_INFO)); log(rb.getString(LogFacade.NO_CERTIFICATE_INCLUDED_INFO)); if (principal == null) { if (debug >= 1) log("Realm.authenticate() returned false"); register(request, response, principal, Constants.CERT_METHOD, null, null); String ssoId = (String) request.getNote(Constants.REQ_SSOID_NOTE); if (ssoId != null) { getSession(request, true);
associate(ssoId, request.getSessionInternal(true)); return (true); if (getContainer().getLogger().isDebugEnabled()) getContainer().getLogger().debug(" No certificates included with this request"); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, MESSAGES.missingRequestCertificate()); if (getContainer().getLogger().isDebugEnabled()) getContainer().getLogger().debug(" Realm.authenticate() returned false"); response.sendError(HttpServletResponse.SC_UNAUTHORIZED, MESSAGES.certificateAuthenticationFailure()); register(request, response, principal, HttpServletRequest.CLIENT_CERT_AUTH, null, null); return (true);
if (checkForCachedAuthentication(request, response, false)) { return true; X509Certificate certs[] = getRequestCertificates(request); register(request, response, principal, HttpServletRequest.CLIENT_CERT_AUTH, null, null); return true;
this.addValve(new DigestAuthenticator()); } else if ("CLIENT-CERT".equals(authMethod) ){ this.addValve(new SSLAuthenticator());
if (getIdpConfiguration().isSSLClientAuthentication()) { if (request.isSecure()) { getSSLAuthenticator().invoke(request, response);
if (checkForCachedAuthentication(request, response, false)) { return true; X509Certificate certs[] = getRequestCertificates(request); register(request, response, principal, HttpServletRequest.CLIENT_CERT_AUTH, null, null); return true;
context.addValve(new DigestAuthenticator()); } else if ("CLIENT-CERT".equals(authMethod)) { context.addValve(new SSLAuthenticator()); } else if ("NONE".equals(authMethod)) { context.addValve(new NonLoginAuthenticator());
if (getIdpConfiguration().isSSLClientAuthentication()) { if (request.isSecure()) { getSSLAuthenticator().invoke(request, response);
private SSLAuthenticator getSSLAuthenticator() { if (this.sslAuthenticator == null) { this.sslAuthenticator = new SSLAuthenticator() { @Override public Valve getNext() { return new ValveBase() { @Override public void invoke(Request request, Response response) throws IOException, ServletException { // no-op } }; } }; this.sslAuthenticator.setContainer(getContainer()); try { this.sslAuthenticator.start(); } catch (LifecycleException e) { throw new RuntimeException("Error starting SSL authenticator.", e); } } return this.sslAuthenticator; }
context.addValve(new DigestAuthenticator()); } else if ("CLIENT-CERT".equals(authMethod)) { context.addValve(new SSLAuthenticator()); } else if ("NONE".equals(authMethod)) { context.addValve(new NonLoginAuthenticator());
if (getIdpConfiguration().isSSLClientAuthentication()) { if (request.isSecure()) { getSSLAuthenticator().invoke(request, response);
private SSLAuthenticator getSSLAuthenticator() { if (this.sslAuthenticator == null) { this.sslAuthenticator = new SSLAuthenticator() { @Override public Valve getNext() { return new ValveBase() { @Override public void invoke(Request request, Response response) throws IOException, ServletException { // no-op } }; } }; this.sslAuthenticator.setContainer(getContainer()); try { this.sslAuthenticator.start(); } catch (LifecycleException e) { throw new RuntimeException("Error starting SSL authenticator.", e); } } return this.sslAuthenticator; }
ctx.getPipeline().addValve(new SSLAuthenticator()); logger.info("Auth Method is CLIENT-CERT");