Valve configuration not working for me in tomcat?

2014-04-02 Thread Mohit Gupta
I access my application with url i.e https://myIPAddress:8443/myWebApp/

I have created the myWebApp.xml  file(same name as my application context
name) which contains below context element and placed it under
tomcat_home\conf\Catalina\localhost\



Context
 Valve
className=org.apache.catalina.authenticator.MySSLAuthenticator/
/Context

MySSLAuthenticator.class is under jar file which is placed under
 tomcat_home\lib

But looks like MySSLAuthenticator is not coming into picture as i get below
error where i see instance of SSLAuthenticator not MySSLAuthenticator


javax.net.ssl.SSLHandshakeException: null cert chain
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1884)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:276)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:266)
at
sun.security.ssl.ServerHandshaker.clientCertificate(ServerHandshaker.java:1631)
at
sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:176)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1016)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
at java.io.InputStream.read(InputStream.java:101)
at
org.apache.tomcat.util.net.jsse.JSSESupport.handShake(JSSESupport.java:181)
at
org.apache.tomcat.util.net.jsse.JSSESupport.getPeerCertificateChain(JSSESupport.java:148)
at
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:1120)
at org.apache.coyote.Request.action(Request.java:349)
at
org.apache.catalina.authenticator.SSLAuthenticator.authenticate(SSLAuthenticator.java:135)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)

i am not sure what is missing here?


Re: Valve configuration not working for me in tomcat?

2014-04-02 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mohit,

On 4/2/14, 12:10 PM, Mohit Gupta wrote:
 I access my application with url i.e
 https://myIPAddress:8443/myWebApp/
 
 I have created the myWebApp.xml  file(same name as my application
 context name) which contains below context element and placed it
 under tomcat_home\conf\Catalina\localhost\
 
 
 
 Context Valve 
 className=org.apache.catalina.authenticator.MySSLAuthenticator/ 
 /Context
 
 MySSLAuthenticator.class is under jar file which is placed under 
 tomcat_home\lib
 
 But looks like MySSLAuthenticator is not coming into picture as i
 get below error where i see instance of SSLAuthenticator not
 MySSLAuthenticator

I don't believe you can /replace/ Tomcat's existing authenticator. Is
your Valve being initialized? Can you find out where it is in the
Valve chain?

I checked, and that information does not appear to be available via JMX :(

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTPHNDAAoJEBzwKT+lPKRY2c0QALO5CpQ/C/bKW15jDtwaZnf6
DfWnl+Rs65iL6jtTK7ToAqHtu2+f/5tC2mE/+/hBqjIYHH3eTObKHyh3lI6soNJp
MGvywozvE24SJPoQ4RLs2ZOeVty87/EMkv3Vjqq20kcgtwbP5S2se1flMqx9b0Wc
EazmzRMiwkR+oNsBD6hF1TtOLGvVr2JrwwY2TCczsDApYDQvRoHqArh5Z1ls+wjU
haPHge9jYVL8MyfIix4ClrVTQwld+mvWD7fYX79EGt4gFj7FLJ9vo2yT6Cj4ETdq
HFhW8AWsOe5BKOh3rDTw02yyxWXMoi4B0txHxRlW8xmPPEDmKkfLs6EDlWRz29uQ
twDyrEcYILJE89c9U8/9bJbUSwrTE5F20BRh2EOQwYvDBd524J0cb4tQTYfJNV5Z
QPhRbK89rzF7XZrDtq6K2Nd0I1Lg7OgnxeCgf0wVm2zkitAyA0wnjH2p+omP9X7N
STznwwLCNegKgHflbwP0Sw0W9Wn3WfO/y+TNXh9rnO4vRzsw9a1xbU/ciaDP+sP7
tFPdI9YynsVlUrKFOlb9Ij4SUBbRIgj3E/P9i0IC1MavtSQonuMlXuO4V6aqY59j
p8N2FlMeQ4T8tTyg8nsgFNVQYwMtFnDJbWMCook6M2CXrIYaLBhCBHVH/30osjFY
GDq7Wat5Kg6riLEsPGkK
=EaI9
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org