I've set up saml context within my app with initial key manager bean:
<!-- Central storage of cryptographic keys -->
<bean id="keyManager" class="org.springframework.security.saml.key.JKSKeyManager">
<constructor-arg value="classpath:security/samlKeystore.jks"/>
<constructor-arg type="java.lang.String" value="nalle123"/>
<constructor-arg>
<map>
<entry key="apollo" value="nalle123"/>
</map>
</constructor-arg>
<constructor-arg type="java.lang.String" value="apollo"/>
</bean>
And this config works fine for my IDP. Namely it successfully authenticates user after incoming SAML messages were verified.
Also, I've tried to simply replace this manager with EmptyKeyManager implementation, but error above appears.
There are few questions that would be good to know before these changes would be deployed to production :).
As you can find in the manual (chapter 8.1), you can only use EmptyKeyManager
in case your application doesn't need to create digital signatures. The error you mention suggests Spring SAML does need to create one in your usage pattern. Perhaps you are using HTTP-Artifact binding and require outgoing ArtifactRequest messages to be signed?
The manual also shows the exact line of configuration to replace your current keyManager
with the EmptyKeyManager
.