I have created a Java servlet. I need to host it using two-way SSL connection. I was provided two .cer files to achieve this. I created a Java key store to use with Apache tomcat to deploy my servlet. My server.xml for the https connection reads
<Connector SSLEnabled="true" acceptCount="100" clientAuth="false"
disableUploadTimeout="true" enableLookups="false" maxThreads="25"
port="30580" keystoreFile="SSLConnect.jks" keystorePass="$Actual
password" protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https" secure="true" sslProtocol="TLS" />
and
I have also enabled https in the servlet by adding
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
to the web.xml file.
Despite all this, anyone can connect to the service using the URL I have deployed the service to. Do you not need the certificates to connect to the URL since SSL is enabled over https? AM I doing something wrong here?