|
AutentificacionDNIeTomcat
Documento en el que se explica como configurar Tomcat para hacer autentificación de usuarios con certificado electrónico
IntroductionAdd your content here. DetallesPoner en server.xml: <!-- Define a SSL HTTP/1.1 Connector on port 8443. This connector uses the JSSE configuration, when using APR, the connector should be using the OpenSSL style configuration described in the APR documentation -->
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="true" sslProtocol="TLS"
keystoreFile="/home/jj/opt/apache-tomcat-6.0.20/keystore/serverKeystore.jks"
keystorePass="passwordKeystore"
truststoreFile="/home/jj/opt/apache-tomcat-6.0.20/keystore/trustKeystore_dnie.jks"
truststorePass="passwordTruststorePass" />
Forzar las comunicaciones con el protocolo HTTPSPara forzar las comunicaciones a través del protocolo HTTPS, añadir en el web.xml: <security-constraint>
<web-resource-collection>
<web-resource-name>Protected Context</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<!-- auth-constraint goes here if you requre authentication -->
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>De esta forma Tomcat redireccionará cualquier petición HTTP al contexto hacia el conector HTTPS Enlaces de interésCreación de almacenes de claves |