つきが*_*いだね 5 user-registration hyperledger hyperledger-fabric hyperledger-fabric-ca
我是 Hyperledger Fabric 开发的新手,我正在尝试进行用户友好的注册。
例如:
+ 使用来自谷歌帐户的 Oauth。
+ 或使用传统的电子邮件密码注册。
我已经阅读了 hyperledger fabric 文档并尝试了其中的一些示例。我只知道新的身份创建过程是这样的:
1.通过fabric-ca客户端或SDK从fabric-ca服务器获取管理员身份。
2. 使用该管理员身份注册新身份。
3.然后fabric-ca服务器将发回新身份的ID和密码(所谓的密码)。
4. 用户将使用该 ID 和密码来注册新用户,以及创建交易等。
您可以使用Ldap进行身份认证,并使用mysql或postgres任何这些数据库来与fabric-ca连接。由于您将使用 ldap ,因此您将能够使用普通电子邮件和密码进行注册,这是根据 hyperledger Fabric 文档推荐的方法。
\nFabric CA 服务器可以配置为从 LDAP 服务器读取。
\n特别是,Fabric CA 服务器可以连接到 LDAP 服务器来执行以下操作:
\n在注册之前验证身份\n检索用于授权的身份\xe2\x80\x99s 属性值。\n修改 Fabric CA 服务器\xe2\x80\x99s 配置文件的 LDAP 部分以将服务器配置为连接到LDAP 服务器。
\nldap:\n # Enables or disables the LDAP client (default: false)\n enabled: false\n # The URL of the LDAP server\n url: <scheme>://<adminDN>:<adminPassword>@<host>:<port>/<base>\n userfilter: <filter>\n attribute:\n # \'names\' is an array of strings that identify the specific attributes\n # which are requested from the LDAP server.\n names: <LDAPAttrs>\n # The \'converters\' section is used to convert LDAP attribute values\n # to fabric CA attribute values.\n #\n # For example, the following converts an LDAP \'uid\' attribute\n # whose value begins with \'revoker\' to a fabric CA attribute\n # named "hf.Revoker" with a value of "true" (because the expression\n # evaluates to true).\n # converters:\n # - name: hf.Revoker\n # value: attr("uid") =~ "revoker*"\n #\n # As another example, assume a user has an LDAP attribute named\n # \'member\' which has multiple values of "dn1", "dn2", and "dn3".\n # Further assume the following configuration.\n # converters:\n # - name: myAttr\n # value: map(attr("member"),"groups")\n # maps:\n # groups:\n # - name: dn1\n # value: client\n # - name: dn2\n # value: peer\n # The value of the user\'s \'myAttr\' attribute is then computed to be\n # "client,peer,dn3". This is because the value of \'attr("member")\' is\n # "dn1,dn2,dn3", and the call to \'map\' with a 2nd argument of\n # "group" replaces "dn1" with "client" and "dn2" with "peer".\n converters:\n - name: <fcaAttrName>\n value: <fcaExpr>\n maps:\n <mapName>:\n - name: <from>\n value: <to>\nRun Code Online (Sandbox Code Playgroud)\n有关更多信息,请访问此处的Fabric-CA 文档。
\n| 归档时间: |
|
| 查看次数: |
193 次 |
| 最近记录: |