Unable to enroll user in new org added to balance transfer sample

fabric-ca request register failed with errors (((code'':20,message authentication failure)))
hyperledger fabric create user
hyperledger fabric enrollment secret
fabric ca tutorial
hf registrar roles
hyperledger fabric intermediate ca
hyperledger fabric hsm
ldap hyperledger fabric

I am following Balance transfer from Hyperledger Fabric samples from this link. I have modified it a bit, now I have 3 Orgs with 1 Peer each. All goes fine till I enroll users to Org1 and Org2 but, when I try to enroll a user to my 3rd Org I get following error

Failed to get registered user: xyz with error: Error: fabric-ca request register failed with errors [[{"code":63,"message":"Failed to get Affiliation: sql: no rows in result set"}]]

My Binaries of Hyperledger Fabric are from version 1.1.0 Alfa

The issue is that the fabric-ca being used in the sample does not know about the affiliation. By default, fabric-ca only has the following affiliations:

org1.department1 org1.department2 org2.department1

The code which registers and enrolls users in the sample takes the org name and concatenates it with "department1" :

let secret = await caClient.register({
                enrollmentID: username,
                affiliation: userOrg.toLowerCase() + '.department1'
            }, adminUserObj);

So when you pass in Org3, it tries to register the user with the affiliation org3.department1 which does not exist.

Since you are using 1.1.0-alpha, you are in luck as this version of fabric-ca supports has an API for adding new affiliations. The easiest way is to use the fabric-ca-client to do this:

fabric-ca-client affiliation add org3
fabric-ca-client affiliation add org3.department1

