Date   

Hyperledger fabric organizational units

spectre-@...
 

How do I reference organizational units in channel config policies? Org1MSP.department.client does not work.


Re: Running same application from multiple users

conanoc
 

The first question is how a define a second user?
You can register another user to the CA and use that user for the second PC.

>
how should I change the test-network/configtx/configtx.yaml file to set that only the one of the two users have the ability to change the owner of a car and the other one user is just a reader?
You should change the source code of fabcar chaincode instead of changing the configtx file.
I recommend you to check out papercontract.js chaincode in the commercial-paper sample. It will be more practical to separate the organization of the two users if you want to give different access rights to the users.
papercontract.js uses ctx.clientIdentity.getMSPID() to check the msp id of the client user identity.


Hyperledger Fabric Documentation Workgroup call - Western hemisphere - Fri, 04/09/2021 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Hyperledger Fabric Documentation Workgroup call - Western hemisphere

When:
Friday, 9 April 2021
11:00am to 12:00pm
(GMT-04:00) America/New York

Where:
https://zoom.us/my/hyperledger.community.backup?pwd=dkJKdHRlc3dNZEdKR1JYdW40R2pDUT09

Organizer:
pama@...

Description:
Documentation workgroup call.
Agenda, minutes and recordings :https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group

Join Zoom Meeting
https://zoom.us/j/6223336701?pwd=dkJKdHRlc3dNZEdKR1JYdW40R2pDUT09
 
Meeting ID: 622 333 6701
Passcode: 475869


Channel policies with affiliations/departments #fabric-ca #policy #affiliations #organizations #channel

spectre-@...
 

Hi, we have a basic commercial network that apart from having admins, nodes and clients, we need to have users (individual citizens) that transact on the network. The problem is that we need to give users a role that is not client, because this is nota scalable solution and won't be a sustainable infrastructure for future additions. We need to implement this for various reasons, one of them being that users should only be able to invoke chaincode, and not have access to other resources like event registration.

Since Fabric does not allow for custom Node OUs, AFAIK we have 2 options:
 -- Create 2 Intermediate CAs to distinguish 2 departments, members, and users
 -- Use affiliations inside the CA and set Organizational Units inside  config.yaml and  

1st question: How would you approach this issue? Is there a 3rd way?
2nd question: How do we implement the 2nd option? There is limited documentation as to how this is achieved. I will present what I have tried but does not work.

On CA Config:
affiliations:
   org1:
      - USERS
      - MEMBERS
 
On config.yaml:
 
OrganizationalUnitIdentifiers:
  - Certificate: cacerts/cacert.pem
    OrganizationalUnitIdentifier: USERS
  - Certificate: cacerts/cacert.pem
    OrganizationalUnitIdentifier: MEMBERS  
 
NodeOUs:
    Enable: true
    ClientOUIdentifier:
        # Certificate: cacerts/cacert.pem
        OrganizationalUnitIdentifier: client
    PeerOUIdentifier:
        # Certificate: cacerts/cacert.pem
        OrganizationalUnitIdentifier: peer
    AdminOUIdentifier:
        # Certificate: cacerts/cacert.pem
        OrganizationalUnitIdentifier: admin
    OrdererOUIdentifier:
        # Certificate: cacerts/cacert.pem
        OrganizationalUnitIdentifier: orderer

On configtx.yaml:
- Org1 
     ... 
       Readers:
                Type: Signature
                # If your MSP is configured with the new NodeOUs, you might
                # want to use a more specific rule like the following:
                Rule: "OR('Org1.MEMBERS.admin', 'Org1.MEMBERS.peer', 'Org1.MEMBERS.client')"    
        Invokers:
                Type: Signature
                Rule: "OR('Org1.USERS.client', 'Org1.MEMBERS.client', 'Org1.MEMBERS.peer', 'Org1.MEMBERS.admin')"

...
Policies:
        Invokers:
            Type: ImplicitMeta
            Rule: "ANY Invokers"

