Authentifizierungsvorlagen
Authentifizierungsvorlagen definieren HTML-Formulare zur Verwendung in formularbasierten Authentifizierungsrichtlinien.
Die Sophos Firewall bietet anpassbare HTML- und CSS-Vorlagen. Um sicherzustellen, dass die Authentifizierungsvorlagen einwandfrei funktionieren, sollten Sie sich näher mit den Variablen vertraut machen.
Variablen in Authentifizierungsvorlagen
Sie können die hier aufgeführten Variablen verwenden. Einige sind erforderlich, andere optional.
Die Vorlage muss folgende Variablen und Struktur aufweisen:
| Variable | Beschreibung |
|---|---|
<form action="<?login_path?>" method="POST"> | Ein Formularelement mit folgendem Inhalt:
|
<input name="httpd_username" type="text"> | Das Formularelement muss ein Eingabeelement mit dem Namen httpd_username enthalten. Beispiel: <form action="<?login_path?>" method="POST"><p><label for="httpd_username">Username:</label> <input name="httpd_username" type="text"></p></form> |
<input name="httpd_password" type="password"> | Das Formularelement muss ein Eingabeelement mit dem Namen httpd_password enthalten. Beispiel: <form action="<?login_path?>" method="POST"><p><label for="httpd_password">Password:</label> <input name="httpd_password" type="text"></p></form> |
Notiz
Nur <?login_path?> wird ersetzt.
| Variable | Beschreibung |
|---|---|
<?assets_path?> | Ersetzt durch den Pfad, der die Assets enthält, die Sie mit der Authentifizierungsvorlage hochladen. Um eine übersichtliche Authentifizierungsvorlage zu erhalten, platzieren Sie die Stylesheets, Bilder und andere Elemente außerhalb der Vorlage. Beispiel: <link rel="stylesheet" type="text/css" href="<?assets_path?>/stylesheet.css"> |
<?admin_contact?> | Ersetzt durch die eingegebene E-Mail-Adresse Verwaltung > Benachrichtigungseinstellungen > E-Mail-Einstellungen > Benachrichtigungen an die E-Mail-Adresse senden. |
<?company_logo?> | Um das Sophos-Logo zu ersetzen, fügen Sie den Pfad zu Ihrem Logo ein. |
<?company_text?> | Ersetzen Sie die Variable durch den Text, den die Benutzer sehen sollen. |
<?persistency?> | Wird derzeit nicht verwendet. Sie können den Absatz, in dem es verwendet wird, entfernen. |
Authentifizierungsvorlage herunterladen
Die Sophos Firewall bietet die folgende Standardauthentifizierungsvorlage, um Sie beim Schutz Ihrer Webserver mithilfe von WAF-Regeln zu unterstützen. Siehe WAF.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <Kopf> <Link rel="Stylesheet" Typ="text/css" href="<?assets_path?> /default_stylesheet.css"> <Meta http-equiv="content-type" Inhalt="text/html; charset=UTF-8"> <Titel>Login</Titel> </Kopf> <Körper> <div Ausweis="Container"> <div Klasse="Info"> <Bild Quelle="<?company_logo?> " alle=""> <P><?company_text?></P> </div> <bilden Aktion="<?login_path?> " Verfahren="POST"> <P>Etikett für="httpd_username">Username:</Etikett> <Eingang Name="httpd_username" Typ="Text"</P> <P>Etikett für="httpd_password">Password:</Etikett> <Eingang Name="httpd_password" Typ="Passwort"</P> <P Stil="Sichtweite:<?persistency?> "> <Etikett für="httpd_persistency">Keep me logged in</Etikett> <Eingang Name="httpd_persistency" Typ="Kontrollkästchen"</P> <P>Eingang Typ="einreichen" Wert="Login"</P> </bilden> <div Klasse="Notiz">If you encounter any problems or questions, please contact <B><?admin_contact?></B>.</div> </div> </Körper> </html> CSS-Vorlage herunterladen
html, body { width: 100%; height: 100%; color: #444; background: #f0f0f0; font: 9pt Arial,Helvetica,sans-serif; } #container { position: fixed; width: 340px; height: 470px; top: 40%; left: 50%; margin-top: -170px; margin-left: -170px; background: #fff; border-radius: 3px; border: 1px solid #ccc; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); } .info { font-size: 14px; padding-left: 20px; padding-top: 20px; line-height: 23px; text-align: center; } .note { font-size: 11.5px; color: #606060; line-height: 14px; float: left; margin: 20px; text-align: justify; } form { margin: 0 auto; margin-top: 20px; } label { color: #555; display: inline-block; margin-left: 18px; padding-top: 10px; font-size: 14px; } input { font-size: 12px; outline: none; } input[type=text], input[type=password] { color: #777; padding-left: 10px; margin: 10px; margin-top: 12px; margin-left: 18px; width: 300px; height: 35px; } input[type=text]:focus, input[type=password]:focus { border: 1px solid #a8c9e4; box-shadow: inset 0 1.5px 3px rgba(190, 190, 190, .4), 0 0 0 5px #e6f2f9; } input[type=submit] { float: right; margin-right: 20px; margin-top: 20px; width: 80px; height: 30px; font-size: 14px; width: 80px; height: 30px; left: 50%; } Weitere Ressourcen