标签: openldap

在 OpenLDAP 中存储委派权限的最佳实践是什么?

我的网络的核心用户数据库由 OpenLDAP 管理。最近,我们需要引入一种可能性,让一个用户代表第二个用户进行操作。由于所有与应用程序相关的权限和权限都存储在 LDAP 中,我们还希望将新架构存储在同一位置。

我的问题是 - 是否有常见的知名模式或最佳实践来在 LDAP 中存储此类委派权限?我听说使用 Active Directory 的 MS Exchange 中有这样的功能。

openldap active-directory ldap schema

5
推荐指数
1
解决办法
490
查看次数

记录 OpenLDAP 上的身份验证失败

我需要在 OpenLDAP 上记录身份验证失败。正确的日志级别位是什么?或者对于这样的事情还有其他配置吗?

openldap authentication

5
推荐指数
1
解决办法
5826
查看次数

Ubuntu OpenLDAP:TLS init def ctx 失败:-1

我有一个工作 OpenLDAP,但在尝试使用此处的说明配置 SSL 时破坏了它: https: //help.ubuntu.com/10.04/serverguide/C/openldap-server.html。现在,当我尝试使用 -d -1 启动 ldap 时,出现以下错误:

TLS:仅指定了证书文件和密钥文件之一

主要:TLS 初始化 def ctx 失败:-1

作为一个新手,我认为我完全有可能搞砸了一些事情(我担心我按照上面的说明错误地执行了 ldapmodify 步骤),但我不知道如何撤消我所做的事情。我无法启动 ldapmodify b/c 服务器已关闭。所以我有两个问题:

  1. 什么可能导致此错误?
  2. 我怎样才能恢复到以前工作(但没有 SSL)的 OpenLDAP 版本?

注意:我不是 *nix 管理员,只是尝试获取 SSL 版本的 OpenLDAP 来测试我的应用程序。所以请慢慢说,用大词!

openldap

5
推荐指数
1
解决办法
2万
查看次数

带有 OpenLDAP 后端的 Kerberos:密码同步方法

基本设置是 OpenLDAP 服务器。提供用户并设置密码。现在我们决定添加一个 MIT KDC 以便能够使用 Kerberos。我们将 MIT KDC 配置为使用 LDAP 作为 KDC 数据库的后端。我们创建主体并使用以下命令将它们链接到现有 LDAP 用户:

addprinc -x dn=cn=test.user,ou=people,dc=example,dc=com test.user
Run Code Online (Sandbox Code Playgroud)

问题是这会提示输入新密码,在获取 Kerberos 票证和执行 LDAP 绑定时会导致两个不同的密码。

有没有办法同步这些密码?即,当用户使用 kpasswd 更改密码时,我也希望 LDAP 密码也更改。当用户使用 ldappasswd 更改密码时,反之亦然。

有人有这方面的指南吗?我似乎无法在互联网上找到任何东西。

openldap kerberos password-management

5
推荐指数
1
解决办法
3554
查看次数

如何将 postgresql 与 LDAP 用户连接?

我有一台全新安装 postgresql-9.4 的服务器,我还有另一台安装了 LDAP 的服务器。我想将 postgresql 与已经存在的 LDAP 用户连接。

我应该在 /var/lib/pgsql/9.4/data/pg_hba.conf 中更改的基本配置是什么,我还应该做什么?

postgresql linux openldap database ldap

5
推荐指数
2
解决办法
1万
查看次数

名称不匹配的 HAPROXY 后面的 LDAP 的 SASL 身份验证

我的 kerberos 域在 MYEXAMPLE.ORG 中,但服务器位于 dmz-int.example.org dns 区域。

LDAP 服务器是 b1.dmz-int.example.org;它的密钥表包括:

udo ktutil -k /etc/krb5.keytab 列表
/etc/krb5.keytab:

Vno 类型主要别名
  7 arcfour-hmac-md5 b1$@MYEXAMPLE.ORG
  7 aes128-cts-hmac-sha1-96 b1$@MYEXAMPLE.ORG
  7 aes256-cts-hmac-sha1-96 b1$@MYEXAMPLE.ORG
  7 arcfour-hmac-md5 主机/b1.dmz-int.example.org@MYEXAMPLE.ORG
  7 aes128-cts-hmac-sha1-96 主机/b1.dmz-int.example.org@MYEXAMPLE.ORG
  7 aes256-cts-hmac-sha1-96 主机/b1.dmz-int.example.org@MYEXAMPLE.ORG
  7 arcfour-hmac-md5 ldap/b1.dmz-int.example.org@MYEXAMPLE.ORG
  7 aes128-cts-hmac-sha1-96 ldap/b1.dmz-int.example.org@MYEXAMPLE.ORG
  7 aes256-cts-hmac-sha1-96 ldap/b1.dmz-int.example.org@MYEXAMPLE.ORG
  7 arcfour-hmac-md5 ldap/ldap.dmz-int.example.org@MYEXAMPLE.ORG
  7 aes128-cts-hmac-sha1-96 ldap/ldap.dmz-int.example.org@MYEXAMPLE.ORG
  7 aes256-cts-hmac-sha1-96 ldap/ldap.dmz-int.example.org@MYEXAMPLE.ORG
  7 arcfour-hmac-md5 ldap/ldap.unimore.it@MYEXAMPLE.ORG
  7 aes128-cts-hmac-sha1-96 ldap/ldap.unimore.it@MYEXAMPLE.ORG
  7 aes256-cts-hmac-sha1-96 ldap/ldap.unimore.it@MYEXAMPLE.ORG

