Для использования SAML я настроил Maven и контекст приложения.
При выполнении следующих 2 команд я ввел пароль.openssl pkcs12 -export -in Certificate.crt -inkey private.pem -certfile Certificate.crt -out keystore.p12
keytool -importkeystore -srckeystore keystore.p12 -srcstoretype pkcs12 -destkeystore samlKeystore.jks-jksts1005 *
Я поместил файл samlKeystore.jks sp.metadata.xml v2metadata.xml в src / main / resources / metadata /
Но я получаю следующую ошибку.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#0' while setting bean property 'sourceList' with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.web.DefaultSecurityFilterChain#0': Cannot resolve reference to bean 'samlFilter' while setting constructor argument with key [3]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'samlFilter' defined in class path resource [conf/spring/root-context.xml]: Cannot create inner bean '(inner bean)#6ddc817f' of type [org.springframework.security.web.DefaultSecurityFilterChain] while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#6ddc817f': Cannot resolve reference to bean 'samlEntryPoint' while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'samlEntryPoint': Unsatisfied dependency expressed through method 'setWebSSOprofile' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webSSOprofile': Unsatisfied dependency expressed through method 'setMetadata' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'metadata': Unsatisfied dependency expressed through method 'setKeyManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'keyManager' defined in class path resource [conf/spring/root-context.xml]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.saml.key.JKSKeyManager]: Constructor threw exception; nested exception is java.lang.RuntimeException: Error initializing keystore
Это из-за пароля, который я установил?
Обновление 1 : В контексте приложения я заметил следующую запись.Это где пароль установлен?
<bean id="keyManager" class="org.springframework.security.saml.key.JKSKeyManager">
<constructor-arg value="classpath:/metadata/samlKeystore.jks" />
<constructor-arg type="java.lang.String" value="storepass" />
<constructor-arg>
<map>
<entry key="saml-alias" value="keypass" />
</map>
</constructor-arg>
<constructor-arg type="java.lang.String" value="saml-alias" />
</bean>
Обновление 2 Я посмотрел вниз по журналу и заметил следующее сообщение об ошибке
java.io.IOException: Keystore was tampered with, or password was incorrect
Caused by: java.security.UnrecoverableKeyException: Password verification failed
Как мнеустановить пароль для хранилища ключей