ACLS:
        # ACL policy for invoking chaincodes on peer
        peer/Propose: /Channel/Application/Invokers
 
        # ACL policy for chaincode to chaincode invocation
        peer/ChaincodeToChaincode: /Channel/Application/Invokers
 
Even though I register users with affiliation USERS, they are validated under Org1MSP instead of Org1MSP.USERS and are classified as READERS


Re: Using softHSM with orderer/peer #hsm

Tsvetan Georgiev
 

Hi Shantanu,


In few words when configured to use HSM the Fabric CA client enroll command will use the HSM to generate and store the private key (the PK will not be stored on the file system as it will be inside the HSM)

Hope that helps.

Senofi

Tsvetan Georgiev
Director, Senofi Inc.

438-494-7854 | tsvetan@...

www.senofi.ca

www.consortia.io







---- On Thu, 08 Apr 2021 18:57:43 -0400 <km.shantanu@...> wrote ----

Hello Team,

I am trying to set up a network with 3 orderers 2 peers and one CA with HSM support(softHSM). I have successfully set up CA with softHSM and can register and enroll with this.

I am trying to understand if how can I set up an orderer/peer to communicate with CA to get a private key and put that in soft-HSM? For example, if I run the fabric-client enroll command it stores the private key on the disk which kind of defeats the purpose of soft-HSM. Can someone please help clarify my understanding here and provide some guidance?

Thanks
Shantanu






Using softHSM with orderer/peer #hsm

Kumar Shantanu
 

Hello Team,

I am trying to set up a network with 3 orderers 2 peers and one CA with HSM support(softHSM). I have successfully set up CA with softHSM and can register and enroll with this.

I am trying to understand if how can I set up an orderer/peer to communicate with CA to get a private key and put that in soft-HSM? For example, if I run the fabric-client enroll command it stores the private key on the disk which kind of defeats the purpose of soft-HSM. Can someone please help clarify my understanding here and provide some guidance?

Thanks
Shantanu


Hyperledger Project Quarterly Update Due #tsc-project-update - Thu, 04/15/2021 #tsc-project-update #cal-reminder

fabric@lists.hyperledger.org Calendar <fabric@...>
 

Reminder: Hyperledger Project Quarterly Update Due #tsc-project-update

When: Thursday, 15 April 2021

View Event

Organizer: community-architects@...

Description: Please file a project status report for the TSC here:

https://wiki.hyperledger.org/display/TSC/2021+Project+Updates

https://wiki.hyperledger.org/display/TSC/2021+TSC+Project+Update+Calendar


Hyperledger Fabric Documentation Workgroup call - Western hemisphere - Fri, 04/09/2021 11:00am-12:00pm #cal-reminder

fabric@lists.hyperledger.org Calendar <fabric@...>
 

Reminder: Hyperledger Fabric Documentation Workgroup call - Western hemisphere

When: Friday, 9 April 2021, 11:00am to 12:00pm, (GMT-04:00) America/New York

Where:https://zoom.us/my/hyperledger.community.backup?pwd=dkJKdHRlc3dNZEdKR1JYdW40R2pDUT09

View Event

Organizer: Pam Andrejko pama@...

Description: Documentation workgroup call.
Agenda, minutes and recordings :https://wiki.hyperledger.org/display/fabric/Documentation+Working+Group

Join Zoom Meeting
https://zoom.us/j/6223336701?pwd=dkJKdHRlc3dNZEdKR1JYdW40R2pDUT09
 
Meeting ID: 622 333 6701
Passcode: 475869


Running same application from multiple users

Nikos Karamolegkos
 

Hello, I have a question about client applications in the network. Let's base our talk to the fabcar example. As I understand I can have multiple clients running the same application. For example two users that run the fabcar application (from different host PC). Am I correct? The first question is how a define a second user? Also, I have seen that there is the Readers and Writers logic,  how should I change the test-network/configtx/configtx.yaml file to set that only the one of the two users have the ability to change the owner of a car and the other one user is just a reader?

Thank you,

