StoredID setting in Shibboleth v5
深瀬尚子
fukase at funest.co.jp
Fri Mar 1 07:13:59 UTC 2024
Hello!
I installed Shibboleth IdP v5.
I need to configure storedID and do them as follows:
I uncommented the generator bean in saml-nameid.xml
■saml-nameid.xml
<util:list id="shibboleth.SAML2NameIDGenerators">
<ref bean="shibboleth.SAML2TransientGenerator" />
<ref bean="shibboleth.SAML2PersistentGenerator" />
</util:list>
And add persistent ID store beans.
<bean id="MyDataSource"
class="org.apache.commons.dbcp2.BasicDataSource"
p:driverClassName="org.mariadb.jdbc.Driver"
p:url="jdbc:mariadb://localhost:3306/shibboleth"
p:username="username"
p:password="password"
p:maxTotal="10"
p:maxIdle="5"
p:maxWaitMillis="15000"
p:testOnBorrow="true"
p:validationQuery="select 1"
p:validationQueryTimeout="5" />
<!-- A replacement bean suitable for use in the idp.persistentId.generator property. -->
<bean id="MyPersistentIdStore" parent="shibboleth.StoredPersistentIdGenerator"
p:dataSource-ref="MyDataSource"
p:queryTimeout="PT2S"
p:retryableErrors="#{{'23000'}}" />
■saml-nameid.properties
idp.persistentId.generator = shibboleth.StoredPersistentIdGenerator
idp.persistentId.dataSource = MyDataSource
■attribute-resolver.xml
<DataConnector id="storedID" xsi:type="StoredId"
excludeResolutionPhases="c14n/attribute"
generatedAttributeID="storedID"
salt="%{idp.persistentId.salt}"
algorithm="%{idp.persistentId.algorithm:SHA}"
encoding="%{idp.persistentId.encoding:BASE64}">
<InputDataConnector ref="myLDAP" attributeNames="%{idp.persistentId.sourceAttribute}" />
<BeanManagedConnection>MyDataSource</BeanManagedConnection>
</DataConnector>
Of course, I've prepared a database.
When I started services, then I got some errors like these.
=========================================
2024-03-01 16:02:06,719 - - ERROR [net.shibboleth.shared.service.AbstractReloadableService:179] - Service 'shibboleth.AttributeResolverService': Initial load failed
net.shibboleth.shared.service.ServiceException: Failed to load [file [/opt/shibboleth-idp/conf/attribute-resolver.xml], class path resource [net/shibboleth/idp/conf/attribute-resolver-system.xml]]
at net.shibboleth.shared.spring.service.ReloadableSpringService.doReload(ReloadableSpringService.java:385)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storedID': Cannot create inner bean '(inner bean)#10b6a807' of type [net.shibboleth.idp.attribute.impl.JDBCPairwiseIdStore] while setting bean property 'pairwiseIdStore'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBeanValue(BeanDefinitionValueResolver.java:421)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#10b6a807': Cannot resolve reference to bean 'MyDataSource' while setting bean property 'dataSource'
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:377)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'MyDataSource' available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:893)
=========================================
What should I do to solve the problems.
Could someone tell me how to correct this?
I really appreciate any help you can provide.
Naoko.
More information about the users
mailing list