Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| benno_rest_mit_ssl-verschluesselung [2016/11/21 14:15] – lwsystems | benno_rest_mit_ssl-verschluesselung [2023/04/26 16:57] (aktuell) – [Zertifikat erstellen] lwsystems | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== | + | ====== |
| - | = Konfiguration von Jetty = | + | **Achtung!** Dieses Dokument beschreibt die Konfiguration von Benno REST ab Version 2.10.0. Die Erläuterung zur Konfiguration der SSL-Verschlüsselung von älteren Versionen von Benno REST finden Sie [[Benno REST SSL 2.8|hier]]. |
| + | |||
| + | ===== Konfiguration von Jetty | ||
| Zur Konfiguration eines SSL-Connectors wird die Konfigurationsdatei / | Zur Konfiguration eines SSL-Connectors wird die Konfigurationsdatei / | ||
| - | <code>?xml version=" | + | <file xml> |
| - | !DOCTYPE Configure PUBLIC " | + | <?xml version=" |
| - | !-- Configuration for bennorest / jetty -- | + | <!DOCTYPE Configure PUBLIC " |
| - | Configure id="FileServer" class=" | + | <!-- Configuration for bennorest / jetty >= 2.10 --> |
| - | Call name=" | + | <Configure id="BennoREST-2.10.0" class=" |
| - | Arg | + | <Call name=" |
| - | New class=" | + | <Arg> |
| - | Set name=" | + | <New class=" |
| - | Set name=" | + | <Arg name=" |
| - | /New | + | <Ref refid=" |
| - | /Arg | + | </ |
| - | /Call | + | <Set name=" |
| - | Call name=" | + | <Set name=" |
| - | Arg | + | </New> |
| - | New class=" | + | </Arg> |
| - | Set name="Host"192.168.1.10/Set | + | </Call> |
| - | Set name="Port"21443/Set | + | <Call name=" |
| - | Set name="maxIdleTime"30000/Set | + | <Arg> |
| - | Set name="keystore"/ | + | |
| - | Set name="password" | + | <Arg name=" |
| - | | + | |
| - | | + | </ |
| - | Set name="trustPassword"mhO3WjtG7Y5UDgi2NWxL/Set | + | < |
| - | /New | + | <New class=" |
| - | /Arg | + | |
| - | /Call | + | |
| - | / | + | |
| - | </code> | + | |
| + | | ||
| + | </ | ||
| + | </ | ||
| + | <Arg name=" | ||
| + | <Array type=" | ||
| + | | ||
| + | <New class=" | ||
| + | < | ||
| + | <New id=" | ||
| + | <Call name=" | ||
| + | < | ||
| + | <New class=" | ||
| + | <Arg name=" | ||
| + | < | ||
| + | </ | ||
| + | < | ||
| + | < | ||
| + | </Arg> | ||
| + | <Arg name=" | ||
| + | < | ||
| + | </Arg> | ||
| + | <Arg name=" | ||
| + | < | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | </ | ||
| + | | ||
| + | </ | ||
| + | </ | ||
| + | <Set name="host"> | ||
| + | < | ||
| + | <Set name=" | ||
| + | | ||
| + | | ||
| + | </Call> | ||
| + | </Configure> | ||
| + | </file> | ||
| - | = Zertifikat erstellen | + | ===== Zertifikat erstellen ===== |
| - | < | + | |
| - | *Passwort ist das oben eingetragene Passwort | + | Der private Schlüssel und das Zertifikat werden in einem [[keystore|Java Keystore]] gespeichert. |
| - | *Der Hostname (CN) des Systems wird beim keytool über "What ist your first and last name?" abgefragt. | + | Alternativ können dies auch als PKCS#12 Datei angegeben werden. Diese Datei kann mittels OpenSSL aus |
| + | den häufig vorliegenden PEM-Files erstellt werden. | ||
| + | |||
| + | < | ||
| + | openssl pkcs12 | ||
| + | | ||
| + | | ||
| + | | ||
| + | -out certchain+key.pkcs12 | ||
| + | chown benno:benno certchain+key.pkcs12 | ||
| + | chmod 0440 certchain+key.pkcs12 | ||
| + | </ | ||
| + | |||
| + | ===== Web-Frontend konfigurieren ===== | ||
| - | = Web-Frontend konfigurieren | ||
| In der Konfiguration von // | In der Konfiguration von // | ||
| Zeile 45: | Zeile 100: | ||
| muss der Konfigurations-Parameter REST_SSL_VERIFY auf " | muss der Konfigurations-Parameter REST_SSL_VERIFY auf " | ||
| - | < | + | < |
| - | # | + | # to enable ssl certificate verification of REST server set YES |
| + | # | ||
| + | </ | ||
| Diese Parameter werden beim Aufbau der Session eingelesen. Daher ist es notwendig, sich nach Änderung abzumelden und wieder neu anzumelden. | Diese Parameter werden beim Aufbau der Session eingelesen. Daher ist es notwendig, sich nach Änderung abzumelden und wieder neu anzumelden. | ||