Hyperledger Fabric-ca连接到LDAP:管理员不存在 [英] Hyperledger Fabric-ca connect to LDAP : admin does not exist

查看:228
本文介绍了Hyperledger Fabric-ca连接到LDAP:管理员不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将Hyperledger Fabric CA连接到Openldap. Openldap在本地成立,只有一个组织

I'm trying to connect Hyperledger Fabric CA to an Openldap. The Openldap is set up in local, with a single organisation

dc=fabric-ca,dc=example,dc=com

还有一个用户cn = admin,dc = .../

And a single user, cn=admin,dc=.../

我已经使用以下服务器配置设置了Fabric-CA:

I have set up a Fabric-CA with following server config :

ldap:
enabled: true
url: ldap://cn=admin,dc=fabric-ca,dc=example,dc=com:000000@☺localhost:389/dc=fabric-ca,dc=example,dc=com
userfilter: (dn:%s)
tls:
    enabled: false
attribute:
    names: ["dn"]

转换器和地图无关(到目前为止).我检查过,管理员存在于OpenLDAP中.

Converters and maps are irrelevant (so far). The admin exist in OpenLDAP, I checked.

当我启动以下注册命令时:

When I start the following enroll command :

fabric-ca-client enroll -u http://cn=admin,dc=fabric-ca,dc=example,dc=com@localhost:7054

我收到以下错误:

20 - Authorization failure

CA调试日志向我提供了这些信息:

The CA debug log gave me these informations :

Received request for /enroll
ca.Config: "followed by the CA server config file"
Getting user 'cn=admin,dc=fabric-ca,dc=example,dc=com'
Searching for user 'cn=admin,dc=fabric-ca,dc=example,dc=com' using cached connection
127.0.0.1:45768 POST /enroll 401 23 "Failed to get user: User 'cn=admin,dc=fabric-ca,dc=example,dc=com' does not exist in LDAP directory"

请,这个问题真令人发指.谢谢您的宝贵时间.

Please, this issue is infuriating. Thanks for your time.

推荐答案

在执行注册过程时,您应仅传递用户名,但应传递可分辨的名称.除了应发送密码外,您的注册命令应如下所示:

While performing enrollment process, you should pass user name only, but you passed distinguished name instead of that. Except that password should be sent, so your enrollment command should looks like:

fabric-ca-client enroll -u http://admin:mypassword@localhost:7054

除此之外,我认为userfilter应该如下所示:(cn=%s),因为您使用cn作为管理员前缀

Except that, i think that userfilter should looks like that: (cn=%s) since you used cn as admin prefix

这篇关于Hyperledger Fabric-ca连接到LDAP:管理员不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