Announcement Announcement Module
Collapse
No announcement yet.
Provide certificate with HttpInvoker Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Provide certificate with HttpInvoker

    Hi

    Is there any way to provide client certificate with httpinvoker so on server side it can be extracted from RequestContextHolder.currentRequestAttributes()?
    Specifically i need certificate serial number and issuer.

    Currently my config looks like:

    client config.xml
    Code:
    ...
    <bean id="certificateIsRevoked"
    	class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
    	<property name="serviceUrl" value="https://localhost:8443/remoting/CertificateIsRevoked" />
    	<property name="serviceInterface"  value="some.namespace.ICertificateIsRevoked" />
    	<property name="httpInvokerRequestExecutor">
    		<bean class="some.namespace.client.BasicAuthenticationCommonsHttpInvokerRequestExecutor"  />
    	</property>
    </bean>
    ...
    server remoting-config.xml
    Code:
    ...
    <bean name="/CertificateIsRevoked" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
    	<property name="service" ref="sfCertificateIsRevoked" />
    	<property name="serviceInterface" value="some.namespace.ICertificateIsRevoked" />
    </bean>
    ...
    Currently https tunnel between client and jBoss is created with:

    client:
    Code:
    ...
    System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
    System.setProperty("javax.net.ssl.keyStore", "certDir/" + section.get("keyStore"));
    System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword);
    System.setProperty("javax.net.ssl.trustStore", "./certDir/" + section.get("trustStore"));
    System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);
    ...
    jboss server.xml:
    Code:
    ...
    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150"
    	scheme="https" secure="true" strategy="ms" address="${jboss.bind.address}"
    	keystoreFile="${jboss.server.home.dir}/conf/server.keystore"
    	keystorePass="somePassword" sslProtocol="TLS"
    	truststoreFile="${jboss.server.home.dir}/conf/client.keystore"
    	truststorePass="somePassword"
    	clientAuth="true" />
    ...
    Maybe better question, how can i access certificate used for https between client and jboss in my application?
Working...
X