<-
Apache > HTTP Server > �ĵ� > �汾2.2 > ģ��
���� ��л | �������� | ��ƪ���ߣ��𲽹� | ��ҳ�����£�2006��1��23�� | ��ȡ���°汾

Apacheģ�� mod_auth_digest

˵��ʹ��MD5ժҪ��֤(����ȫ������ֻ�����µ��������֧��)
״̬ʵ��(X)
ģ����auth_digest_module
Դ�ļ�mod_auth_digest.c

����

���ģ��ʵ����HTTPժҪ��֤��������δ���й��㷺�IJ��ԣ���˱��Ϊ����ģ�顣

top

ʹ��ժҪ��֤

ʹ��MD5ժҪ��֤�ܼ򵥡��򵥵İ�װ��֤ģ���ʹ��"AuthType Digest"��AuthDigestProvider������ͨ��"AuthType Basic"��AuthBasicProvider �������һ��AuthDigestDomainָ�������������Ҫ����������ĸ�URI��

����ʹ��htdigest���������������(���ı�)�û��б��ļ���

ʾ����

<Location /private/>
AuthType Digest
AuthName "private area"
AuthDigestDomain /private/ http://mirror.my.dom/private2/

AuthDigestProvider file
AuthUserFile /web/auth/.digest_pw
Require valid-user
</Location>

ע��

ժҪ��֤�Ȼ�����֤����ȫ������ֱ��2004��9�£�ֻ���������°汾�����������֧������Amaya, Konqueror, MS Internet Explorer 6(ʹ�ò�ѯ�ַ���ʱ��ʧ�ܣ��μ�"��� MS Internet Explorer 6 ����"), Mozilla, Netscape 7, Opera, Safari ����lynx��֧��ժҪ��֤����ΪժҪ��֤��δ�õ���������������֧�֣���Ӧ��ֻ����Ӧ��������Կ����û�������汾�ij��ϡ�

top

��� MS Internet Explorer 6 ����

Internet Explorer 6 ��ժҪ��֤ʵ����ȱ�ݣ�Ҳ����GET����IJ�ѯ�ַ�����RFC�淶�������ݡ��м���;�������������⡣

��һ��;������ʹ��POST����GET����������������ݡ������ij��򲻻��ܵ����ֱ仯��Ӱ�죬������򵥵ķ�����

��2.0.51�汾��ʼ��Apache���ڻ�������AuthDigestEnableQueryStringHack���ṩ��һ��������(workaround)�����AuthDigestEnableQueryStringHack���򿪣�Apache����ȡ��ʩ�Ը�Internet Explorer 6 ��bug ��������URI��ժҪ�Ƚ����Ƴ���ʹ�������������Ҫ�������µ����ã�

��MSIE6��ʹ��ժҪ��֤

BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On

�μ�BrowserMatchָ�����˽������������û��������ĸ���ϸ�ڡ�

top

AuthDigestAlgorithm ָ��

˵��ѡ����ժҪ��֤�����ڼ��������Ӧ���ɢ��ֵ���㷨
�﷨AuthDigestAlgorithm MD5|MD5-sess
Ĭ��ֵAuthDigestAlgorithm MD5
������directory, .htaccess
������AuthConfig
״̬ʵ��(X)
ģ��mod_auth_digest

AuthDigestAlgorithmָ��ѡ����ժҪ��֤�����ڼ��������Ӧ���ɢ��ֵ���㷨��

MD5-sess�㷨��ǰ��δʵ�֡�
top

AuthDigestDomain ָ��

˵����ͬһ������������Ҫ����ժҪ��֤��URI
�﷨AuthDigestDomain URI [URI] ...
������directory, .htaccess
������AuthConfig
״̬ʵ��(X)
ģ��mod_auth_digest

AuthDigestDomainָ������ָ��һ�����߶����ͬһ������������Ҫ����ժҪ��֤��URI(Ҳ����ʹ����ͬ��������û���/������Ϣ)����Щ��ָ����URIֻ��ǰ׺��Ҳ����˵�ͻ��˽��ٶ�����λ�ڸ�URI"֮��"��URI���ܵ���ͬ�û���/����ı�������Щ��ָ����URI�����Ǿ���URI(Ҳ���ǰ���������Э�顢�������˿ڵ�)�������URI��

���ָ���������DZ�ָ��Ϊ���ٰ���������ҳ��ĸ�URI��ʡ������ᵼ�¿ͻ���Ϊÿ��������������Ȩͷ����������������ֽڴ�С�⣬���AuthDigestNcCheck����Ϊ"On"������Ӱ������������ܡ�

