fixing the crypto factory beans
Ian Young
ian at iay.org.uk
Fri May 30 09:14:23 EDT 2014
On 29 May 2014, at 16:24, Ian Young <ian at iay.org.uk> wrote:
> I will try and get this done tomorrow.
It's done, including some unit tests and the downstream things in the IdP and the testbed that depended on it.
The one thing that might need a second look is that credentials.xml in the IdP has grown a bit. The previous version of that was (I think) getting a free ride from Spring in that a string value set as the value of a property of type File was resulting in the automatic creation of the File object. That doesn't apply to properties of type Resource, obviously, so I've made that explicit, e.g.:
<!-- Your IdP's default signing key, set via property file. -->
<bean id="shibboleth.DefaultSigningCredential" class="org.opensaml.security.x509.BasicX509Credential"
p:entityId-ref="entityID">
<constructor-arg name="privateKey">
<bean class="net.shibboleth.ext.spring.factory.PrivateKeyFactoryBean">
<property name="resource">
<bean class="org.springframework.core.io.FileSystemResource">
<constructor-arg value="${idp.signing.key}"/>
</bean>
</property>
</bean>
</constructor-arg>
<constructor-arg name="entityCertificate">
<bean class="net.shibboleth.ext.spring.factory.X509CertificateFactoryBean">
<property name="resource">
<bean class="org.springframework.core.io.FileSystemResource">
<constructor-arg value="${idp.signing.cert}"/>
</bean>
</property>
</bean>
</constructor-arg>
</bean>
I suppose we could make that a little shorter using c:path="${whatever}" but making it much simpler would require reintroducing some shorthand methods/properties on the factory beans.
-- Ian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5943 bytes
Desc: not available
Url : http://shibboleth.net/pipermail/dev/attachments/20140530/387c4776/attachment.bin
More information about the dev
mailing list