--
Nikos Karamolegkos
R & D engineer at ICS-FORTH
Telecommunications and Networks Lab (TNL)


CouchDB filter and pagination with views and lists #couchdb #database #fabric

milton.sesarego@...
 

Hi everyone. 

We are trying to build an application in HL Fabric with CouchDB and Golang, and it has grown a bit too much, and now we have many data types where we need to make join equivalents in the database to filter and display the data.

For example

Parent {
    docType: "parent"
    id: "parentID"
    child: "childID"
    active: true
}
Child {
    docType: "child"
    id: "childID"
    group: "some-group"
}

What we have tried:


Join inside the chaincode using Mango Queries, by code (doesn't seem like a good solution, but it was the only one that actually worked)
This is, get the parent, loop through results getting the children (in case of just listing)

In the case of filtering things get more complicated because we need to get the children filtered by group, get the parentIDs, use those in another query with a horrible "$or" of many IDs that we want to avoid


Join in CouchDB with views and lists

So, we came out with this "solution" but it has many problems

Our view function looks something like this

function (doc) {
if (doc.docType == "parent"){
emit([doc.active, doc.id] , {_id: doc.id});
emit([doc.active, doc.id] , {_id: doc.childID});
}
}


And our list function is this, which merges the docs by key

function (head, req) {
  var row, last_key, tweets;
  send('{"rows" : [');
  while ((row = getRow())) {
    if (last_key != row.key[1]) {
      if (last_key != "undefined") {
        send(toJSON({ key: last_key, values: tweets }));
        send(",");
      }
      tweets = [];
      last_key = row.key[1];
    }
    tweets.push(row.doc);
  }
  send(toJSON({ key: last_key, values: tweets }));
  send("]}");
};
Then we use
http://127.0.0.1:5984/testchannel_database/_design/new-design/_list/result/parents?include_docs=true


The filtering by fields in Child can't be done in the view, and to do them in the lists is very confusing, hard to later modify, and we've read that it may cause cache issues

The filtering by key and the limit keyword in the URL only apply in the view, so how do we paginate the list results?

Has anyone faced a similar problem or knows where the solution may be? 

Thank you


Re: What is 'member' role? #fabric #policies

Baohua Yang
 

Yes, any identity that is signed by the org root cert.

a.k.a., can be of client, peer, admin, orderer role, or no role.

On Tue, Apr 6, 2021 at 3:54 PM Kevin X <kevinx8888@...> wrote:
What is the member role as mentioned here: https://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html#endorsement-policy-syntax?

Does this mean any of the 'clinet', 'admin' or 'peer' rlole?



--
Best wishes!

Baohua Yang


What is 'member' role? #fabric #policies

Kevin X
 

What is the member role as mentioned here: https://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html#endorsement-policy-syntax?

Does this mean any of the 'clinet', 'admin' or 'peer' rlole?


Re: Build fabric on raspberry pi #fabric

Ry Jones
 

Hi,
I ran across a similar issue. I needed to add bintools-gold - does this help?
Ry


Private Chaincode Lab - Tue, 04/06/2021 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Private Chaincode Lab

When:
Tuesday, 6 April 2021
8:00am to 9:00am
(GMT-07:00) America/Los Angeles

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer:
bur@...

Description:
Two of the Hyperleger Labs projects (private data objects and private chain code) are collaborating to develop a "private smart contracts" capability.

Join Zoom Meeting https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09 Meeting ID: 518 494 7650 Passcode: 475869


Hyperledger Fabric Generic Network - No System Channel

Nicholas Leonardi
 

Hey guys,

I've updated the fabric-generic network to remove the need for a system channel.
For anyone interested, it's on the no-system-channel branch

I'll be updating the scripts to add and remove peers and orders from the application channel
in the next few days.






Minifab: Install chaincode in a single organization #minifab #minifabric

Kevin X
 

I have a minifab spec.yaml which creates two organizations.

I have a need to install a chaincode only on a single organization and I am not able to achieve it with minifab.

Even with "-o" option on install, the chaincode gets installed on all organizations.

Is there a way to specify the organizations on which a chaincode shall be installed? Also, is there a way to specify endorsement policy for chaincode?

Thanks


How to test InvokeChaincode API

Santiago Figueroa Lorenzo
 

Hello fabric experts,

I need to perform a test to compare the performance of a chaincode that includes in each of the functions at least one call to an external chaincode (as shown in the figure below, one call for each emitted log) with the same chaincode but without the calls to this external chaincode. So, specifically, the question is: is there any way to do a test (via go test, for instance) on the InvokeChaincode() API?

image.png

Thanks in advance,

Santiago.


Fabric Contributor Meeting - Wed, 03/31/2021 #cal-notice

fabric@lists.hyperledger.org Calendar <noreply@...>
 

Fabric Contributor Meeting

When:
Wednesday, 31 March 2021
9:00am to 10:00am
(GMT-04:00) America/New York

Where:
https://zoom.us/my/hyperledger.community.3?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09

Organizer:
enyeart@...

Description:
For meeting agendas, recordings, and more details, see https://wiki.hyperledger.org/display/fabric/Contributor+Meetings

Join Zoom Meeting
https://zoom.us/j/5184947650?pwd=UE90WHhEaHRqOGEyMkV3cldKa2d2dz09
 
Meeting ID: 518 494 7650
Passcode: 475869


Re: Getting error while running node enrollAdmin.js

Sudhan Manoharan
 

Thanks,@Tilak @Nidhi @Chris 
I fix the issue after updating the npm by using npm install npm@latest -g command.

Thanks,
Sudhan 

On Wed, Mar 31, 2021 at 6:00 PM Sudhan Manoharan via lists.hyperledger.org <sudhanmanoharan=gmail.com@...> wrote:

Hi Chris,
   Thanks for your reply. I'm facing a different new issue now.

Screenshot 2021-03-31 at 5.44.47 PM.png

On Wed, Mar 31, 2021 at 5:40 PM Gmail <alaskadd@...> wrote:
Hi Sudan,
Step 1: In package.json file, ensure node version is correct.
Step 2: Delete package-lock.json (make sure you delete package-lock.json and NOT package.json)
Step 3: Delete the node_modules folder
Step 4: Run mom install again

Be sure to report your result back to this list so others can learn. 
Thanks,
Chris


On Mar 31, 2021, at 5:30 AM, Sudhan Manoharan <sudhanmanoharan@...> wrote:


Hi Nidhi,
    I tried with node v12.0.0 and npm 6.9.0. But the same issue.

<Screenshot 2021-03-31 at 4.58.34 PM.png>


Thanks,
Sudhan

On Wed, Mar 31, 2021 at 4:48 PM Nidhi Singh <nidhi2894@...> wrote:
Sudhan,

As per the documentation, Fabric Node SDK supports Node.js version 10 from 10.15.3 and higher. 

Your current version 10 is lower than this. Can you try upgrading node and running npm install. 


Thanks,
Nidhi


On Wed, Mar 31, 2021, 4:36 PM Sudhan Manoharan <sudhanmanoharan@...> wrote:
Hi arthur,
   Thanks for ur response. Getting the same issue after with ur command.

Thanks & Regards,
Sudhan

On Wed, Mar 31, 2021 at 4:30 PM Arthur Souza <arthur.msouza@...> wrote:
Hi Nidhi,

please try to type the following command:

npm install --unsafe-perm=true --allow-root

Arthur 

On Wednesday, March 31, 2021, Sudhan Manoharan <sudhanmanoharan@...> wrote:
Hi Nidhi,
    Thanks for ur reply. I can't find the 'pkcs11js' library inside the node_module folder. I did a manual installation of pkcs11js library that also not help me. Same error and I'm also in the correct directory.
Addition information
Node: 10.14.1
NPM: 6.4.1

Thanks,
Sudhan

On Wed, Mar 31, 2021 at 4:02 PM Nidhi Singh <nidhi2894@...> wrote:
Hi Sudhan,

Can you verify node_modules is installed for this 'pkcs11js'.

Inside node_modules are you able to see this module ?

Or run npm install in the correct directory having the package.json file and try again.

Thanks,
Nidhi


On Wed, Mar 31, 2021, 3:49 PM Sudhan Manoharan <sudhanmanoharan@...> wrote:
Hi Team,
     I'm trying to write chaincode and invoking chaincode by using node js SDK. But I'm facing one issue. While trying to run the node enrollAdmin.js to enroll the user in the blockchain network. But during this process, I'm facing an issue like Error: Cannot find module 'pkcs11js' [ I attached the detailed image in the following mail ].  Please help me out to resolve this issue. 

<Screenshot 2021-03-31 at 3.46.03 PM.png>


Thanks,
Sudhan


Re: Getting error while running node enrollAdmin.js

Sudhan Manoharan
 

Hi Chris,
   Thanks for your reply. I'm facing a different new issue now.

Screenshot 2021-03-31 at 5.44.47 PM.png


On Wed, Mar 31, 2021 at 5:40 PM Gmail <alaskadd@...> wrote:
Hi Sudan,
Step 1: In package.json file, ensure node version is correct.
Step 2: Delete package-lock.json (make sure you delete package-lock.json and NOT package.json)
Step 3: Delete the node_modules folder
Step 4: Run mom install again

Be sure to report your result back to this list so others can learn. 
Thanks,
Chris


On Mar 31, 2021, at 5:30 AM, Sudhan Manoharan <sudhanmanoharan@...> wrote:


Hi Nidhi,
    I tried with node v12.0.0 and npm 6.9.0. But the same issue.

<Screenshot 2021-03-31 at 4.58.34 PM.png>


Thanks,
Sudhan

On Wed, Mar 31, 2021 at 4:48 PM Nidhi Singh <nidhi2894@...> wrote:
Sudhan,

As per the documentation, Fabric Node SDK supports Node.js version 10 from 10.15.3 and higher. 

Your current version 10 is lower than this. Can you try upgrading node and running npm install. 


Thanks,
Nidhi


On Wed, Mar 31, 2021, 4:36 PM Sudhan Manoharan <sudhanmanoharan@...> wrote:
Hi arthur,
   Thanks for ur response. Getting the same issue after with ur command.

Thanks & Regards,
Sudhan

On Wed, Mar 31, 2021 at 4:30 PM Arthur Souza <arthur.msouza@...> wrote:
Hi Nidhi,

please try to type the following command:

npm install --unsafe-perm=true --allow-root

Arthur 

On Wednesday, March 31, 2021, Sudhan Manoharan <sudhanmanoharan@...> wrote:
Hi Nidhi,
    Thanks for ur reply. I can't find the 'pkcs11js' library inside the node_module folder. I did a manual installation of pkcs11js library that also not help me. Same error and I'm also in the correct directory.
Addition information
Node: 10.14.1
NPM: 6.4.1

Thanks,
Sudhan

On Wed, Mar 31, 2021 at 4:02 PM Nidhi Singh <nidhi2894@...> wrote:
Hi Sudhan,

Can you verify node_modules is installed for this 'pkcs11js'.

Inside node_modules are you able to see this module ?

Or run npm install in the correct directory having the package.json file and try again.

Thanks,
Nidhi


On Wed, Mar 31, 2021, 3:49 PM Sudhan Manoharan <sudhanmanoharan@...> wrote:
Hi Team,
     I'm trying to write chaincode and invoking chaincode by using node js SDK. But I'm facing one issue. While trying to run the node enrollAdmin.js to enroll the user in the blockchain network. But during this process, I'm facing an issue like Error: Cannot find module 'pkcs11js' [ I attached the detailed image in the following mail ].  Please help me out to resolve this issue. 

<Screenshot 2021-03-31 at 3.46.03 PM.png>


Thanks,
Sudhan

1741 - 1760 of 11510