auth.xml.ko revision b244bbf442a0aea3dc397b4d0d751f4716c5891d
<?xml version='1.0' encoding='EUC-KR' ?>
<!DOCTYPE manualpage SYSTEM "/style/manualpage.dtd">
<?xml-stylesheet type="text/xsl" href="/style/manual.ko.xsl"?>
<!-- English Revision: 105989:1561569 (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.
-->
<manualpage metafile="auth.xml.meta">
<parentdocument href="./">How-To / Tutorials</parentdocument>
<title>����(Authentication), ���Ѻο�(Authorization),
��������(Access Control)</title>
<summary>
<p>����(authentication)�� �ڽ��� ������� �����ϴ� �����
Ȯ���ϴ� �����̴�. ���Ѻο�(authorization)�� ���� ���� ������
������ Ȥ�� ���ϴ� ������ �򵵷� ����ϴ� �����̴�.</p>
</summary>
<section id="related"><title>��� ���� ���þ�</title>
<related>
<modulelist>
<module>mod_auth_basic</module>
<module>mod_authn_file</module>
<module>mod_authz_groupfile</module>
<module>mod_authz_host</module>
</modulelist>
<directivelist>
<directive module="mod_authz_host">Allow</directive>
<directive module="mod_authz_groupfile">AuthGroupFile</directive>
<directive module="core">AuthName</directive>
<directive module="core">AuthType</directive>
<directive module="mod_authn_file">AuthUserFile</directive>
<directive module="mod_authz_host">Deny</directive>
<directive module="core">Options</directive>
<directive module="core">Require</directive>
</directivelist>
</related>
</section>
<section id="introduction"><title>�Ұ�</title>
<p>����� ������Ʈ�� �ִ� ������ �Ҽ��� ����鸸�� ����̰ų�
�̵鸸�� ���� �������, �� �ۿ��� �����ϴ� ����� ����Ͽ�
����� ���� ���ϴ� ����� �������� ������ �� �� �ִ�.</p>
<p>�� ���� ������Ʈ�� �Ϻθ� ��ȣ�ϱ����� ���� �������
����ϴ� "ǥ������" ����� �ٷ��.</p>
</section>
<section id="theprerequisites"><title>�⺻ ����</title>
<p>�� �ۿ��� �ٷ�� ���þ�� ������ �ּ�������(�Ϲ�������
<directive module="core" type="section">Directory</directive>
����)�̳� ���丮�� ��������(<code>.htaccess</code> ����)����
����Ѵ�.</p>
<p><code>.htaccess</code> ������ ����Ϸ��� �� ���Ͽ� �ִ�
���� ���þ ����ϵ��� ������ �����ؾ� �Ѵ�. �̸� ����
���丮�� �������Ͽ� � ���þ ����� �� �ִ����� �����ϴ�
<directive module="core">AllowOverride</directive> ���þ
����Ѵ�.</p>
<p>���⼭�� ������ �ٷ�� ������, ������ ����
<code>AllowOverride</code> ���þ �ʿ��ϴ�.</p>
<example>
AllowOverride AuthConfig
</example>
<p>Ȥ�� ���þ ���� ���� �ּ������Ͽ� ��´ٸ�, �� ���Ͽ�
���� ������ ���� �־�� �Ѵ�.</p>
<p>�׸��� ��ȣ�� ������ ����ִ��� �˱����� ������ ���丮
������ ���� ���� �˾ƾ��Ѵ�. �� ���� ������ʰ�, �����
���� �ڼ��� ������ ���̴�.</p>
</section>
<section id="gettingitworking"><title>�⺻���� �����ϱ�</title>
<p>���� ������ ���丮�� ��ȣ�� ��ȣ�ϴ� �⺻���� �����
�����Ѵ�.</p>
<p>���� ��ȣ������ ������ �Ѵ�. �� ������ ������ ������
�� ��� ���� �־�� �Ѵ�. �ٸ������ ��ȣ������ �ٿ�ε�����
���ϰ��ϱ� ���ؼ���. ���� ���, ��������
<code>/usr/local/apache/htdocs</code>�� �ִٸ� ��ȣ����(��)��
<code>/usr/local/apache/passwd</code>�� �д�.</p>
<p>����ġ�� ���Ե� <a
href="/programs/htpasswd.html">htpasswd</a> ������ ����Ͽ�
��ȣ������ �����. �� ���α׷��� ����ġ�� ��ġ�� ����
<code>bin</code> ���丮�� �ִ�. ������ ������� ������
���� �Է��Ѵ�.</p>
<example>
htpasswd -c /usr/local/apache/passwd/passwords rbowen
</example>
<p><code>htpasswd</code>�� ��ȣ�� �����, Ȯ���� ����
��ȣ�� �ٽ� �Է��϶�� ��û�Ѵ�.</p>
<example>
# htpasswd -c /usr/local/apache/passwd/passwords rbowen<br />
New password: mypassword<br />
Re-type new password: mypassword<br />
Adding password for user rbowen
</example>
<p>���� <code>htpasswd</code>�� �������� ��ο� ��ٸ�
���������� ��ü ��θ� �Է��ؾ� �Ѵ�. ���� ����ϴ� ����������
<code>/usr/local/apache/bin/htpasswd</code>�� ����������
�ִ�.</p>
<p>�������� ������ ��ȣ�� ��û�ϵ��� �����ϰ�, ��������
� ������� ������ ������� �˷���� �Ѵ�.
<code>httpd.conf</code>�� �����ϰų� <code>.htaccess</code>
������ ����Ͽ� �����Ѵ�. ���� ���,
<code>/usr/local/apache/htdocs/secret</code> ���丮��
��ȣ�Ϸ���, �Ʒ� ���þ
<code>/usr/local/apache/htdocs/secret/.htaccess</code> �����̳�
<code>httpd.conf</code>�� &lt;Directory
/usr/local/apache/apache/htdocs/secret&gt; ���ǿ� ����
�Ѵ�.</p>
<example>
AuthType Basic<br />
AuthName "Restricted Files"<br />
AuthUserFile /usr/local/apache/passwd/passwords<br />
Require user rbowen
</example>
<p>���þ �ϳ��� ���캸��. <directive
module="core">AuthType</directive> ���þ�� ����ڸ� ������
����� �����Ѵ�. ���� �Ϲ����� ����� <code>Basic</code>����,
<module>mod_auth_basic</module>�� �����Ѵ�. �׷��� Basic
������ ������ ������ ��ȣ�� ��ȣȭ���� �ʰ� ������.
�׷��Ƿ� ��� �ڷḦ ��ȣ�ϱ����� �� ����� ����ϸ� �ȵȴ�.
����ġ�� <code>AuthType Digest</code>��� ���� ��� �����Ѵ�.
�� ����� <module>mod_auth_digest</module>�� �����ϸ�, �ſ�
�����ϴ�. ���� �ֱ� Ŭ���̾�Ʈ�鸸�� Digest ������ �����Ѵٰ�
�Ѵ�.</p>
<p><directive module="core">AuthName</directive> ���þ��
������ ����� <dfn>����(realm)</dfn>�� �����Ѵ�. ������
�ΰ��� ������ �Ѵ�. ù��°�� Ŭ���̾�Ʈ�� ���� �� ������
��ȣ ��ȭâ�� �����ش�. �ι�°�� ���� ������ ����Ͽ�
Ŭ���̾�Ʈ�� Ư�� ���������� � ��ȣ�� ������ �����Ѵ�.</p>
<p>���� ���, �ϴ� Ŭ���̾�Ʈ�� <code>"Restricted Files"</code>
������ ������ �����Ͽ��ٸ�, Ŭ���̾�Ʈ�� �ڵ����� ���� ��������
<code>"Restricted Files"</code> �������� ǥ�õ� ������ ����
������ ��ȣ�� �õ��Ѵ�. �׷��� ���� ���� ������ ���� ������
�����ϸ� ����ڰ� ������ ��ȣ�� �Է����� �ʾƵ� �ȴ�. ����
���Ȼ� ������ Ŭ���̾�Ʈ�� ������ ȣ��Ʈ���� �ٸ��� �׻�
���� ��ȣ�� �����.</p>
<p><directive module="mod_authn_file">AuthUserFile</directive>
���þ�� �츮�� ��� <code>htpasswd</code>�� ���� ��ȣ������
��θ� �����Ѵ�. ����ڰ� ���ٸ� ��û���� �Ź� ����ڸ�
�����ϱ����� �Ϲ� ���������� �˻��ϴµ� �ð��� ����� ����
�ɸ� �� �ִ�. ����ġ�� �� ����Ÿ���̽� ���Ͽ� ����� ������
������ �� �ִ�. <module>mod_authn_dbm</module> ����� <directive
module="mod_authn_dbm">AuthDBMUserFile</directive> ���þ
�����Ѵ�. <a href="/programs/dbmmanage.html">dbmmanage</a>
���α׷��� ����Ͽ� ��ȣ������ ����� �ٷ��. <a
href="http://modules.apache.org/">����ġ ���
����Ÿ���̽�</a>���� ���� �ٸ� ���� ����� �����ϴ� �����ڰ�
���� ������ �ִ�.</p>
<p>���������� <directive module="core">Require</directive>
���þ�� ������ Ư�� ������ ������ �� �ִ� ����ڸ� �����Ͽ�
���Ѻο��� �Ѵ�. ���� ���� <code>require</code> ���þ
����ϴ� �پ��� ����� �����Ѵ�.</p>
</section>
<section id="lettingmorethanonepersonin"><title>�������� �鿩������</title>
<p>���� ���þ�� ���丮�� (����ڸ��� <code>rbowen</code>��)
�� ������� �鿩������. ��κ��� ��� ���� ����� �鿩������
���� ���̴�. ���� <directive
module="mod_authz_groupfile">AuthGroupFile</directive>��
����� ����.</p>
<p>���� ����� �鿩������ �ʹٸ� �׷��� �� �׷쿡 �
����ڵ��� �ִ��� �˷��ִ� �׷������� �ʿ��ϴ�. �� ������
����� �ſ� �����Ͽ�, �ƹ� �����γ� ���� �� �ִ�. ���ϳ�����
������ ����.</p>
<example>
GroupName: rbowen dpitts sungo rshersey
</example>
<p>�׳� ������� ������ �� �׷� ������ ����� ���̴�.</p>
<p>������ ��ȣ���Ͽ� ����ڸ� �߰��Ϸ��� ������ ���� �Է��Ѵ�</p>
<example>
htpasswd /usr/local/apache/passwd/passwords dpitts
</example>
<p>��� ������, ���� ������ ������ �ʰ� ���� ���Ͽ� ����ڸ�
�߰��Ѵ�. (<code>-c</code> �ɼ��� ���� ��ȣ������ �����).</p>
<p>���� <code>.htaccess</code> ������ ������ ���� �����Ѵ�.</p>
<example>
AuthType Basic<br />
AuthName "By Invitation Only"<br />
AuthUserFile /usr/local/apache/passwd/passwords<br />
AuthGroupFile /usr/local/apache/passwd/groups<br />
Require group GroupName
</example>
<p>�׷��� <code>GroupName</code> �׷쿡 ���ϸ�
<code>password</code> ���Ͽ� �׸��� �ִ� ����ڰ� �ùٸ�
��ȣ�� �Է��ϸ� ������ ����Ѵ�.</p>
<p>���� �Ϲ� ����ڸ� �鿩������ �ٸ� ����� �ִ�. �׷�������
���� �ʿ���� ���� ���þ ����ϱ⸸ �ϸ� �ȴ�.</p>
<example>
Require valid-user
</example>
<p><code>Require user rbowen</code> ��� �� ���þ ����ϸ�
��ȣ���Ͽ� �ִ� ������ �ùٸ� ��ȣ�� �Է��ϱ⸸ �ϸ� ������
����Ѵ�. �׷캰�� �ٸ� ��ȣ������ ����Ͽ� �׷�� �����
ȿ�� ���� ���� �ִ�. �� ��� ����ġ�� ���� �ΰ�(��ȣ���ϰ�
�׷�����)�� �ƴ� ���� �Ѱ�(��ȣ����)�� �˻��ϸ� �ȴٴ� ����
�����̴�. �׷��� ���� ��ȣ������ ���ؾ� �ϰ�, <directive
module="mod_authn_file">AuthUserFile</directive> ���þ
��Ȯ�� ��ȣ������ �����ؾ� �ϴ� ���� �����̴�.</p>
</section>
<section id="possibleproblems"><title>�߻��� �� �ִ� ������</title>
<p>Basic ���� ����� �������� ������ ��û�� ������ ����ڸ��
��ȣ�� Ȯ���Ѵ�. ������ ���� �������� ���� ��ħ�� ���� ��������
(�׸��� ��ȣ�� ��ȣ�ϴ� ���丮�� �ִ� ���) �������� �ִ�
��� �׸��� ���� �ٽ� Ȯ���Ѵ�. �����ϵ��� �ӵ��� ���� �������.
��ȣ������ ��� ����ڸ��� ã�� ������ ����� ����� �������
�ϱ⶧���� ��ȣ���� ũ�Ⱑ Ŀ�� ���� �� �������. �׸���
�� �۾��� �������� ��û�� ������ �����Ѵ�.</p>
<p>�׷��� ���������� �� ��ȣ���Ͽ� ������ �� �ִ� ����ڼ�����
�Ѱ谡 �ִ�. �� �Ѱ�� ����ϴ� ������ ���ɿ� ��� �ٸ�����,
�׸��� ���鰳�� �Ѵ´ٸ� ������ٰ� ���ϰ� �ٸ� ���� �����
����ؾ� �Ѵ�.</p>
</section>
<section id="whatotherneatstuffcanido"><title>�ٸ� ��� �����Ѱ�?</title>
<p>����ڸ�� ��ȣ�� ����� ������ �ٰ� �ƴϴ�. ���� ������
��ҿ� ���� �ٸ� ������ ������ ����ڸ� �鿩������ ����
���� �ִ�.</p>
<p><directive module="mod_authz_host">Allow</directive>��
<directive module="mod_authz_host">Deny</directive> ���þ��
������ ��û�� ��ǻ���� ȣ��Ʈ�� Ȥ�� ȣ��Ʈ �ּҸ� ������
������ ����ϰų� �ź��Ѵ�. <directive
module="mod_authz_host">Order</directive> ���þ�� �� ��
���þ�� ���� ����Ͽ�, ����ġ���� � ��� ��Ģ�� �������
�˸���.</p>
<p>�̵� ���þ� ������ ������ ����.</p>
<example>
Allow from <var>address</var>
</example>
<p>���⼭ <var>address</var>�� IP �ּ�(Ȥ�� IP �ּ� �Ϻ�)��
������ �����θ�(Ȥ�� �����θ� �Ϻ�)�̴�. ���Ѵٸ� ���� �ּҳ�
�����θ��� ����� �� �ִ�.</p>
<p>���� ���, �������� �Խ��ǿ� ���? �ø��� �ִٸ� ������
���� ������ ���� �� �ִ�.</p>
<example>
Deny from 205.252.46.165
</example>
<p>�� �ּҿ��� ������ �湮�ڴ� �� ���þ ��ȣ�ϴ� ��������
�� �� ���. IP �ּ� ��� ������ ���� ��ǻ�͸��� ����� ����
�ִ�.</p>
<example>
Deny from <var>host.example.com</var>
</example>
<p>��, ��ü �������� ������ �������� �ּҳ� �����θ��� �Ϻθ�
����Ѵ�.</p>
<example>
Deny from <var>192.101.205</var><br />
Deny from <var>cyberthugs.com</var> <var>moreidiots.com</var><br />
Deny from ke
</example>
<p><directive module="mod_authz_host">Order</directive>��
<directive module="mod_authz_host">Deny</directive>�� <directive
module="mod_authz_host">Allow</directive> ���þ�� ����
����Ͽ� ������ ���ϴ� ����� ���� �� �ִ�.</p>
<example>
Order deny,allow<br />
Deny from all<br />
Allow from <var>dev.example.com</var>
</example>
<p><directive module="mod_authz_host">Allow</directive>
���þ ����ϸ�, �ش� ȣ��Ʈ�� ����ڸ� ����ϰ� �ű⿡
�߰��� ��� ����� ����ϹǷ� ���ϴ� ��� ���� ���Ѵ�.
����� Ư�� ���<em>��</em> ����ϱ� ���Ѵ�.</p>
</section>
<section id="moreinformation"><title>�� ���� ����</title>
<p><module>mod_auth_basic</module>��
<module>mod_authz_host</module> ������ ������� �����ϴ�
��� ���� �� ���� ������ �ִ�.</p>
</section>
</manualpage>