mod_auth_ldap 和 mod_authnz_ldap 之间的区别

发布于 2024-11-30 18:56:45 字数 1391 浏览 1 评论 0原文

我们使用 LDAP 通过 Apache httpd 进行 Subversion 访问。我们最初让所有用户都可以使用以下命令访问所有 Subversion 存储库:

<Location /src>
    DAV svn
    SVNParentPath /opt/svn_repos
    AuthType basic
    AuthName "SVN Repository"
    AuthBasicProvider ldap
    AuthzLDAPAuthoritative off
    AuthLDAPURL "ldap://ldap.mycorp.com:3268/dc=mycorp,dc=com?sAMAccountName" NONE
    AuthLDAPBindDN "CN=svn_acct,OU=Users,DC=mycorp,DC=com"
    AuthLDAPBindPassword "swordfish"
    Require valid-user
</Location>

一切都很好。我被要求将 CM 存储库移至其他位置,并使其仅可供 CM 组中的人员访问。我做了以下事情:

<Location /cm>
    DAV svn
    SVNPath /opt/cm_svn_repos
    AuthType basic
    AuthName "CM Repository"
    AuthBasicProvider ldap
    AuthzLDAPAuthoritative off
    AuthLDAPURL "ldap://ldap.mycorp.com:3268/dc=mycorp,dc=com?sAMAccountName" NONE
    AuthLDAPBindDN "CN=svn_acct,OU=Users,DC=mycorp,DC=com"
    AuthLDAPBindPassword "swordfish"
    Require group CN=cm-group,OU=Groups,DC=mycorp,DC=com
</Location>

我花了几个小时才意识到我使用的是 mod_authnz_ldap 而不是普通的 ol' mod_auth_ldap。因此,我在 Require 语句中需要 ldap-group 而不是 group。那行得通。

我的同事告诉我,我们使用 mod_authnz_ldap 而不是 mod_auth_ldap 是有原因的,但他不记得为什么了。我们查阅了 Apache httpd 文档,但该文档没有提供任何线索为什么您要使用其中一种而不是另一种。

那么,mod_auth_ldap 和 mod_authnz_ldap 之间有什么区别,为什么要使用其中一个而不是另一个呢?

We use LDAP for Subversion access using Apache httpd. We originally had all of our Subversion repositories accessible by all users using the following:

<Location /src>
    DAV svn
    SVNParentPath /opt/svn_repos
    AuthType basic
    AuthName "SVN Repository"
    AuthBasicProvider ldap
    AuthzLDAPAuthoritative off
    AuthLDAPURL "ldap://ldap.mycorp.com:3268/dc=mycorp,dc=com?sAMAccountName" NONE
    AuthLDAPBindDN "CN=svn_acct,OU=Users,DC=mycorp,DC=com"
    AuthLDAPBindPassword "swordfish"
    Require valid-user
</Location>

Everything was fine. I was asked to move the CM repository to a different location, and make it accessible for only people in the CM group. I did the following:

<Location /cm>
    DAV svn
    SVNPath /opt/cm_svn_repos
    AuthType basic
    AuthName "CM Repository"
    AuthBasicProvider ldap
    AuthzLDAPAuthoritative off
    AuthLDAPURL "ldap://ldap.mycorp.com:3268/dc=mycorp,dc=com?sAMAccountName" NONE
    AuthLDAPBindDN "CN=svn_acct,OU=Users,DC=mycorp,DC=com"
    AuthLDAPBindPassword "swordfish"
    Require group CN=cm-group,OU=Groups,DC=mycorp,DC=com
</Location>

I spent a couple of hours on this before realizing that I was using mod_authnz_ldap and not plain ol' mod_auth_ldap. Thus, I needed ldap-group instead of group in my Require statement. That worked.

My coworker informed me that there was a reason why we used mod_authnz_ldap and not mod_auth_ldap, but he couldn't remember why. We looked up the Apache httpd documentation, but the documentation provides no clues why you'd use one over the other.

So, what is the difference between mod_auth_ldap and mod_authnz_ldap, and why would you use one over the other?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夜唯美灬不弃 2024-12-07 18:56:45

还有谁遇到过这个问题。它与较新版本的 Apache httpd 有关。我的困惑源于httpd 2.1 和2.2 版本之间的变化。由于我有 Apache 2.2,我打算使用新框架:

  • mod_auth_ldap 适用于 2.2 之前的 Apache 版本
  • mod_authnz_ldap 适用于 Apache 2.2 及更高版本。

来自 Apache 2.2 手册

模块增强

Authn/Authz

aaa 目录中的模块已重命名,并为摘要身份验证提供更好的支持。例如,mod_auth 现在分为 mod_auth_basicmod_authn_filemod_auth_dbm 现在称为 mod_authn_dbmmod_access 已重命名为 mod_authz_host。还有一个新的 mod_authn_alias(已从 2.3/2.4 中删除)模块用于简化某些身份验证配置。

mod_authnz_ldap

该模块是 2.0 mod_auth_ldap 模块到 2.2 Authn/Authz 框架的端口。新功能包括在 Require 指令中使用 LDAP 属性值和复杂的搜索过滤器。

模块开发者更改

Authn/Authz

捆绑的身份验证和授权模块已按以下方式重命名:

  • mod_auth_* ->实现 HTTP 身份验证机制的模块
  • mod_authn_* ->提供后端身份验证提供程序的模块
  • mod_authz_* ->实现授权(或访问)的模块
  • mod_authnz_* ->实现身份验证和身份验证的模块授权

Anyone else who came across this question. It has to do with the newer versions of Apache httpd. My confusion stemmed from the changes between version 2.1 and 2.2 of httpd. Since I had Apache 2.2, I was suppose to use the new framework:

  • mod_auth_ldap is for Apache versions before 2.2
  • mod_authnz_ldap is for Apache versions 2.2 and later.

From the Apache 2.2 Manual

Module Enhancements

Authn/Authz

Modules in the aaa directory have been renamed and offer better support for digest authentication. For example, mod_auth is now split into mod_auth_basic and mod_authn_file; mod_auth_dbm is now called mod_authn_dbm; mod_access has been renamed mod_authz_host. There is also a new mod_authn_alias (already removed from 2.3/2.4) module for simplifying certain authentication configurations.

mod_authnz_ldap

This module is a port of the 2.0 mod_auth_ldap module to the 2.2 Authn/Authz framework. New features include using LDAP attribute values and complicated search filters in the Require directive.

Module Developer Changes

Authn/Authz

The bundled authentication and authorization modules have been renamed along the following lines:

  • mod_auth_* -> Modules that implement an HTTP authentication mechanism
  • mod_authn_* -> Modules that provide a backend authentication provider
  • mod_authz_* -> Modules that implement authorization (or access)
  • mod_authnz_* -> Module that implements both authentication & authorization
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文