ldap2.myexample.orgCNAMEb1.dmz-int.example.org

现在我可以连接GSSAPI到 LDAP 服务器:

$ kinit
$ ldapsearch -ZZ -h …
Run Code Online (Sandbox Code Playgroud)

openldap haproxy sasl

5
推荐指数
1
解决办法
2507
查看次数

ldap_result: 无法联系 LDAP 服务器 (-1)

G'day,我配置了在端口 636 上运行的 openldap-server 机器。我也可以从另一台 openldap-client 机器 telnet 到这个端口。为了保护连接,我使用此链接在服务器上创建了一个自签名证书,在此处输入链接描述 ,然后将证书文件复制到客户端。

我已经确保在两台机器上都禁用了 SELinux,并且客户端 /etc/openldap/ldap.conf 文件具有选项 TLS_REQCERT allow

客户端机器的详细配置为:

# cat ldap.conf
URI ldap://ad.dfsi.dev:636
BASE dc=dfsi,dc=dev
TLS_CACERTDIR /etc/openldap/cacerts
TLS_REQCERT allow
Run Code Online (Sandbox Code Playgroud)

和 nslcd 文件:

# cat /etc/nslcd.conf
tls_reqcert allow
ssl start_tls
tls_cacertdir /etc/openldap/cacerts
tls_reqcert allow
Run Code Online (Sandbox Code Playgroud)

如果我不使用 SSL,则 ldap 客户端可以访问所有 ldap 用户。但是,当我通过 authconfig-tui、ldaps://ad.xx.dev:636 更改配置以使用 TLS 时,它会失败。

日志说客户端成功连接到服务器,但随后服务器断开连接,如下所示:

ldapsearch -x -d 1
ldap_create
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection 1 1 0
ldap_int_open_connection
ldap_connect_to_host: TCP ad.dfsi.dev:636
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying xx.xx.xx.xx:636
ldap_pvt_connect: fd: 3 tm: …
Run Code Online (Sandbox Code Playgroud)

ssl openldap ldap ssl-certificate

5
推荐指数
2
解决办法
4万
查看次数

openldap 大小限制。不能接收超过 500 个条目

当我查询我的 openldap-server 时,我无法收到超过 500 个条目。

虽然我做了以下更改:

配置文件

    # This is the main slapd configuration file. See slapd.conf(5) for more
    # info on the configuration options.

    #######################################################################
    # Global Directives:       
    .....

     # The maximum number of entries that is returned for a search operation
    sizelimit 10000
Run Code Online (Sandbox Code Playgroud)

配置文件

#
# LDAP Defaults
#

# See ldap.conf(5) for details
# This file should be world readable but not world writable.

#BASE   dc=example,dc=com
#URI    ldap://ldap.example.com ldap://ldap-master.example.com:666

SIZELIMIT       10000
#TIMELIMIT      15
#DEREF          never

# TLS …
Run Code Online (Sandbox Code Playgroud)

openldap ldap query

5
推荐指数
1
解决办法
2万
查看次数

Using meta database backend to combine active directory db and openldap local db

I am trying to use the openldap meta back end to accomplish the following in a single query:

  1. query the local openldap database for the account. (I control this resource and only a few accounts will be stored here.)

  2. if the account is not found locally, then next query active directory (where I have no ability to create accounts)

The user will only be found in one or the other, but not both.

I have tried to follow numerous tutorials …

openldap active-directory

5
推荐指数
1
解决办法
3102
查看次数

LDAP:创建具有有限权限的绑定用户

我需要绑定到 OpenLDAP 服务器来对用户进行身份验证,但我不希望这个低权限或“委派管理员”能够看到比严格必要的更多的属性。

如何使用白名单减少绑定用户可以看到的属性?哪些属性是对用户进行身份验证所必需的?

例如,这个特定的绑定用户不需要查看NTPassword,我想其他属性,如主目录等。

这是我到目前为止所做的:

  1. 我已禁用匿名绑定:

    # disable anon bind
    dn: cn=config
    changetype: modify
    add: olcDisallows
    olcDisallows: bind_anon
    
    dn: cn=config
    changetype: modify
    add: olcRequires
    olcRequires: authc
    
    dn: olcDatabase={-1}frontend,cn=config
    changetype: modify
    add: olcRequires
    olcRequires: authc
    
    Run Code Online (Sandbox Code Playgroud)
  2. 我创建了一个“应用程序”OU 和一个“gitlab”用户:

    # file: applications.ldif
    dn: ou=Applications,dc=example,dc=com
    objectclass: top 
    objectClass: organizationalunit
    ou: Applications
    
    dn: cn=gitlab,ou=Applications,dc=example,dc=com
    cn: gitlab
    objectClass: simpleSecurityObject
    objectClass: organizationalRole
    userPassword: {CRYPT}.....
    
    Run Code Online (Sandbox Code Playgroud)
  3. 要创建用户,我使用了 LDAP 管理员用户:

    ldapadd -xvvv -f applications.ldif -D 'cn=admin,dc=example,dc=com' -W
    
    Run Code Online (Sandbox Code Playgroud)
  4. 为了限制“gitlab”权限,我试过这个:

    # file: give-applications-access.ldif
    dn: cn=config
    changetype: modify
    # allow …
    Run Code Online (Sandbox Code Playgroud)

openldap ldap authentication

5
推荐指数
0
解决办法
5954
查看次数