【问题标题】:OpenSUSE Apache - Windows LDAP - group user authentication - MercurialOpenSUSE Apache - Windows LDAP - 组用户认证 - Mercurial
【发布时间】:2012-09-10 05:20:41
【问题描述】:
  • 操作系统:OpenSUSE Linux
  • 版本控制:Mercurial Hg
  • Web 前端:Apache2.2

我可以点击浏览 http://servername:port/hg

只要我点击它,它就会提示我输入 Windows AD 目录凭据。

现在,我在 /srv/www/htdocs/hg/repos 文件夹中有以下存储库:

  • RepoProjectA
  • RepoProjectB
  • RepoProjectC

点击上面的存储库链接就可以了,因为我可以看到 Hg 前端。

现在,我想添加身份验证和授权,以便:

  • 一)

    • 只有“c123456”、“c654321”用户可以提交 RepoProjectA 中的文件。
    • 只有用户“c222222”和“c333333”可以推送更改,其他人不能推送

    对于上述内容,我需要更改哪些文件 (???) 以及我应该添加哪些更改/条目 实现这一目标。

    PS:我使用 LDAP 作为使用 Windows Active Directory 的身份验证。我还需要吗 使用 htpasswd2 或 htdigest2 模块创建任何用户文件——或授予 访问组创建任何组文件????我想,这些组可以取自 Active Directory 中已有的内容。因为这些是不同的项目 存储库,我需要单独的 .htaccess 文件吗?一个全局文件不会做 诀窍?

  • B)

    • 只有用户“u123456”和“u654321”可以在 RepoProjectB 的分支“branch1”上提交文件。 (假设我们在 RepoProjectB 中有一个分支“branch1”)。
    • 只有“u222222”和“u333333”用户可以推送文件
    • 没有人可以在 TRUNK/默认分支上提交/推送任何内容
    • 例外:组“RepoProjectB-GROUP”或“ABCDGroup”中的每个人都可以在 此存储库或其分支。

对于上述内容,我需要更改哪些文件 (???) 以及我应该添加哪些更改/条目以实现此目的。

  • C) 我尝试在我的 Windows 客户端机器上使用 CMD 提示符和实用程序 TortoiseHg,而 在 Hg 中执行任何操作(克隆、分支、添加、提交、推送等),系统都会提示我 每次提供用户名和密码。它的工作,但我得到提示 Hg 中的每一个动作。

    如何限制让用户仅提供 Windows Active Directory 凭据 每个会话一次。

任何人都可以点亮。

【问题讨论】:

    标签: windows apache mercurial ldap suse


    【解决方案1】:

    在 mercurial keyring 方面取得了一些进展,接下来我要做的是开始使用更细粒度的组并以 Directory 指令方式允许/拒绝。

    更多相关信息:

    http://stackoverflow.com/questions/14267873/mercurial-hg-no-changes-found-cant-hg-push-out/14269997#14269997
    http://www.linuxquestions.org/questions/showthread.php?p=4867412#post4867412
    http://stackoverflow.com/questions/12503421/hg-push-error-and-username-not-specified-in-hg-hgrc-keyring-will-not-be-used/14270602#14270602
    http://stackoverflow.com/questions/12468634/opensuse-apache-windows-ldap-group-user-authentication-mercurial/14270648#14270648
    

    如果在 mercurial 中多次提示用户凭据。设置 Mercurial_Keyring 然后

    这个问题来了,没有人能简单地解释一下。

    ??? -- 如何使

    [auth]
    xx.prefix = servername/hg_or_something

    适用于 servername 下的所有存储库/hg 位置,如果我使用服务器名、服务器名的 IP 或服务器名的 FQDN?

    回答:Arun • 2 分钟前 -

    OK, I put this in ~/.hgrc (Linux/Unix -home directory's .hgrc hidden file) or Windows users %UserProfile%/mercurial.ini or %HOME%/mercurial.ini file.
    
    [auth]
    default1.schemes = http https
    default1.prefix = hg_merc_server/hg
    default1.username = c123456
    
    default2.schemes = http https
    default2.prefix = hg_merc_server.company.com/hg
    default2.username = c123456
    
    default3.schemes = http https
    default3.prefix = 10.211.222.321/hg
    default3.username = c123456
    
    Now, I can checkout using either Server/IP/Server's FQDN.
    

    【讨论】:

      猜你喜欢
      • 2012-09-02
      • 2015-01-06
      • 2017-10-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-19
      • 2011-08-24
      相关资源
      最近更新 更多