blob: cff5534bf1e2041450d5314bd6fed4d6dad34e01 [file] [log] [blame]
<?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: 421100 -->
<!--
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_authz_owner.xml.meta">
<name>mod_authz_owner</name>
<description>ファイルの所有者に基づいた承認</description>
<status>Extension</status>
<sourcefile>mod_authz_owner.c</sourcefile>
<identifier>authz_owner_module</identifier>
<compatibility>Apache 2.1 以降で使用可能</compatibility>
<summary>
<p>このモジュールはリクエストされたファイルのファイルシステムの
所有者やグループを HTTP 認証に使われたユーザ ID (ウェブユーザ ID) と
比較することでアクセスを承認します。提供されたユーザ名とパスワードは
<module>mod_auth_basic</module>
<module>mod_auth_digest</module> のような認証モジュールで既に
適切に検証されている必要があります。<module>mod_authz_owner</module>
は以下のように、<directive module="core"
>Require</directive> ディレクティブの <code>file-owner</code>
<code>file-group</code> という二つの引数を認識します:</p>
<dl>
<dt><code>file-owner</code></dt>
<dd>提供されたウェブユーザ名はリクエストされたファイルの所有者の
システムにおける名前と一致する必要があります。つまり、オペレーティング
システムがファイルは <code>jones</code> により所有されている
と言ったときは、ウェブからのアクセスに使われるユーザ名も
<code>jones</code> でなければなりません。</dd>
<dt><code>file-group</code></dt>
<dd>ファイルを所有するシステムのグループの名前が、例えば
<module>mod_authz_groupfile</module><module>mod_authz_dbm</module>
により提供されるグループデータベースに存在していて、
ウェブユーザ名がそのグループに属していなければなりません。
例えば、オペレーティングシステムがファイルは (システムの) グループ
<code>accounts</code> により所有されていると言ったときは、
<code>accounts</code> がグループデータベースに存在して、
リクエストに使用されたウェブユーザ名がそのグループに属している
必要があります。</dd>
</dl>
<note><title></title>
<p>ファイルシステムに実際には存在しないリソース
(<em>つまり</em> バーチャルなリソース) の承認に
<module>mod_authz_owner</module> が使用されたときは、
アクセスは拒否されます。</p>
<p>特に、<a
href="../content-negotiation.html#multiviews">コンテント
ネゴシエーションされた"MultiViews"</a> のリソースは
決して承認しません。</p>
</note>
</summary>
<seealso><directive module="core">Require</directive></seealso>
<seealso><directive module="core">Satisfy</directive></seealso>
<section id="examples"><title>設定例</title>
<section id="examples.file-owner"><title>Require file-owner</title>
<p>複数ユーザのシステムで Apache ウェブサーバが実行されていて、
<code>~/public_html/private</code> に各ユーザがファイルを置いているとします。
<directive module="mod_authn_dbm">AuthDBMUserFile</directive>
データベースが一つだけあり、すべてのウェブユーザ名が列挙されており、
このユーザ名がサーバで実際にファイルを所有しているユーザ名と一致している場合、
次の節のような設定で、ユーザが自分自身のファイルにアクセスできるようになります。
<code>/home/smith/public_html/private</code> の中のファイルは、所有者が
<code>smith</code> の代わりに <code>jones</code> になっていない限り、
<code>jones</code> にはアクセスは許可されません。</p>
<example>
&lt;Directory /home/*/public_html/private&gt;<br />
<indent>
AuthType Basic<br />
AuthName MyPrivateFiles<br />
AuthBasicProvider dbm<br />
AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all<br />
Satisfy All<br />
Require file-owner<br />
</indent>
&lt;/Directory&gt;
</example>
</section>
<section id="examples.file-group"><title>Require file-group</title>
<p>上記のようなシステムで、数人のユーザがプロジェクトのファイルを
<code>~/public_html/project-foo</code> で共有しているとします。
ファイルはシステムのグループ <code>foo</code> に所有されていて、
<directive module="mod_authz_dbm">AuthDBMGroupFile</directive>
データベースが一つだけあり、そこにすべてのウェブユーザ名と
グループのメンバが列挙されている、<em>つまり</em>、それらの
ユーザは少なくとも <code>foo</code> というグループに属している、とします。
<code>jones</code><code>smith</code> の二人共がグループ
<code>foo</code> のメンバである場合、どちらの人も両方の
<code>project-foo</code> にアクセスが許可されます。</p>
<example>
&lt;Directory /home/*/public_html/project-foo&gt;<br />
<indent>
AuthType Basic<br />
AuthName "Project Foo Files"<br />
AuthBasicProvider dbm<br />
<br />
# combined user/group database<br />
AuthDBMUserFile /usr/local/apache2/etc/.htdbm-all<br />
AuthDBMGroupFile /usr/local/apache2/etc/.htdbm-all<br />
<br />
Satisfy All<br />
Require file-group<br />
</indent>
&lt;/Directory&gt;
</example>
</section>
</section>
<directivesynopsis>
<name>AuthzOwnerAuthoritative</name>
<description>承認が下位承認モジュールに渡されるかどうかを設定する</description>
<syntax>AuthzOwnerAuthoritative On|Off</syntax>
<default>AuthzOwnerAuthoritative On</default>
<contextlist><context>directory</context><context>.htaccess</context>
</contextlist>
<override>AuthConfig</override>
<usage>
<p><directive>AuthzOwnerAuthoritative</directive> ディレクティブを
明示的に <code>Off</code> に設定すると、以下の場合に認証が
(<code>modules.c</code> で定義されている) 下位のモジュールに
渡されるようにします:</p>
<ul>
<li><code>file-owner</code> の場合は、提供されたウェブユーザ名に
ファイルシステムの所有者が一致しないか、所有者がわからない場合。</li>
<li><code>file-group</code> の場合は、提供されたウェブユーザ名が
ファイルシステムグループに存在しないか、わからない場合。</li>
</ul>
<p>値を <code>Off</code> に設定すると、<code>file-owner</code>
<code>file-group</code> を組み合わせることもできるようになり、
その場合はどちらか (両方でも) にマッチした場合にアクセスを許可されます。</p>
<p>デフォルトでは制御は渡されず、未知のグループの場合は Authentication
Required 応答が返されます。ですから、<code>Off</code> に設定しないことで
システムを安全に保つことができ、NCSA 互換の振る舞いをさせることになります。</p>
</usage>
</directivesynopsis>
</modulesynopsis>