tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gael Abadin <>
Subject Demand CLIENT-CERT only on certain pages but demand SSL in all pages
Date Mon, 05 Oct 2015 11:05:11 GMT
Hello, fellow users.

I've been trying to configure tomcat to request client certificate
authentication on a single page, while serving every other SSL page without
requesting a client certificate (before or after authentication). Depending
on the configuration I use, one of 2 things happen: either I get a request
for a client certificate on ANY HTTPS page I visit first, or I do not get a
request at all, never, even when I launch the browser and go straight to
the protected page (/my-app-name/public/login/login.xhtml).

Am I doing something wrong or is this kind of configuration just not

Here is my web.xml security constraint and login config (I've also tried
ommitin <login-config>):

      <web-resource-name>Protected Context</web-resource-name>

And here is my server.xml config (I've also tried clientAuth="false" and

<?xml version="1.0" encoding="UTF-8"?>
<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener"/>

  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener SSLEngine="on"
  <!--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html -->
  <Listener className="org.apache.catalina.core.JasperListener"/>
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->

    <Resource auth="Container" description="User database that can be
updated and saved"
name="UserDatabase" pathname="conf/tomcat-users.xml"

  <Service name="Catalina">

    <Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1"

    <Connector SSLEnabled="true" clientAuth="want" maxThreads="150"
port="443" protocol="org.apache.coyote.http11.Http11Protocol"
scheme="https" secure="true" sslProtocol="TLS"/>

    <Connector port="8009" protocol="AJP/1.3" redirectPort="443"/>

    <Engine defaultHost="localhost" name="Catalina">
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
      <Host appBase="webapps" autoDeploy="true" name="localhost"
        <Valve className="org.apache.catalina.valves.AccessLogValve"
directory="logs" pattern="%h %l %u %t &quot;%r&quot; %s %b"
prefix="localhost_access_log." suffix=".txt"/>
        <Context docBase="my-app-name" path="/my-app-name"
reloadable="true" source="org.eclipse.jst.jee.server:cividas-core-web"/>

It is my first Tomcat SSL client cert set up so I must be missing
something. Hope you may help me see it :-)




Alberto Gael Abadin Martinez
Junior Developer

[image: IMATIA]

*Tel: *+34 986 342 774 ext 4531

*Email: *
Edificio CITEXVI
Fonte das Abelleiras, s/n - Local 27
36310 Vigo (Pontevedra)



Este mensaje, y en su caso, cualquier fichero anexo al mismo, puede
contener información confidencial, siendo para uso exclusivo del
destinatario. Queda prohibida su divulgación copia o distribución a
terceros sin la autorización expresa del remitente. Si usted ha recibido
este mensaje erróneamente, se ruega lo notifique al remitente y proceda a
su borrado. Gracias por su colaboración.
This message, and in the case of any file annexed to it, can have
confidential information, and it is exclusively for the use of the
addressee of the message. It is strictly forbidden to spread a copy or
distribute to third parties, without the express order of the sender. If
you have received this message mistakenly, we request you to notify to the
sender, and please be sure to erase it. Thank you for your collaboration.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message