����ָ����URI���Էֱ�ָ��ͬ�ķ�����������������¿ͻ��˽�������Щ�������乲���û�����������Ϣ�����Ҳ��������û���

top

AuthDigestNcCheck ָ��

˵��Enables or disables checking of the nonce-count sent by the server
�﷨AuthDigestNcCheck On|Off
Ĭ��ֵAuthDigestNcCheck Off
������server config
״̬ʵ��(X)
ģ��mod_auth_digest
Ŀǰ��δʵ�֡�
top

AuthDigestNonceFormat ָ��

˵��Determines how the nonce is generated
�﷨AuthDigestNonceFormat format
������directory, .htaccess
������AuthConfig
״̬ʵ��(X)
ģ��mod_auth_digest
Ŀǰ��δʵ�֡�
top

AuthDigestNonceLifetime ָ��

˵��������nonce(��ǰֵ)����Ч����
�﷨AuthDigestNonceLifetime seconds
Ĭ��ֵAuthDigestNonceLifetime 300
������directory, .htaccess
������AuthConfig
״̬ʵ��(X)
ģ��mod_auth_digest

AuthDigestNonceLifetimeָ����Ʒ�����nonce(��ǰֵ)����Ч���������ͻ������ӷ�����ʱʹ����һ�����ڵ�nonce(��ǰֵ)��������������һ������"stale=true"��401����(Ҫ��������֤)�����secondsС�ڵ���"0"����ônonce(��ǰֵ)����Զ�������(ǿ�ҷ�����ô��)��һ�����ֵӦ����30��120֮��ȽϺ���(��ò�ҪС��10)��

top

AuthDigestProvider ָ��

˵�����ø������(ժҪ)��֤֧����(Provider)
�﷨AuthDigestProvider provider-name [provider-name] ...
Ĭ��ֵAuthDigestProvider file
������directory, .htaccess
������AuthConfig
״̬ʵ��(X)
ģ��mod_auth_digest

AuthDigestProviderָ�������˸������(ժҪ)��֤֧����(Provider)��Ĭ�ϵ�file֧������mod_authn_fileģ��ʵ�֡�����ȷ���������֤֧��ģ������ڷ�������(��̬���ӻ�DSO)��

�ܹ��ṩ��֤֧����(Provider)��ģ�����£�mod_authn_dbm��mod_authn_file ��

top

AuthDigestQop ָ��

˵��ָ��ժҪ��֤�ı�������
�﷨AuthDigestQop none|auth|auth-int [auth|auth-int]
Ĭ��ֵAuthDigestQop auth
������directory, .htaccess
������AuthConfig
״̬ʵ��(X)
ģ��mod_auth_digest

AuthDigestQopָ������ָ��ʹ���Ǹ��������������(quality-of-protection)��auth��ֻ������֤(�û���/����)��auth-int������֤���⻹����������У��(ʵ���MD5ֵ��������ͼ��)��none��ʹ�þɵ�RFC-2069ժҪ�㷨(�����������Լ��)��auth��auth-int����ͬʱָ��������������£�����������Լ�ѡ��ʹ������һ�֡�none���Ƽ�ʹ�á�

auth-intĿǰ��δ֧�֡�
top

AuthDigestShmemSize ָ��

˵��Ϊ�˸��ٿͻ��˶�����Ĺ����ڴ��ֽ���
�﷨AuthDigestShmemSize size
Ĭ��ֵAuthDigestShmemSize 1000
������server config
״̬ʵ��(X)
ģ��mod_auth_digest

AuthDigestShmemSizeָ��ָ���˷���������ʱΪ�˸��ٿͻ��˶�����Ĺ����ڴ��ֽ�����ע�⣬��������ڴ�β�������ΪС��ֻ����һ���ͻ�������Ҫ����С�ڴ������������С����ȡ�������ϵͳ���������֪�������Сֵ����ֻҪ��AuthDigestShmemSize��Ϊ"0"��Ȼ���ȡ����Apacheʱ���صĴ�����Ϣ���ɡ�

sizeͨ�������ֽڼ��㣬���ǿ���ͨ�����Ϻ�׺"K"��"M"������KB��MB���㡣���磬����д������һ���ģ�

AuthDigestShmemSize 1048576
AuthDigestShmemSize 1024K
AuthDigestShmemSize 1M