コンテンツにスキップ

認証テンプレート

認証テンプレートは、フォームベースの認証ポリシーで使用される HTML フォームを規定します。

Sophos Firewall は、カスタマイズ可能な HTML および CSS テンプレートを提供します。認証テンプレートが正しく機能するようにするには、変数の詳細を確認してください。

認証テンプレート内の変数

ここにリストされている変数を使用できます。一部は必須で、一部はオプションです。

テンプレートには、次の変数と構造が必要です。

変数 説明
<form action="<?login_path?>" method="POST"> form 要素および設定:
  • method: Post
  • action: <?login_path?>
<input name="httpd_username" type="text"> form 要素には、名前が httpd_username に設定された input 要素が必要です。

例:
<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"> form 要素には、名前が httpd_password に設定された input 要素が必要です。

例:
<form action="<?login_path?>" method="POST"><p><label for="httpd_password">Password:</label> <input name="httpd_password" type="text"></p></form>

<?login_path?> のみを置き換えます。

変数 説明
<?assets_path?> 認証テンプレートを使用してアップロードしたアセットを含むパスで置き換えます。

クリーンな認証テンプレートを使用するには、スタイルシート、イメージ、およびその他の要素をテンプレートの外側に配置します。

例:
<link rel="stylesheet" type="text/css" href="<?assets_path?>/stylesheet.css">
<?admin_contact?> 管理 > 通知の設定 > メールの設定 > メールアドレスに通知を送信」に入力したメールアドレスに置き換えられます。
<?company_logo?> Sophos ロゴを置き換えるには、ロゴへのパスを挿入します。
<?company_text?> 変数を、ユーザーに表示させるテキストに置き換えます。
<?persistency?> 現在未使用です。使用している段落を削除できます。

認証テンプレートのダウンロード

Sophos Firewall には、Web アプリケーションファイアウォールの設定に役立つ次のデフォルト認証テンプレートが用意されています。

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="<?assets_path?>/default_stylesheet.css">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>ログイン</title>
  </head>
  <body>
    <div id="container">
      <div class="info">
         <img src="<?company_logo?>" alt="">
         <p><?company_text?></p>
      </div>
      <form action="<?login_path?>" method="POST">
        <p><label for="httpd_username">Username:</label>
          <input name="httpd_username" type="text"></p>
        <p><label for="httpd_password">Password:</label>
          <input name="httpd_password" type="password"></p>
        <p style="visibility:<?persistency?>">
          <label for="httpd_persistency">Keep me logged in</label>
          <input name="httpd_persistency" type="checkbox"></p>
        <p><input type="submit" value="Login"></p>
      </form>
      <div class="note">トラブルやご質問がある場合は、こちらにご連絡ください<b><?admin_contact?></b></div>
    </div>
  </body>
</html>

CSS テンプレートのダウンロード

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%;
}

その他のリソース