[英]hyperledger fabric-ca server configure with openldap
Does anyone successfully configured Fabric-CA (1.2.0-stable)
server with openldap
server?是否有人使用
openldap
服务器成功配置了Fabric-CA (1.2.0-stable)
服务器?
I am seeing this error in the logs:我在日志中看到此错误:
2018/09/03 01:34:01 [DEBUG] Creating new LDAP client for { Enabled:true URL:ldap://****:****@openldap/dc=example,dc=com UserFilter:(uid=%s) GroupFilter:(memberUid=%s) Attribute:{[uid member][{ }] map[groups:[{ }]]} TLS:{false [] { }} }
2018/09/03 01:34:01 [DEBUG] Initialized LDAP identity registry; err=Invalid expression for attribute '': Unexpected end of expression
2018/09/03 01:34:01 [WARNING] Failed to initialize LDAP client; err=Invalid expression for attribute '': Unexpected end of expression
2018/09/03 01:34:01 [ERROR] Error occurred initializing database: Invalid expression for attribute '': Unexpected end of expression
This is the command which I am using to start openldap
:这是我用来启动
openldap
的命令:
docker run -h openldap -p 389:389 --name openldap --network=fabric-n --volume /home/xxxx/fabric-ca/data:/etc/hyperledger --env LDAP_ORGANISATION="Hyperledger" --env LDAP_DOMAIN="example.com" --env LDAP_ADMIN_PASSWORD="adminpw" --detach osixia/openldap:1.2.1
This is the command that run fabricca
:这是运行
fabricca
的命令:
docker run -h fabric-ca -p 7054:7054 --name fabric-ca --network=fabric-n --volume /home/xxxx/fabric-ca/data:/etc/hyperledger --env FABRIC_CA_SERVER_HOME="/etc/hyperledger/fabric-ca-server" --env FABRIC_CA_CLIENT_HOME="/etc/hyperledger/fabric-ca-client" --env FABRIC_CA_SERVER_CA_NAME="hfca" --detach hyperledger/fabric-ca:amd64-1.2.0
I created a docker overlay network which can connect to openldap container我创建了一个可以连接到 openldap 容器的 docker 覆盖网络
fabric-ca-server-config.yaml
ldap:
# Enables or disables the LDAP client (default: false)
# If this is set to true, the "registry" section is ignored.
enabled: true
# The URL of the LDAP server
url: ldap://cn=admin,dc=example,dc=com:adminpw@openldap/dc=example,dc=com
This error is most probably caused because of missing converters
properties set below in fabric-ca-server-config.yaml
file.这个错误很可能是因为在
fabric-ca-server-config.yaml
文件中缺少下面设置的converters
属性。 By default, in ldap
section there are converters
which are empty:默认情况下,在
ldap
部分有一些converters
是空的:
converters:
- name:
value:
And when ldap
is enabled, it cannot be properly parsed, so error is raised.并且当启用
ldap
时,它无法正确解析,因此会引发错误。 Please put any values there, so something like:请在那里输入任何值,例如:
converters:
- name: hf.Revoker
value: attr("uid") =~ "revoker*"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.