You can look at the fabric-ca docs ( http://hyperledger-fabric-ca.readthedocs.io/ ) for more details. You'll need to first enroll the admin user which has the password "adminpw" with the fabric-ca-client and then run the above commands.

Unable to enroll user in new org, I am using the following link for Balance transfer from Hyperledger Fabric samples: https://github.com/ : sql: no rows in result set"}]] I try to enroll an user in balance transfer samples, But it's return result secret field is null. Unable to enroll user in new org added to balance transfer

This may be useless (and very late), but I'd like to add to Gari's answer. You can also add affiliations using the node client SDK's AffiliationService class. To do this in the balance transfer code, modify helper.js with:

let adminUserObj = await client.setUserContext({
                        username: admins[0].username, 
                        password: admins[0].secret});

let caClient = client.getCertificateAuthority();
let affiliationService = caClient.newAffiliationService();

let registeredAffiliations = await affiliationService.getAll(adminUserObj);
if(!registeredAffiliations.result.affiliations.some(
    x => x.name == userOrg.toLowerCase())){
        let affiliation = 'org3.department1'; 
        await affiliationService.create({
                        name: affiliation, 
                        force: true}, adminUserObj);
}

Note: The above code only adds the affiliations (which I think is the only thing missing in your case). To successfully enroll a user for Org3, you'll also have specify org3 in artifacts/channel/cryptogen.yaml, artifacts/channel/configtx.yaml, artifacts/docker-compose.yaml, artifacts/network-config.yaml and config.json. And create an org3.yaml file.

I built a chaincode sample app with the balance transfer sample as a base which has 3 orgs. You can take a look at it to see the necessary changes.

[FAB-7511] balance-transfer app fails to execute e2e due to jwt , I am following Balance transfer from Hyperledger Fabric samples from this link. I have modified it a bit, now I have 3 Orgs with 1 Peer each. All goes fine till I  The thing is by default, fabric-ca only has the following affiliations: org1.department1 org1.department2 org2.department1. So, the fabric-ca being used in the sample does not know about the affiliation

Please pay attention to this line in helper.js,

let secret = await caClient.register({ enrollmentID: username, affiliation: userOrg.toLowerCase() + '.department1' }, adminUserObj);

Are you sure you are lowercasing for Org3 (in config yaml files) ?

blockchain-explorer/TROUBLESHOOT.md at master · hyperledger , balance-transfer app fails to execute e2e due to jwt malformed error Barry for organization Org2 UnauthorizedError: jwt malformed at /Users/ /fabric-samples/​balance-transfer/node_modules/jsonwebtoken/verify.js: The user crypto is not deleted properly and hence register/enroll fails on new network. See our balance transfer from American Express page for details on how to avoid these balance transfer problems. Balance Transfer Problems With Credit Limits. When you are looking to make a balance transfer to new credit card, you very often will not know the credit limit on the new credit card at the time you request the balance transfer. This credit limit can also create balance transfer problems.

I had seen the same problem in fabric 1.3, I have changed the names and configured my own. by removing below statement helped me

just comment the below line in 'helper.js' helped me.

//affiliation: userOrg.toLowerCase() + '.department1'

Fabric CA User's Guide, I am following Balance transfer from Hyperledger Fabric samples from this link. I have modified it a bit, now I have 3 Orgs with 1 Peer each. You can almost certainly use it to transfer a balance if it lists an APR and fee for balance transfers, assuming you qualify and are approved for the new card. Likewise, it's safe to assume you can't transfer balances to that credit card if these costs aren't listed, but you can always call the card's customer service to confirm.

You can add more organizations and there departments by changing the fabric-ca-server-config by going to the fabric-ca docker container.

docker exec -it ca.org1.example.com bash 

Go the root@c3804e2852fd:/etc/hyperledger/fabric-ca-server# directory inside the container

Now edit fabric-ca-server-config.yaml file. Add organizations and their departments as per your choice.

Below i have added one "Manufacturer" organization. You can add Org3 like this.

Store Hyperledger Fabric certificates and keys in CouchDB, Error: Error: 14 UNAVAILABLE: Connect Failed at new createStatusError Adding a leading "/" before `$network_config_file` and [ERROR] FabricClient - { Error: 2 UNKNOWN: access denied: channel [] creator org [Org1MSP] at Object.​exports. /Users/USER_ID/workspace/fabric-1.3/fabric-samples/balance-transfer​/  Add / Enroll new LIC policies to your existing LIC online account If you hold one or more LIC policies either on your name or for your family members, you shall maint How to create a new online account for my LIC Policy

Your Graduate Training in Psychology: Effective Strategies for Success, Enrolling the bootstrap identity; Registering a new identity; Enrolling a peer The client routes to an HA Proxy endpoint which load balances traffic to one of the For more information on libtool, see https://www.gnu.org/software/libtool. The following sample may be added to the Fabric CA server configuration file in order  A department administrator can add new accounts to their departments. They can remove accounts from their departments, but not from the enrollment. To add a department: Sign in to the Azure Enterprise portal. In the left pane, select Manage. Select the Department tab, then select + Add Department. Enter the information.

Get the Most Benefit from Your Balance Transfer, In fabric-samples/balance-transfer , the file system is the default wallet. When you The state store is used to store the certificates of the enrolled identity. It stores the Each organization must have their state-store and crypto-store db, else it will throw the Authentication Error. Register a new user in the balance transfer. There are a number of situations in which a credit card issuer might say no to your balance transfer request. For example, you may have a balance transfer declined if: You have a poor credit history: If you’re applying for a brand-new credit card to take advantage of a promotional balance transfer offer,

Transferring. Credit. This chapter has been written with the student in mind who is They might, for example, be enrolled in a campus-based program and want to If they are unable to assist you, they should be able to recommend someone Retrieved July 7, 2011, from http://www.apa .org/ed/resources/finalreport.doc. How can I enroll my other accounts to RCBC Online Banking? You can enroll other accounts through the "Manage My Account" menu of RCBC Online Banking. Click "Add Account" in the upper right corner of the page and enroll any of the following accounts: 1) ATM Card, 2) Non-ATM Account, 3) MyWallet Cash Card, 4) Bankard Credit Card, and 5) RCBC Loan.

Comments
  • where shall i execute above commands? Do i have to setup fabric-ca locally? I tried to run one of the command but seems affiliation command is not available in my fabric-ca-client.
  • where do you add this code in the helper.js ? can you post a full example with the initialisation of client ?