This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:dev:284:security [17.02.2016 08:31] – [Feste Einstellungen] Manuela v.d.Decken | en:dev:284:security [24.03.2016 21:41] (current) – finished translation and removed fixme mrbaseman | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | FIXME **This page is not fully translated, yet. Please help completing the translation.**\\ //(remove this paragraph once the translation is finished)// | ||
- | |||
====== System Security ====== | ====== System Security ====== | ||
- | (ein ganzes Paket an Einzelelementen. Von Passwortverschlüsselung bis zum Schutz vor CrossSiteScripting.) | + | (A whole package of individual elements. From password encryption to measurements to protect against cross-site scripting.) |
+ | ===== SecureTokens against CrossSiteScripting ===== | ||
+ | An essential component to protect against cross-site scripting is the use of tokens in the submission of forms and other change requests. | ||
+ | Website Baker is providing the class **S// | ||
- | ===== SecureTokens gegen CrossSiteScripting ===== | + | ==== Explanation of terms ==== |
- | Ein wesentlicher Bestandteil zum Schutz gegen CrossSiteScripting ist der Einsatz von Tokens bei der Übermittlung von Formularen und sonstigen Änderungsanforderungen. | + | **// |
- | WebsiteBaker stellt dafür die Klasse **S// | + | In contrast to the simple, 4-digit TAN a full FTAN consists of a 16-digit alphanumeric identifier and the associated, also 16-digit, alphanumeric value. Both identifiers and the value change at each request on a random basis. |
- | ==== Begriffserklärung | + | |
- | **// | + | |
- | Im Unterschied zu der einfachen, 4-stelligen | + | |
- | **// | + | **// |
- | ==== Feste Einstellungen | + | ==== Fixed Settings |
- | ^ Konstante | + | ^ constant |
- | ^ LIFETIME_MIN | + | ^ LIFETIME_MIN |
- | ^ LIFETIME_MAX | + | ^ LIFETIME_MAX |
- | ^ LIFETIME_STEP | + | ^ LIFETIME_STEP |
- | ^ DEBUG_LIFETIME | 300 | Tokenlebensdauer | + | ^ DEBUG_LIFETIME | 300 | Token lifetime in seconds |
- | Die maximale Lebenszeit von Tokens ist auf eine vernünftige, sinnvolle Bearbeitungsdauer eingestellt und sollte auf keinen Fall verlängert werden. Grundsätzlich verfallen auch alle Tokens, wenn die aktuelle Session ihren Timeout erreicht.\\ | + | The maximum lifetime of the token is set to a sensible, reasonable processing time and should not be extended under any circumstances. Basically all tokens turn invalid when the current session times out. \\ |
- | :!: Je länger die mögliche Bearbeitungszeit wird, desto grösser wird das Risiko einer erfolgreichen Attacke. | + | :!: The longer the possible processing time is, the greater is the risk of a successful attack. |
---- | ---- | ||
- | |||
==== Registry-Settings ==== | ==== Registry-Settings ==== | ||
- | // | + | // |
- | Diese vier Werte können im Backend unter //Settings-Sicherheit// eingestellt werden. | + | These four values can be set in the backend under // |
**SecTokenLifeTime**\\ | **SecTokenLifeTime**\\ | ||
- | Die 'Lebensdauer' | + | The 'life time' |
- | Die Einstellung erfolgt durch einen entsprechenden Eintrag | + | The adjustment is made by a corresponding entry in the registry using the Settings |
- | Wird ein negativer Wert (< | + | If a negative value (< |
**SecTokenFingerprint**\\ | **SecTokenFingerprint**\\ | ||
- | Hiermit kann das Fingerprinting des Client vollständig eingeschaltet(**true**) | + | Herewith the fingerprinting of the client can be turned completely on (**true**) |
- | Die Abschaltung wird aus Sicherheitsgründen | + | Turning it off for security reasons is **not** recommended! |
**SecTokenIpv4Netmask**\\ | **SecTokenIpv4Netmask**\\ | ||
- | Hiermit wird der zu überprüfende Netzanteil einer IPv4 Adresse festgelegt. Möglich sind Netzmaskenlängen von 1-32 Bit. Eine Länge von 0 Bit setzt die IPv4-Überprüfung ausser Funktion. | + | Herewith the IPv4 address network share to verify is specified. Allowed netmask lengths are 1-32 bit. A length of 0 bit logically disables |
**SecTokenIpv6Netmask**\\ | **SecTokenIpv6Netmask**\\ | ||
- | Hiermit wird der zu überprüfende Netzanteil einer IPv6 Adresse festgelegt. Möglich sind Netzmaskenlängen von 1-128 Bit. Eine Länge von 0 Bit setzt die IPv6-Überprüfung ausser Funktion. | + | Herewith the IPv6 address network share to verify is specified. Allowed netmask lengths are 1-128 bit. A length of 0 bit logically disables |
---- | ---- | ||
- | + | ==== Available Methods | |
- | ==== Verfügbare Methoden | + | |
=== ::getFTAN === | === ::getFTAN === | ||
**Prototype: | **Prototype: | ||
- | Gibt die FTAN des aktuellen Requests zurück. Beim ersten Aufruf von getFTAN() | + | Returns the FTAN for the current request. During the first call to getFTAN() |
- | Das Argument | + | The argument |
- | * ' | + | * ' |
- | * ' | + | * ' |
- | * ' | + | * ' |
=== ::checkFtan === | === ::checkFtan === | ||
**Prototype: | **Prototype: | ||
- | Es wird überprüft, | + | It is checked whether a valid FTAN was passed in the current request. The argument |
- | Bei gültiger | + | If the FTAN is valid the return value is TRUE or FALSE otherwise. |
=== ::getIDKEY === | === ::getIDKEY === | ||
**Prototype: | **Prototype: | ||
- | Der an die Methode übergebene Wert wird gesichert und dafür ein einmaliger, 16-stelliger, alphanumerischer Schlüsselwert zurückgegeben. | + | The value passed to the method is saved and instead a value for a one-time, 16-digit alphanumeric key is returned. |
- | Es können folgende Datentypen übergeben werden: **// | + | The following data types can be passed: **// |
=== :: | === :: | ||
**Prototype: | **Prototype: | ||
- | * **// | + | * **// |
- | * **// | + | * **// |
=== :: | === :: | ||
**Prototype: | **Prototype: | ||
- | Ein übergebener Integer-Wert wird auf eine verfügbare Intervallstufe zwischen | + | The supplied integer value is corrected to an available interval between |
=== :: | === :: | ||
**Prototype: | **Prototype: | ||
- | Gibt ein Array mit folgenden Schlüsseln zurück: | + | Returns an array with the following keys: |
- | ^Schlüssel | + | ^Key ^ Description |
- | | min | minimale Lebensdauer | + | | min | minimum lifetime |
- | | max | maximale Lebensdauer | + | | max | maximum lifetime |
- | | step | Schrittweite | + | | step | Increment |
- | | value| | + | | value| |
- | Wozu werden diese Werte benötigt? An das Template übergeben, lässt sich eine Fortschrittsanzeige realisieren, | + | What are these values needed for? Transfered to the template, one can for instance implement a progress bar that visually displays the time until timeout. |
---- | ---- | ||
- | ==== Anwendungsbeispiele | + | ==== Examples |
- | :!: **Achtung:** Requests | + | :!: **Warning** Requests |
- | === Formular | + | === Form === |
<PHP> | <PHP> | ||
$sOutput = '< | $sOutput = '< | ||
Line 95: | Line 91: | ||
echo $sOutput; | echo $sOutput; | ||
- | // Auswertung | + | // Evaluation |
- | if ($oReg-> | + | if ($oReg-> |
$iRecordId = $oReg-> | $iRecordId = $oReg-> | ||
Line 107: | Line 103: | ||
echo $sOutput; | echo $sOutput; | ||
- | // Auswertung | + | // Evaluation |
- | if ($oReg-> | + | if ($oReg-> |
$iRecordId = $oReg-> | $iRecordId = $oReg-> | ||
Line 124: | Line 120: | ||
twig-template | twig-template | ||
- | // Beispiel | + | // Example |
< | < | ||
< | < | ||
Line 131: | Line 127: | ||
</ | </ | ||
- | // Beispiel | + | // Example |
- | <a href=" | + | <a href=" |
</ | </ | ||
<PHP> | <PHP> | ||
save-script | save-script | ||
- | // Beispiel | + | // Example |
if ($oReg-> | if ($oReg-> | ||
$record_id = $oReg-> | $record_id = $oReg-> | ||
[...] | [...] | ||
} | } | ||
- | // Beispiel | + | // Example |
if ($oReg-> | if ($oReg-> | ||
$record_id = $oReg-> | $record_id = $oReg-> |