Use Spring Resource Instead of File for Factory Beans
Marvin S. Addison
marvin.addison at gmail.com
Wed Oct 16 13:53:38 EDT 2013
I started using java-idp-testbed today and almost immediately I wanted
to use classpath locations for setting up IdP and SP credentials.
Unfortunately that's not possible at present, but it was straightforward
to switch to org.springframework.core.io.Resource to support both
file-based and classpath resources. That allows very axiomatic Spring
configuration like the following:
<bean id="testbed.idp.PrivateKey"
class="net.shibboleth.ext.spring.factory.PrivateKeyFactoryBean"
p:privateKey="classpath:/creds/idp.key" />
<bean id="testbed.idp.X509Certificate"
class="net.shibboleth.ext.spring.factory.X509CertificateFactoryBean"
p:certificate="classpath:/creds/idp.crt" />
I made the patch available for review and hope you'll consider it.
https://gist.github.com/serac/7011620
I realize that there may be no use case for classpath resources in a
real IdP configuration setting, but there's still some value due to
increased brevity in the config.
I'm happy to file a Jira issue and attach the patch to it if you're
interested.
Best,
M
More information about the dev
mailing list