idpv3 testing: clientIP in audit logs and consent jdbc ?
Tom Zeller
tzeller at dragonacea.biz
Fri Jan 30 14:17:10 EST 2015
On Fri, Jan 30, 2015 at 12:58 PM, Cantor, Scott <cantor.2 at osu.edu> wrote:
>> > Consent/uApprove: our current idp uses mysql database for uApprove
>> > consent. Is it possible(how) to configure idpv3 to use database storage for
>> > consent (I didn't find any docs for this) ?
>>
>> Yes. I believe it's straightforward. I'll reply with an example.
>
> idp.consent.StorageService is the property with the bean ID of the StorageService to use. So, basically, declare in global.xml or in intercept/profile-intercept.xml and put bean name in that property in idp.properties
>
> We don't have examples done up of JDBC storage services yet. The Javadoc for that is here [1], it's Hibernate based. Daniel can probably write up an example.
Here's what I was using for PostgreSQL, I don't have one for MySQL at
the moment. And this would be for conf/global.xml.
<bean id="shibboleth.consent.ConsentStorageService"
class="org.opensaml.storage.impl.JPAStorageService"
p:cleanupInterval="%{idp.storage.cleanupInterval:PT10M}"
c:factory-ref="shibboleth.consent.ConsentStorageService.EntityManagerFactory"
p:valueSize="2048" />
<bean id="shibboleth.consent.ConsentStorageService.EntityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="packagesToScan" value="org.opensaml.storage.impl" />
<property name="dataSource"
ref="shibboleth.consent.ConsentStorageService.DataSource" />
<property name="jpaVendorAdapter"
ref="shibboleth.consent.ConsentStorageService.JPAVendorAdapter" />
<property name="jpaDialect">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" />
</property>
</bean>
<bean id="shibboleth.consent.ConsentStorageService.JPAVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="POSTGRESQL" />
<property name="databasePlatform"
value="org.hibernate.dialect.PostgreSQLDialect" />
<property name="generateDdl" value="true" />
</bean>
<bean id="shibboleth.consent.ConsentStorageService.DataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="org.postgresql.Driver" />
<property name="url" value="jdbc:postgresql://localhost:5432/consent" />
<property name="username" value="postgres" />
<property name="password" value="" />
</bean>
More information about the users
mailing list