简体   繁体   English

我们如何在Hyperledger v1.0中启用属性的使用

[英]How do we enable the use of attributes in Hyperledger v1.0

In Hyperledger v0.6 I use the following switch (environment variable) in my docker commmand to enable the use of attributes in the membership service: 在Hyperledger v0.6中,我在Docker命令行中使用以下开关(环境变量)来启用成员资格服务中的属性:

-e MEMBERSRVC_CA_ACA_ENABLED=true 

In Hyperledger v1.0, is there a particular switch (environment variable) I need to set? 在Hyperledger v1.0中,是否需要设置特定的开关(环境变量)?

I am registering a user that supposedly has an attribute but I can't see the attribute in the certificate when I deserialize it. 我注册的用户应该具有属性,但是反序列化时在证书中看不到该属性。

I think one of these two is my problem but can't figure out which one: 我认为这是我的问题之一,但无法弄清楚哪一个:

a. 一种。 I'm not sure if my membership service is configured properly (eg, I need to use a similar environment variable (MEMBERSRVC_CA_ACA_ENABLED=true). 我不确定我的会员服务是否配置正确(例如,我需要使用类似的环境变量(MEMBERSRVC_CA_ACA_ENABLED = true)。

b. I'm using the Node HFC SDK incorrectly. 我没有正确使用Node HFC SDK。 According to the documentation, I need to pass the field "attrs" with an array of key/value attributes. 根据文档,我需要传递带有键/值属性数组的“属性”字段。 I used the following: 我使用了以下内容:

attrs: [{ name: "attr1", value: "attr1value" }, { name: "attr2", value: "attr2value" }]

Did I define attrs correctly? 我是否正确定义了attrs?

Attributes in certificates are not yet supported in Hyperledger Fabric v1. Hyperledger Fabric v1尚不支持证书中的属性。 The membership service process from v0.6 has been replaced with the Hyperledger Fabric CA (see https://hyperledger-fabric-ca.readthedocs.io/en/latest/ ). v0.6中的成员资格服务过程已由Hyperledger Fabric CA取代(请参阅https://hyperledger-fabric-ca.readthedocs.io/en/latest/ )。 Transaction certificates (tcerts) with attributes are not in v1. 具有属性的事务证书(tcerts)不在v1中。 See https://jira.hyperledger.org/browse/FAB-3752 for tracking progress on putting attributes in enrollment certificates (ecerts). 请参阅https://jira.hyperledger.org/browse/FAB-3752,以跟踪将属性放入注册证书(ecerts)的进度。

Until this is supported, you can make access control decisions in chaincode based on specific identities by checking specific certificates which should have access. 在此支持之前,您可以通过检查应具有访问权限的特定证书,根据特定身份以链码方式做出访问控制决策。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM