Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| de:shibidp:config-storage-postgresql [2025/11/17 16:08] – angelegt als Kopie von config-storage Thorsten Michels | de:shibidp:config-storage-postgresql [2025/11/24 13:58] (aktuell) – systemctl enable postgresql Thorsten Michels | ||
|---|---|---|---|
| Zeile 13: | Zeile 13: | ||
| <code bash> | <code bash> | ||
| - | root@idp:~# apt install | + | root@idp:~# apt install |
| </ | </ | ||
| + | <del> | ||
| <code bash> | <code bash> | ||
| root@idp:~# ln -s / | root@idp:~# ln -s / | ||
| + | </ | ||
| + | </ | ||
| + | |||
| + | Damit die DB beim Booten gestartet wird: | ||
| + | <code bash> | ||
| + | root@idp:~# systemctl enable postgresql | ||
| </ | </ | ||
| Zeile 34: | Zeile 41: | ||
| * '' | * '' | ||
| - | < | + | Einloggen in PostgresQL funktioniert zum Beispiel mit |
| - | mysql> SET NAMES ' | + | < |
| - | SET CHARACTER SET utf8; | + | root@idp:~# sudo -i -u postgres psql |
| - | CHARSET utf8; | + | </code> |
| - | CREATE DATABASE IF NOT EXISTS shibboleth CHARACTER SET=utf8; | + | |
| - | USE shibboleth; | + | |
| - | + | ||
| - | mysql> CREATE TABLE IF NOT EXISTS 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) | + | |
| - | ) COLLATE utf8_bin; | + | |
| - | mysql> CREATE TABLE IF NOT EXISTS | + | <code postgresql> |
| - | localEntity VARCHAR(255) NOT NULL, | + | postgres=# CREATE ROLE shibboleth WITH LOGIN; |
| - | peerEntity VARCHAR(255) NOT NULL, | + | postgres=# \password shibboleth |
| - | | + | postgres=# CREATE DATABASE shibboleth WITH OWNER shibboleth ENCODING ' |
| - | | + | postgres=# \c shibboleth |
| - | | + | shibboleth=# |
| - | peerProvidedId VARCHAR(50) NULL, | + | shibboleth=# |
| - | creationDate TIMESTAMP NOT NULL, | + | localEntity VARCHAR(1024) NOT NULL, |
| - | deactivationDate TIMESTAMP NULL, | + | peerEntity VARCHAR(1024) NOT NULL, |
| - | PRIMARY KEY (localEntity, | + | |
| - | ); | + | |
| - | + | | |
| - | mysql> CREATE USER 'shibboleth' | + | peerProvidedId VARCHAR(255) NULL, |
| - | + | creationDate TIMESTAMP NOT NULL DEFAULT LOCALTIMESTAMP, | |
| - | mysql> GRANT ALL PRIVILEGES ON shibboleth.* TO ' | + | deactivationDate TIMESTAMP |
| - | + | PRIMARY KEY (localEntity, | |
| - | mysql> FLUSH PRIVILEGES; | + | ); |
| + | shibboleth=# CREATE INDEX shibpid_getbysourcevalue_index ON shibpid(localEntity, | ||
| + | shibboleth=# CREATE TABLE storagerecords ( | ||
| + | | ||
| + | id VARCHAR(255) NOT NULL, | ||
| + | expires BIGINT DEFAULT NULL, | ||
| + | value TEXT NOT NULL, | ||
| + | version BIGINT NOT NULL, | ||
| + | PRIMARY KEY (context, id) | ||
| + | ); | ||
| + | shibboleth=# | ||
| </ | </ | ||
| Zeile 90: | Zeile 96: | ||
| <!-- Use this file to define any custom beans needed globally. --> | <!-- Use this file to define any custom beans needed globally. --> | ||
| | | ||
| - | | + | < |
| - | | + | |
| - | | + | class=" |
| - | Es ist unter Umständen nötig, dass Sie diese Werte je nach Auslastung Ihres IdP anpassen, | + | destroy-method=" |
| - | | + | p: |
| - | <bean id=" | + | p: |
| - | class=" | + | p: |
| - | p: | + | /> |
| - | | + | |
| - | | + | < |
| - | p: | + | p:dataSource-ref="shibboleth.PostgreSQLDataSource" |
| - | | + | p:transactionIsolation="4" |
| - | p:maxIdle="100" | + | p:retryableErrors="40001" |
| - | p:maxWaitMillis="15000" | + | |
| - | p:testOnBorrow="true" | + | |
| - | p:validationQuery="select 1" | + | |
| - | | + | |
| - | <bean id=" | ||
| - | parent=" | ||
| - | p: | ||
| - | p: | ||
| - | | ||
| </ | </ | ||
| </ | </ | ||
| Zeile 123: | Zeile 121: | ||
| <file java / | <file java / | ||
| # ... | # ... | ||
| - | mysql.class | + | psql.url = jdbc:postgresql:// |
| - | mysql.url = jdbc:mysql:// | + | psql.username = shibboleth |
| - | mysql.username = shibboleth | + | |
| # ... | # ... | ||
| </ | </ | ||
| Zeile 131: | Zeile 128: | ||
| 2. Das Passwort gehört wieder in die Datei '' | 2. Das Passwort gehört wieder in die Datei '' | ||
| <file / | <file / | ||
| - | mysql.password = GeHEIM007 | + | psql.password = GeHEIM007 |
| </ | </ | ||
| Zeile 152: | Zeile 149: | ||
| ==== Generierung und Speicherung ==== | ==== Generierung und Speicherung ==== | ||
| - | Das gewählte Quellattribut legen Sie in '' | + | Das gewählte Quellattribut legen Sie in '' |
| <file properties / | <file properties / | ||
| Zeile 162: | Zeile 159: | ||
| idp.persistentId.generator = shibboleth.StoredPersistentIdGenerator | idp.persistentId.generator = shibboleth.StoredPersistentIdGenerator | ||
| # For basic use, set this to a JDBC DataSource bean name: | # For basic use, set this to a JDBC DataSource bean name: | ||
| - | idp.persistentId.dataSource = shibboleth.MySQLDataSource | + | idp.persistentId.dataSource = shibboleth.PostgreSQLDataSource |
| </ | </ | ||
| Zeile 231: | Zeile 228: | ||
| salt=" | salt=" | ||
| < | < | ||
| - | < | + | < |
| </ | </ | ||
| </ | </ | ||
| Zeile 337: | Zeile 334: | ||
| queryTimeout=" | queryTimeout=" | ||
| < | < | ||
| - | < | + | < |
| </ | </ | ||
| * Bereits **bestehende persistentIDs** lassen Sie in der Datenbank bestehen, wie sie sind. Aus diesen persistentIDs werden dann zwar nicht standardkonforme SAML pairwise-ids gebildet. Wir gehen allerdings nicht davon aus, dass Service Provider, die die pairwise-id entgegennehmen, | * Bereits **bestehende persistentIDs** lassen Sie in der Datenbank bestehen, wie sie sind. Aus diesen persistentIDs werden dann zwar nicht standardkonforme SAML pairwise-ids gebildet. Wir gehen allerdings nicht davon aus, dass Service Provider, die die pairwise-id entgegennehmen, | ||