summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_auth.xml.ja
blob: 1d0d6227308162d148fcc9ba0edbbfcbd1e98952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE modulesynopsis SYSTEM "../style/modulesynopsis.dtd">
<?xml-stylesheet type="text/xsl" href="../style/manual.ja.xsl"?>
<!-- English Revision: 106090:421174 (outdated) -->

<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<modulesynopsis metafile="mod_auth.xml.meta">

<name>mod_auth</name>
<description>テキストファイルを用いたユーザ認証</description>
<status>Base</status>
<sourcefile>mod_auth.c</sourcefile>
<identifier>auth_module</identifier>
<compatibility>2.1 より前のバージョンでのみ使用可能</compatibility>

<summary>
    <p>プレインテキストのパスワードファイルとグループファイルを検査して
    ユーザを探すことで、HTTP 基本認証でアクセス制限できるようにします。
    似たような機能で、もっと大きなスケーラビリティを持ったものは、
    <module>mod_auth_dbm</module> で提供されています。
    また、HTTP ダイジェスト認証は <module>mod_auth_digest</module>
    で提供されています。</p>

</summary>
<seealso><directive module="core">Require</directive></seealso>
<seealso><directive module="core">Satisfy</directive></seealso>
<seealso><directive module="core">AuthName</directive></seealso>
<seealso><directive module="core">AuthType</directive></seealso>

<directivesynopsis>
<name>AuthGroupFile</name>
<description>認証に使用するユーザグループの一覧が格納されている、
テキストファイルの名前を設定する</description>
<syntax>AuthGroupFile <var>file-path</var></syntax>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p><directive>AuthGroupFile</directive> ディレクティブは、
    認証に使用するユーザグループの一覧が格納されている、
    テキストファイルの名前を設定します。
    <var>file-path</var> はグループファイルへのパスです。
    もし絶対パスでなければ、
    <directive module="core">ServerRoot</directive>
    からの相対パスとして扱われます。</p>

    <p>グループファイル各行は、グループ名、コロン、そして
    スペース区切りでそのメンバーのユーザ名を記述します。</p>

    <example><title>例:</title>
      mygroup: bob joe anne
    </example> 

    <p>大きなファイルを探索するのは、<em>非常に</em>効率が悪いという点に
    注意してください。そのような場合は、
    <directive module="mod_auth_dbm">AuthDBMGroupFile</directive>
    の方がずっと良い性能を発揮します。</p>

    <note type="warning"><title>セキュリティ</title>
      <p><directive>AuthGroupFile</directive> は、
      ウェブサーバのドキュメントツリーの外側に
      保管するようにしてください。
      保護しようとしているディレクトリ以下には、<em>置かないで下さい</em>。
      そうしないと <directive>AuthGroupFile</directive> は
      ダウンロードできてしまいます。</p>
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>AuthUserFile</name>
<description>認証に使用するユーザとパスワードの一覧が格納されている、
テキストファイルの名前を設定する</description>
<syntax>AuthUserFile <var>file-path</var></syntax>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p><directive>AuthUserFile</directive> ディレクティブは、
    ユーザ認証のためのユーザとパスワードの一覧を格納した
    テキストファイルの名前を設定します。<var>file-path</var>
    はユーザファイルへのパスです。
    もし絶対パスでなければ
    (<em>つまり</em> スラッシュで始まらないパスであれば)
    、<directive module="core">ServerRoot</directive>
    からの相対パスとして扱われます。</p>

    <p>ユーザファイルの各行には、ユーザ名、コロン、
    暗号化したパスワードを記述します。
    同一ユーザ ID が複数回登録された時は、<module>mod_auth</module> は
    パスワードの検証には最初の登録を使用します。</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>

    <example>htpasswd -c Filename username</example>

    <p>パスワードファイル <code>Filename</code> に、<code>username2</code>
    を追加したり修正したりします:</p>

    <example>htpasswd Filename username2</example>

    <p>(訳注: 非常に多くのユーザを登録すると大きなファイルになりますが)
    大きなテキストファイルを検索するのは<em>非常に</em>効率が悪い
    ということに注意してください。そのような必要のある時は、
    <directive module="mod_auth_dbm">AuthDBMUserFile</directive>
    を代わりに使ってください。</p>

    <note type="warning"><title>セキュリティ</title>
      <p><directive>AuthUserFile </directive>
      は、ウェブサーバのドキュメントツリーの外側に保管するようにしてください。
      保護しようとしているディレクトリ以下には、<em>置かないで下さい</em>。
      そうしないと <directive>AuthUserFile</directive> は
      ダウンロードできてしまいます。</p>
    </note>
</usage>
</directivesynopsis>

<directivesynopsis>
<name>AuthAuthoritative</name>
<description>認証と承認プロセスを、
より低いレベルのモジュールに移行させるかどうかを設定する</description>
<syntax>AuthAuthoritative On|Off</syntax>
<default>AuthAuthoritative On</default>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>

<usage>
    <p><directive>AuthAuthoritative</directive>
    ディレクティブで明示的に <code>Off</code> に設定すると、
    与えられた認証ユーザ ID に対して<strong>ユーザ ID がない</strong>
    または<strong>ルールがない</strong>場合に、
    認証と承認の両方のプロセスが、
    より低いレベルのモジュール (<code>Configuration</code> と 
    <code>modules.c</code> ファイルで定義) に移行するようにできます。
    ユーザ ID がある、かつまたは、ルールが指定されている場合は、
    通常のパスワードとアクセスチェックが適用されて、
    認証に失敗すると "Authentication Required" 応答が返されます。</p>

    <p>ですから、二つ以上のモジュールのデータベースで同一の
    ユーザ ID が現われたり、
    または、正しい <directive module="core">Require</directive>
    ディレクティブが二つ以上のモジュールで現われたりした場合は、
    一つ目のモジュールが認定を行って、<directive>AuthAuthoritative</directive>
    の設定に関わらず、
    アクセスは移行しません。</p>

    <p>一般的な使用法は、<module>mod_auth_dbm</module>,
    <code>mod_auth_msql</code>, <module>mod_auth_anon</module>
    といったデータベースモジュールの一つと組み合わせることです。
    これらのモジュールは多くのユーザ資格検査を提供してくれます。
    しかし、少数の (管理者関連の) アクセスは
    <directive module="mod_auth">AuthUserFile</directive>
    で良く保護された、より低レベルに移行するようにします。</p>

    <p>デフォルトでは、制御は移行しません。そして、未知のユーザ ID や
    ルールがあっても "Authentication Required" 応答が返されます。
    ですから、このディレクティブ設定しないことでシステムの安全を維持できて、また、
    NCSA 準拠の挙動を強制できます。</p>

    <note type="warning"><title>セキュリティ</title>
      <p>ユーザが自分自身で作成した
      .htaccess ファイルで認証できるようにすることの影響を
      考慮に入れておいてください。そして、
      それが本当に希望の挙動であるかどうかを検討してください。
      一般的に言って、mSQL といったデータベースのセキュリティ保護よりも、
      単純に一つのファイル .htpasswd のセキュリティを保護する方が容易です。
      <directive module="mod_auth">AuthUserFile</directive> と
      <directive module="mod_auth">AuthGroupFile</directive> は、
      ウェブサーバのドキュメントツリーの外側に保管する
      ようにしてください。保護しようとしているディレクトリ以下には、
      <em>置かないで下さい</em>。そうしないと 
      <directive module="mod_auth">AuthUserFile</directive> と
      <directive module="mod_auth">AuthGroupFile</directive>
      はダウンロードできてしまいます。</p>
    </note>
</usage>
</directivesynopsis>

</modulesynopsis>