This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:dev:284:security [24.03.2016 19:37] – [System Security] translate first sentence mrbaseman | 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 ====== | ||
| (A whole package of individual elements. From password encryption to measurements to protect against cross-site scripting.) | (A whole package of individual elements. From password encryption to measurements to protect against cross-site scripting.) | ||
| - | ===== SecureTokens | + | ===== SecureTokens |
| - | Ein wesentlicher Bestandteil zum Schutz gegen CrossSiteScripting ist der Einsatz von Tokens bei der Übermittlung von Formularen und sonstigen Änderungsanforderungen. | + | An essential component to protect against cross-site scripting is the use of tokens in the submission of forms and other change requests. |
| - | WebsiteBaker stellt dafür die Klasse | + | Website Baker is providing the class **S// |
| - | ==== Begriffserklärung ==== | + | |
| - | **// | + | |
| - | Im Unterschied zu der einfachen, 4-stelligen TAN jedoch besteht eine vollständige FTAN aus einem 16-stelligen, | + | |
| - | **//IDKEY//** => Das zweite Standbein der Sicherung. Er wird hauptsächlich eingesetzt, um die Datensatz-IDs in Formularen und anderen Requests zu verschleiern. Die ID wird dabei durch einen einmaligen, 16-stelligen, alphanumerischen Wert ersetzt. Wird ein gleicher Wert mehrmals verschlüsselt, | + | ==== Explanation of terms ==== |
| + | **//FTAN//** => This term was chosen based on the **T**rans**A**ctions**N**umbers known from online banking, as they are also valid only for a single transaction within a strictly defined period of time. \\ | ||
| + | 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. | ||
| - | ==== Feste Einstellungen ==== | + | **// |
| - | ^ Konstante | + | ==== Fixed Settings ==== |
| - | ^ LIFETIME_MIN | + | |
| - | ^ LIFETIME_MAX | + | |
| - | ^ LIFETIME_STEP | + | |
| - | ^ DEBUG_LIFETIME | 300 | Tokenlebensdauer in Sekunden im DEBUG-Modus | + | |
| - | Die maximale Lebenszeit von Tokens ist auf eine vernünftige, | + | |
| - | :!: Je länger die mögliche Bearbeitungszeit wird, desto grösser wird das Risiko einer erfolgreichen Attacke. | + | |
| - | ---- | + | |
| + | ^ constant | ||
| + | ^ LIFETIME_MIN | ||
| + | ^ LIFETIME_MAX | ||
| + | ^ LIFETIME_STEP | ||
| + | ^ DEBUG_LIFETIME | 300 | Token lifetime in seconds in DEBUG mode | | ||
| + | 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. \\ | ||
| + | :!: 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 z.B. 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 94: | Line 91: | ||
| echo $sOutput; | echo $sOutput; | ||
| - | // Auswertung | + | // Evaluation |
| - | if ($oReg-> | + | if ($oReg-> |
| $iRecordId = $oReg-> | $iRecordId = $oReg-> | ||
| Line 106: | Line 103: | ||
| echo $sOutput; | echo $sOutput; | ||
| - | // Auswertung | + | // Evaluation |
| - | if ($oReg-> | + | if ($oReg-> |
| $iRecordId = $oReg-> | $iRecordId = $oReg-> | ||
| Line 123: | Line 120: | ||
| twig-template | twig-template | ||
| - | // Beispiel | + | // Example |
| < | < | ||
| < | < | ||
| Line 130: | 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-> | ||