...
conf/ldap.properties
参照するLDAPにあわせて、Connection properties, SSL configuration, Search DN resolutionのプロパティを設定します。展開 コード ブロック language java title conf/ldap.properties ## Connection properties ## idp.authn.LDAP.ldapURL = ldap://localhost:389 idp.authn.LDAP.useStartTLS = false #idp.authn.LDAP.useSSL = false #idp.authn.LDAP.connectTimeout = 3000 # Search DN resolution, used by anonSearchAuthenticator, bindSearchAuthenticator # for AD: CN=Users,DC=example,DC=org idp.authn.LDAP.baseDN = ou=people,dc=example,dc=ac,dc=jp idp.authn.LDAP.subtreeSearch = true idp.authn.LDAP.userFilter = (uid={user}) # bind search configuration # for AD: idp.authn.LDAP.bindDN=adminuser@domain.com idp.authn.LDAP.bindDN = idp.authn.LDAP.bindDNCredential =
コード ブロック language diff title 差分 ## Connection properties ## -idp.authn.LDAP.ldapURL = ldap://localhost:10389 -#idp.authn.LDAP.useStartTLS = true +idp.authn.LDAP.ldapURL = ldap://localhost:389 +idp.authn.LDAP.useStartTLS = false #idp.authn.LDAP.useSSL = false #idp.authn.LDAP.connectTimeout = 3000 # Search DN resolution, used by anonSearchAuthenticator, bindSearchAuthenticator # for AD: CN=Users,DC=example,DC=org -idp.authn.LDAP.baseDN = ou=people,dc=example,dc=org -#idp.authn.LDAP.subtreeSearch = false +idp.authn.LDAP.baseDN = ou=people,dc=example,dc=ac,dc=jp +idp.authn.LDAP.subtreeSearch = true idp.authn.LDAP.userFilter = (uid={user}) # bind search configuration # for AD: idp.authn.LDAP.bindDN=adminuser@domain.com -idp.authn.LDAP.bindDN = uid=myservice,ou=system -idp.authn.LDAP.bindDNCredential = myServicePassword +idp.authn.LDAP.bindDN = +idp.authn.LDAP.bindDNCredential =
JAASによるパスワード認証
注意 |
---|
Shibboleth IdP 3. |
...
1.2で確認した内容です。 |
conf/authn/password-authn-config.xml
<import resource="jaas-authn-config.xml" />
の行をアンコメントして、<import resource="ldap-authn-config.xml" />
の行をコメントアウトします。コード ブロック language xml title conf/authn/password-authn-config.xml collapse true <!-- Choose an import based on the back-end you want to use. --> <import resource="jaas-authn-config.xml" /> <!-- <import resource="krb5-authn-config.xml" /> --> <!-- <import resource="ldap-authn-config.xml" /> -->
conf/authn/jaas.config
参照するLDAPにあわせて、
org.ldaptive.jaas.LdapLoginModule required以降の行を設定します。
コード ブロック language xml title conf/authn/jaas.config collapse true ShibUserPassAuth { /* com.sun.security.auth.module.Krb5LoginModule required; */ org.ldaptive.jaas.LdapLoginModule required ldapUrl="ldap://localhost" baseDn="ou=people,dc=example,dc=ac,dc=jp" ssl="false" userFilter="uid={user}" subtreeSearch="true" ; };
...
- コマンドラインオプション
user.language
とuser.country
- 環境変数
LC_MESSAGES
- 環境変数
LANG
ユーザ同意機能
注意 |
---|
Shibboleth IdP 3. |
...
1.2で確認した内容です。 |
Shibboleth IdP 3には、uApprove相当のユーザ同意機能があります。uApprove JPとの違いはShibboleth IdP 3のユーザ同意機能とuApprove JPとの相違点を参照してください。
ユーザ同意の情報をMySQLに保存する設定
...
StorageRecordsテーブルの作成
コード ブロック language sql title MySQL collapse true CREATE TABLE `StorageRecords` ( `context` varchar(255) NOT NULL, `id` varchar(255) NOT NULL, `expires` bigint(20) DEFAULT NULL, `value` longtext NOT NULL, `version` bigint(20) NOT NULL, PRIMARY KEY (`context`,`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
conf/global.xml
shibboleth.JPAStorageService
を定義します。persistent-idの設定(storedId)が設定済みの場合、重複となるためMyDataSource
の定義は不要です。コード ブロック language xml title conf/global.xml (Tomcat7の場合) collapse true <!-- Use this file to define any custom beans needed globally. --> <bean id="shibboleth.JPAStorageService" class="org.opensaml.storage.impl.JPAStorageService" p:cleanupInterval="%{idp.storage.cleanupInterval:PT10M}" c:factory-ref="shibboleth.JPAStorageService.entityManagerFactory" /> <bean id="shibboleth.JPAStorageService.entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="packagesToScan" value="org.opensaml.storage.impl" /> <property name="dataSource" ref="MyDataSource" /> <property name="jpaVendorAdapter" ref="shibboleth.JPAStorageService.JPAVendorAdapter" /> <property name="jpaDialect"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /> </property> </bean> <bean id="shibboleth.JPAStorageService.JPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" p:database="MYSQL" /> <bean id="MyDataSource" class="org.apache.tomcat.dbcp.dbcp.BasicDataSource" p:driverClassName="com.mysql.jdbc.Driver" p:url="jdbc:mysql://localhost:3306/shibboleth" p:username="username" p:password="password" p:maxActive="10" p:maxIdle="5" p:maxWait="15000" p:testOnBorrow="true" p:validationQuery="select 1" p:validationQueryTimeout="5" />
コード ブロック language xml title conf/global.xml (Tomcat8の場合) collapse true <!-- Use this file to define any custom beans needed globally. --> <bean id="shibboleth.JPAStorageService" class="org.opensaml.storage.impl.JPAStorageService" p:cleanupInterval="%{idp.storage.cleanupInterval:PT10M}" c:factory-ref="shibboleth.JPAStorageService.entityManagerFactory" /> <bean id="shibboleth.JPAStorageService.entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="packagesToScan" value="org.opensaml.storage.impl" /> <property name="dataSource" ref="MyDataSource" /> <property name="jpaVendorAdapter" ref="shibboleth.JPAStorageService.JPAVendorAdapter" /> <property name="jpaDialect"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaDialect" /> </property> </bean> <bean id="shibboleth.JPAStorageService.JPAVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" p:database="MYSQL" /> <bean id="MyDataSource" class="org.apache.tomcat.dbcp.dbcp2.BasicDataSource" p:driverClassName="com.mysql.jdbc.Driver" p:url="jdbc:mysql://localhost:3306/shibboleth" p:username="username" p:password="password" p:maxIdle="5" p:maxTotal="10" p:maxWaitMillis="15000" p:testOnBorrow="true" p:validationQuery="select 1" p:validationQueryTimeout="5" />
情報 Tomcat 8付属のDBCP2から、
p:maxActive
はp:maxTotal
に、p:maxWait
はp:maxWaitMillis
に変更になりました。conf/idp.properties
コード ブロック language xml title conf/idp.properties collapse true # Set to "shibboleth.StorageService" or custom bean for alternate storage of consent idp.consent.StorageService = shibboleth.JPAStorageService # Maximum number of consent storage records # Set to -1 for unlimited server-side storage idp.consent.maxStoredRecords = -1
属性毎に同意を得る設定
...
conf/idp.properties
idp.consent.allowPerAttribute
をtrue
に設定することで、属性毎にチェックボックスを付加することができます。コード ブロック language xml title conf/idp.properties collapse true idp.consent.allowPerAttribute = true
注意 SPの必須属性にもチェックボックスが表示されるため、利用者がSPの必須属性のチェックを外して属性を送信しなかった場合にSPを利用できない可能性があります。
送信済み属性の属性値が変化した場合に再同意を得る設定
...
conf/idp.properties
コード ブロック language xml title conf/idp.properties collapse true # Whether attribute values and terms of use text are compared idp.consent.compareValues = true
ログレベルの変更
情報 |
---|
Shibboleth IdP 3. |
...
2からの新機能です。 |
Shibboleth IdP 3.2より、ログレベルの変更がconf/idp.properties
で行えるようになりました。
conf/idp.properties
設定できるプロパティ名はconf/logback.confの先頭を参照してください。
展開 コード ブロック language java title conf/idp.properties # Logging Level idp.loglevel.idp=DEBUG idp.loglevel.messages=DEBUG idp.loglevel.encryption=DEBUG
コード ブロック language diff title 差分 +# Logging Level +idp.loglevel.idp=DEBUG +idp.loglevel.messages=DEBUG +idp.loglevel.encryption=DEBUG
...