| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung |
| de:shibidp:installation_jdbc-plugin_und_nashorn-plugin [2024/09/19 10:03] – Doreen Liebenau | de:shibidp:installation_jdbc-plugin_und_nashorn-plugin [2024/09/23 16:25] (aktuell) – Änderung von tomcat-pooling auf dbcp2, Anpassung mysql.class Doreen Liebenau |
|---|
| Mit folgenden Schritten stellen Sie den IdP um: | Mit folgenden Schritten stellen Sie den IdP um: |
| - Sicherstellen, dass mindestens die Spalten ''context'' und ''id'' in der Tabelle ''StorageRecords'' case-sensitive behandelt werden. | - Sicherstellen, dass mindestens die Spalten ''context'' und ''id'' in der Tabelle ''StorageRecords'' case-sensitive behandelt werden. |
| * Prüfen Sie die COLLATION. Eine Collation, deren Name auf ''_ci'' endet, ist case-insensitive,''_cs'' steht für case-sensitive, ''utf8_bin'' ist ebenfalls case-sensitive. Ab MariaDB heißt es ''utf8_mb3'' statt ''utf8''.<code mysql>MariaDB[idp]> show create table StorageRecords\G; | * Prüfen Sie die COLLATION. Eine Collation, deren Name auf ''_ci'' endet, ist case-insensitive,''_cs'' steht für case-sensitive, ''utf8_bin'' ist ebenfalls case-sensitive. Ab MariaDB heißt es ''utf8_mb3'' statt ''utf8''.<code>MariaDB[idp]> show create table StorageRecords\G; |
| *************************** 1. row *************************** | *************************** 1. row *************************** |
| Table: StorageRecords | Table: StorageRecords |
| * Um die Collation für die ganze Tabelle ''StorageRecords'' umzustellen, gehen Sie wie folgt vor:<code mysql>MariaDB[idp]> ALTER TABLE StorageRecords CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;</code> | * Um die Collation für die ganze Tabelle ''StorageRecords'' umzustellen, gehen Sie wie folgt vor:<code mysql>MariaDB[idp]> ALTER TABLE StorageRecords CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;</code> |
| - Installation des JDBC-Plugins (ab 4.2):<code bash>root@idp:~# /opt/shibboleth-idp/bin/plugin.sh -I net.shibboleth.plugin.storage.jdbc</code> | - Installation des JDBC-Plugins (ab 4.2):<code bash>root@idp:~# /opt/shibboleth-idp/bin/plugin.sh -I net.shibboleth.plugin.storage.jdbc</code> |
| - Änderung der Konfiguration in ''conf/global.xml'':<code xml> <!-- VORHER --> | <!-- NACHHER --> | - Änderung der Konfiguration in ''conf/global.xml'':<code> <!-- VORHER --> | <!-- NACHHER --> |
| <bean id="shibboleth.MySQLDataSource" <bean id="shibboleth.MySQLDataSource" | <bean id="shibboleth.MySQLDataSource" <bean id="shibboleth.MySQLDataSource" |
| class="%{mysql.class}" class="%{mysql.class}" | class="%{mysql.class}" class="%{mysql.class}" |
| p:username="%{mysql.username}" p:username="%{mysql.username}" | p:username="%{mysql.username}" p:username="%{mysql.username}" |
| p:password="%{mysql.password}" p:password="%{mysql.password}" | p:password="%{mysql.password}" p:password="%{mysql.password}" |
| p:maxWait="15000" p:maxWait="15000" | p:maxWait="15000" | p:maxWaitMillis="15000" |
| p:testOnBorrow="true" p:testOnBorrow="true" | p:testOnBorrow="true" p:testOnBorrow="true" |
| p:maxActive="100" p:maxActive="100" | p:maxActive="100" | p:maxTotal="100" |
| p:maxIdle="100" p:maxIdle="100" | p:maxIdle="100" p:maxIdle="100" |
| p:validationQuery="select 1" p:validationQuery="select 1" | p:validationQuery="select 1" p:validationQuery="select 1" |
| - Falls in Ihrer ''conf/idp.properties'' noch ''shibboleth.JPAStorageService'' vorkommt, ersetzen Sie die Stellen durch ''JDBCStorageService''.<code properties>idp.session.StorageService = JDBCStorageService | - Falls in Ihrer ''conf/idp.properties'' noch ''shibboleth.JPAStorageService'' vorkommt, ersetzen Sie die Stellen durch ''JDBCStorageService''.<code properties>idp.session.StorageService = JDBCStorageService |
| idp.consent.StorageService = JDBCStorageService</code> | idp.consent.StorageService = JDBCStorageService</code> |
| | - Die Shibboleth-Entwickler empfehlen nicht mehr das tomcat-pooling zu verwenden, sondern [[https://shibboleth.atlassian.net/wiki/spaces/IDPPLUGINS/pages/2989096970/JDBCStorageService#Connection-Pooling | DBCP 2]]. Die Datenbank-Class wird entsprechend in ''conf/idp.properties'' angepasst:<code>mysql.class = org.apache.commons.dbcp2.BasicDataSource</code> |
| - Wenn Sie darüber hinaus das OIDC-Plugin auf Ihrem IdP nutzen, kann es sein, dass Sie den String ''shibboleth.JPAStorageService'' auch in den Dateien ''conf/oidc.properties''...<code properties>idp.oidc.dynreg.StorageService = JDBCStorageService</code>... und/oder ''conf/oidc-clientinfo-resolvers.xml'' ersetzen müssen.<code xml><bean id="StorageClientInformationResolver" parent="shibboleth.oidc.StorageClientInformationResolver" | - Wenn Sie darüber hinaus das OIDC-Plugin auf Ihrem IdP nutzen, kann es sein, dass Sie den String ''shibboleth.JPAStorageService'' auch in den Dateien ''conf/oidc.properties''...<code properties>idp.oidc.dynreg.StorageService = JDBCStorageService</code>... und/oder ''conf/oidc-clientinfo-resolvers.xml'' ersetzen müssen.<code xml><bean id="StorageClientInformationResolver" parent="shibboleth.oidc.StorageClientInformationResolver" |
| p:storageService-ref="JDBCStorageService" /></code> | p:storageService-ref="JDBCStorageService" /></code> |