TrustEngine for X.509 client certificate authentication

Rod Widdowson rdw at steadingsoftware.com
Tue Jul 5 09:30:21 EDT 2016


This is probably better in  -dev...

Mandatory warning:

> class="net.shibboleth.idp.profile.spring.relyingparty.security.trustengine.impl.PKIXResourceValidationInfoFactoryBean">

Note the 'impl'.  It's unlikely to change but there is absolutely no guarantee.

> I can't yet see what I'm doing wrong... maybe another pair of eyes will
> help. ;)

I didn't at first, including some spelunking.

I am not sure since I don't have that corner of Spring swapped in right now but I'm pretty sure it doesn't 
need to be that complicated.  

If you instantiate a bean which implements FactoryBean (which PKIXResourceValidationInfoFactoryBean does) all the work is done for you.

So you just need to say:

<bean id="PKIXResourceValidationInfo"
     class="net.shibboleth.idp.profile.spring.relyingparty.security.trustengine.impl.PKIXResourceValidationInfoFactoryBean">
  <property name="certificates">
    <list>
      <bean class="org.springframework.core.io.FileSystemResource"
            c:path="/etc/pki/tls/certs/client-auth.crt"/>
    </list>
  </property>
  <property name="verifyDepth" value="2"/>
</bean>

And goodness will occur.  That is why you are getting the error, by the way: the thing you called ...Factory was in fact the bean you wanted.

/Rod





More information about the users mailing list