blob: 5e121a189841c69dc5766ca04e9d0a13af8a899e [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja"><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
<meta content="noindex, nofollow" name="robots" />
<!--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
This file is generated from xml source: DO NOT EDIT
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
-->
<title>mod_auth - Apache HTTP サーバ</title>
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
<link href="../images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/mod/mod_auth.html" rel="canonical" /></head>
<body>
<div id="page-header">
<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p>
<p class="apache">Apache HTTP サーバ バージョン 2.0</p>
<img alt="" src="../images/feather.gif" /></div>
<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
<div id="path">
<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP サーバ</a> &gt; <a href="http://httpd.apache.org/docs/">ドキュメンテーション</a> &gt; <a href="../">バージョン 2.0</a> &gt; <a href="./">モジュール</a></div>
<div id="page-content">
<div class="retired"><h4>Please note</h4>
<p>This document refers to the <strong>2.0</strong> version of Apache httpd, which <strong>is no longer maintained</strong>. Upgrade, and refer to the current version of httpd instead, documented at:</p>
<ul><li><a href="http://httpd.apache.org/docs/current/">Current release version of Apache HTTP Server documentation</a></li></ul><p>You may follow <a href="http://httpd.apache.org/docs/current/mod/mod_auth.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>Apache モジュール mod_auth</h1>
<div class="toplang">
<p><span>翻訳済み言語: </span><a href="../en/mod/mod_auth.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../ja/mod/mod_auth.html" title="Japanese">&nbsp;ja&nbsp;</a></p>
</div>
<div class="outofdate">この日本語訳はすでに古くなっている
可能性があります。
最近更新された内容を見るには英語版をご覧下さい。
</div>
<table class="module"><tr><th><a href="module-dict.html#Description">説明:</a></th><td>テキストファイルを用いたユーザ認証</td></tr>
<tr><th><a href="module-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
<tr><th><a href="module-dict.html#ModuleIdentifier">モジュール識別子:</a></th><td>auth_module</td></tr>
<tr><th><a href="module-dict.html#SourceFile">ソースファイル:</a></th><td>mod_auth.c</td></tr>
<tr><th><a href="module-dict.html#Compatibility">互換性:</a></th><td>2.1 より前のバージョンでのみ使用可能</td></tr></table>
<h3>概要</h3>
<p>プレインテキストのパスワードファイルとグループファイルを検査して
ユーザを探すことで、HTTP 基本認証でアクセス制限できるようにします。
似たような機能で、もっと大きなスケーラビリティを持ったものは、
<code class="module"><a href="../mod/mod_auth_dbm.html">mod_auth_dbm</a></code> で提供されています。
また、HTTP ダイジェスト認証は <code class="module"><a href="../mod/mod_auth_digest.html">mod_auth_digest</a></code>
で提供されています。</p>
</div>
<div id="quickview"><h3 class="directives">ディレクティブ</h3>
<ul id="toc">
<li><img alt="" src="../images/down.gif" /> <a href="#authauthoritative">AuthAuthoritative</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#authgroupfile">AuthGroupFile</a></li>
<li><img alt="" src="../images/down.gif" /> <a href="#authuserfile">AuthUserFile</a></li>
</ul>
<h3>参照</h3>
<ul class="seealso">
<li><code class="directive"><a href="../mod/core.html#require">Require</a></code></li>
<li><code class="directive"><a href="../mod/core.html#satisfy">Satisfy</a></code></li>
<li><code class="directive"><a href="../mod/core.html#authname">AuthName</a></code></li>
<li><code class="directive"><a href="../mod/core.html#authtype">AuthType</a></code></li>
</ul></div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AuthAuthoritative" id="AuthAuthoritative">AuthAuthoritative</a> <a name="authauthoritative" id="authauthoritative">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>認証と承認プロセスを、
より低いレベルのモジュールに移行させるかどうかを設定する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AuthAuthoritative On|Off</code></td></tr>
<tr><th><a href="directive-dict.html#Default">デフォルト:</a></th><td><code>AuthAuthoritative On</code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>AuthConfig</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_auth</td></tr>
</table>
<p><code class="directive">AuthAuthoritative</code>
ディレクティブで明示的に <code>Off</code> に設定すると、
与えられた認証ユーザ ID に対して<strong>ユーザ ID がない</strong>
または<strong>ルールがない</strong>場合に、
認証と承認の両方のプロセスが、
より低いレベルのモジュール (<code>Configuration</code>
<code>modules.c</code> ファイルで定義) に移行するようにできます。
ユーザ ID がある、かつまたは、ルールが指定されている場合は、
通常のパスワードとアクセスチェックが適用されて、
認証に失敗すると "Authentication Required" 応答が返されます。</p>
<p>ですから、二つ以上のモジュールのデータベースで同一の
ユーザ ID が現われたり、
または、正しい <code class="directive"><a href="../mod/core.html#require">Require</a></code>
ディレクティブが二つ以上のモジュールで現われたりした場合は、
一つ目のモジュールが認定を行って、<code class="directive">AuthAuthoritative</code>
の設定に関わらず、
アクセスは移行しません。</p>
<p>一般的な使用法は、<code class="module"><a href="../mod/mod_auth_dbm.html">mod_auth_dbm</a></code>,
<code>mod_auth_msql</code>, <code class="module"><a href="../mod/mod_auth_anon.html">mod_auth_anon</a></code>
といったデータベースモジュールの一つと組み合わせることです。
これらのモジュールは多くのユーザ資格検査を提供してくれます。
しかし、少数の (管理者関連の) アクセスは
<code class="directive"><a href="#authuserfile">AuthUserFile</a></code>
で良く保護された、より低レベルに移行するようにします。</p>
<p>デフォルトでは、制御は移行しません。そして、未知のユーザ ID や
ルールがあっても "Authentication Required" 応答が返されます。
ですから、このディレクティブ設定しないことでシステムの安全を維持できて、また、
NCSA 準拠の挙動を強制できます。</p>
<div class="warning"><h3>セキュリティ</h3>
<p>ユーザが自分自身で作成した
.htaccess ファイルで認証できるようにすることの影響を
考慮に入れておいてください。そして、
それが本当に希望の挙動であるかどうかを検討してください。
一般的に言って、mSQL といったデータベースのセキュリティ保護よりも、
単純に一つのファイル .htpasswd のセキュリティを保護する方が容易です。
<code class="directive"><a href="#authuserfile">AuthUserFile</a></code>
<code class="directive"><a href="#authgroupfile">AuthGroupFile</a></code> は、
ウェブサーバのドキュメントツリーの外側に保管する
ようにしてください。保護しようとしているディレクトリ以下には、
<em>置かないで下さい</em>。そうしないと
<code class="directive"><a href="#authuserfile">AuthUserFile</a></code>
<code class="directive"><a href="#authgroupfile">AuthGroupFile</a></code>
はダウンロードできてしまいます。</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AuthGroupFile" id="AuthGroupFile">AuthGroupFile</a> <a name="authgroupfile" id="authgroupfile">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>認証に使用するユーザグループの一覧が格納されている、
テキストファイルの名前を設定する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AuthGroupFile <var>file-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>AuthConfig</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_auth</td></tr>
</table>
<p><code class="directive">AuthGroupFile</code> ディレクティブは、
認証に使用するユーザグループの一覧が格納されている、
テキストファイルの名前を設定します。
<var>file-path</var> はグループファイルへのパスです。
もし絶対パスでなければ、
<code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>
からの相対パスとして扱われます。</p>
<p>グループファイル各行は、グループ名、コロン、そして
スペース区切りでそのメンバーのユーザ名を記述します。</p>
<div class="example"><h3>例:</h3><p><code>
mygroup: bob joe anne
</code></p></div>
<p>大きなファイルを探索するのは、<em>非常に</em>効率が悪いという点に
注意してください。そのような場合は、
<code class="directive"><a href="../mod/mod_auth_dbm.html#authdbmgroupfile">AuthDBMGroupFile</a></code>
の方がずっと良い性能を発揮します。</p>
<div class="warning"><h3>セキュリティ</h3>
<p><code class="directive">AuthGroupFile</code> は、
ウェブサーバのドキュメントツリーの外側に
保管するようにしてください。
保護しようとしているディレクトリ以下には、<em>置かないで下さい</em>
そうしないと <code class="directive">AuthGroupFile</code>
ダウンロードできてしまいます。</p>
</div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="AuthUserFile" id="AuthUserFile">AuthUserFile</a> <a name="authuserfile" id="authuserfile">ディレクティブ</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">説明:</a></th><td>認証に使用するユーザとパスワードの一覧が格納されている、
テキストファイルの名前を設定する</td></tr>
<tr><th><a href="directive-dict.html#Syntax">構文:</a></th><td><code>AuthUserFile <var>file-path</var></code></td></tr>
<tr><th><a href="directive-dict.html#Context">コンテキスト:</a></th><td>ディレクトリ, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">上書き:</a></th><td>AuthConfig</td></tr>
<tr><th><a href="directive-dict.html#Status">ステータス:</a></th><td>Base</td></tr>
<tr><th><a href="directive-dict.html#Module">モジュール:</a></th><td>mod_auth</td></tr>
</table>
<p><code class="directive">AuthUserFile</code> ディレクティブは、
ユーザ認証のためのユーザとパスワードの一覧を格納した
テキストファイルの名前を設定します。<var>file-path</var>
はユーザファイルへのパスです。
もし絶対パスでなければ
(<em>つまり</em> スラッシュで始まらないパスであれば)
<code class="directive"><a href="../mod/core.html#serverroot">ServerRoot</a></code>
からの相対パスとして扱われます。</p>
<p>ユーザファイルの各行には、ユーザ名、コロン、
暗号化したパスワードを記述します。
同一ユーザ ID が複数回登録された時は、<code class="module"><a href="../mod/mod_auth.html">mod_auth</a></code>
パスワードの検証には最初の登録を使用します。</p>
<p>バイナリ配布の一部としてインストールされるか、
あるいは <code>src/support</code> にある
<a href="../programs/htpasswd.html">htpasswd</a>
ユーティリティで、このパスワードファイルをメインテナンスします。
詳細は <a href="../programs/htpasswd.html">man</a> ページをご覧頂くとして、
簡単には:</p>
<p>初期 ID <code>username</code> で、<code>Filename</code>
というパスワードファイルを生成します。
次のコマンドを発行するとパスワードが要求されます:</p>
<div class="example"><p><code>htpasswd -c Filename username</code></p></div>
<p>パスワードファイル <code>Filename</code> に、<code>username2</code>
を追加したり修正したりします:</p>
<div class="example"><p><code>htpasswd Filename username2</code></p></div>
<p>(訳注: 非常に多くのユーザを登録すると大きなファイルになりますが)
大きなテキストファイルを検索するのは<em>非常に</em>効率が悪い
ということに注意してください。そのような必要のある時は、
<code class="directive"><a href="../mod/mod_auth_dbm.html#authdbmuserfile">AuthDBMUserFile</a></code>
を代わりに使ってください。</p>
<div class="warning"><h3>セキュリティ</h3>
<p><code class="directive">AuthUserFile </code>
は、ウェブサーバのドキュメントツリーの外側に保管するようにしてください。
保護しようとしているディレクトリ以下には、<em>置かないで下さい</em>
そうしないと <code class="directive">AuthUserFile</code>
ダウンロードできてしまいます。</p>
</div>
</div>
</div>
<div class="bottomlang">
<p><span>翻訳済み言語: </span><a href="../en/mod/mod_auth.html" hreflang="en" rel="alternate" title="English">&nbsp;en&nbsp;</a> |
<a href="../ja/mod/mod_auth.html" title="Japanese">&nbsp;ja&nbsp;</a></p>
</div><div id="footer">
<p class="apache">Copyright 2013 The Apache Software Foundation.<br />この文書は <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a> のライセンスで提供されています。.</p>
<p class="menu"><a href="../mod/">モジュール</a> | <a href="../mod/directives.html">ディレクティブ</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">用語</a> | <a href="../sitemap.html">サイトマップ</a></p></div>
</body></html>