title: Hyperledger Fabric enroll & register admin not working
body: <p>I'm trying to enroll &amp; register an admin to perform peer operations.
  This is the bash code:</p>
  
  <pre><code>#!/bin/bash
  user="$1"
  pass="$2"
  org="$3"
  type="$4"
  tlscerts="/chainset/hyperledger-config/crypto-config/ordererOrganizations/default.svc.cluster.local/msp/tlscacerts/ca-root-7054.pem"
  
  fabric-ca-client enroll -u http://admin:adminpw@ca-root:7054
  
  fabric-ca-client register --id.name ${user} --id.secret ${pass} --id.type ${type} --id.affiliation ${org} --id.attrs 'hf.Revoker=true,admin=true:ecert' -u http://ca-root:7054 --tls.certfiles ${tlscerts}
  
  export FABRIC_CA_CLIENT_HOME=/chainset/hyperledger-config/crypto-config/peerOrganizations/${org}/users/${user}@${org}/
  fabric-ca-client enroll -u http://${user}:${pass}@ca-root:7054 --id.affiliation ${org} --tls.certfiles ${tlscerts} 
  
  mv /chainset/hyperledger-config/crypto-config/peerOrganizations/${org}/users/${user}@${org}/msp/signcerts/cert.pem /chainset/hyperledger-config/crypto-config/peerOrganizations/${org}/users/${user}@${org}/msp/signcerts/${user}@${org}-cert.pem
  mkdir /chainset/hyperledger-config/crypto-config/peerOrganizations/${org}/users/${user}@${org}/msp/admincerts/
  cp /chainset/hyperledger-config/crypto-config/peerOrganizations/${org}/users/${user}@${org}/msp/signcerts/* /chainset/hyperledger-config/crypto-config/peerOrganizations/${org}/users/${user}@${org}/msp/admincerts/
  </code></pre>
  
  <p>When I try to create a new channel I get this error:</p>
  
  <pre><code>Description: error validating channel creation transaction for new channel 'newchannelf', could not successfully apply update to template configuration: error authorizing update: error validating DeltaSet: policy for [Group]  /Channel/Application not satisfied: implicit policy evaluation failed - 0 sub-policies were satisfied, but this policy requires 1 of the 'Admins' sub-policies to be satisfied
  </code></pre>
  
  <p>This is my configtx.yml configuration. I don't know if it is a problem with the policies in this configuration file or if I'm not registering &amp; enrolling the user correctly.</p>
  
  <pre><code>Organizations:
    - &amp;orderer
      Name: orderer
      ID: orderer
      MSPDir: crypto-config/ordererOrganizations/default.svc.cluster.local/msp
      Policies:
        Readers:
          Type: Signature
          Rule: "OR('orderer.member')"
        Writers:
          Type: Signature
          Rule: "OR('orderer.member')"
        Admins:
          Type: Signature
          Rule: "OR('orderer.admin')"
  
    - &amp;org1
      Name: org1
      ID: org1
      MSPDir: crypto-config/peerOrganizations/org1/msp
      Policies:
        Readers:
          Type: Signature
          Rule: "OR('org1.admin', 'org1.peer', 'org1.client', 'org1.member')"
        Writers:
          Type: Signature
          Rule: "OR('org1.admin', 'org1.peer', 'org1.client', 'org1.member')"
        Admins:
          Type: Signature
          Rule: "OR('org1.admin')"
      AnchorPeers:
        - Host: peer0-org1-service
          Port: 7051
  
    - &amp;org2
      Name: org2
      ID: org2
      MSPDir: crypto-config/peerOrganizations/org2/msp
      Policies:
        Readers:
          Type: Signature
          Rule: "OR('org2.admin', 'org2.peer', 'org2.client', 'org2.member')"
        Writers:
          Type: Signature
          Rule: "OR('org2.admin', 'org2.peer', 'org2.client', 'org2.member')"
        Admins:
          Type: Signature
          Rule: "OR('org2.admin')"
      AnchorPeers:
        - Host: peer0-org2-service
          Port: 7051
  
  Capabilities:
    Channel: &amp;ChannelCapabilities
      V1_4_3: true
  
    Orderer: &amp;OrdererCapabilities
      V1_4_2: true
  
    Application: &amp;ApplicationCapabilities
      V1_4_2: true
  
  Application: &amp;ApplicationDefaults
    Organizations:
      - *orderer
      - *org1
      - *org2
  
    Policies:
      Readers:
        Type: ImplicitMeta
        Rule: "ANY Readers"
      Writers:
        Type: ImplicitMeta
        Rule: "ANY Writers"
      Admins:
        Type: ImplicitMeta
        Rule: "ANY Admins"
      BlockValidation:
        Type: ImplicitMeta
        Rule: "ANY Writers"
  
    Capabilities:
      &lt;&lt;: *ApplicationCapabilities
  
  Orderer: &amp;OrdererDefaults
  
    OrdererType: etcdraft
    EtcdRaft:
      Consenters:
        - Host: orderer0-service
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/default.svc.cluster.local/orderers/orderer0.default.svc.cluster.local/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/default.svc.cluster.local/orderers/orderer0.default.svc.cluster.local/tls/server.crt
        - Host: orderer1-service
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/default.svc.cluster.local/orderers/orderer1.default.svc.cluster.local/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/default.svc.cluster.local/orderers/orderer1.default.svc.cluster.local/tls/server.crt
        - Host: orderer2-service
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/default.svc.cluster.local/orderers/orderer2.default.svc.cluster.local/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/default.svc.cluster.local/orderers/orderer2.default.svc.cluster.local/tls/server.crt
    Addresses:
      - orderer0-service:7050
      - orderer1-service:7050
      - orderer2-service:7050
  
    BatchTimeout: 1s
    BatchSize:
      MaxMessageCount: 10
      AbsoluteMaxBytes: 99 MB
      PreferredMaxBytes: 512 KB
  
    Kafka:
      Brokers:
        - 127.0.0.1:9092
  
    Organizations:
      - *orderer
  
    Policies:
      Readers:
        Type: ImplicitMeta
        Rule: "ANY Readers"
      Writers:
        Type: ImplicitMeta
        Rule: "ANY Writers"
      Admins:
        Type: ImplicitMeta
        Rule: "MAJORITY Admins"
      BlockValidation:
        Type: ImplicitMeta
        Rule: "ANY Writers"
  
  Channel: &amp;ChannelDefaults
  
    Policies:
      Readers:
        Type: ImplicitMeta
        Rule: "ANY Readers"
      Writers:
        Type: ImplicitMeta
        Rule: "ANY Writers"
      Admins:
        Type: ImplicitMeta
        Rule: "ANY Admins"
  
    Capabilities:
      &lt;&lt;: *ChannelCapabilities
  
  Profiles:
  
    OrdererGenesis:
      &lt;&lt;: *ChannelDefaults
      Capabilities:
        &lt;&lt;: *ChannelCapabilities
      Orderer:
        &lt;&lt;: *OrdererDefaults
        Organizations:
          - *orderer
        Capabilities:
          &lt;&lt;: *OrdererCapabilities
      Application:
        &lt;&lt;: *ApplicationDefaults
        Organizations:
          - &lt;&lt;: *orderer
      Consortiums:
        MAIN:
          Organizations:
            - *org1
            - *org2
  
    MainChannel:
      &lt;&lt;: *ChannelDefaults
      Consortium: MAIN
      Application:
        &lt;&lt;: *ApplicationDefaults
        Organizations:
          - *org1
          - *org2
        Capabilities:
          &lt;&lt;: *ApplicationCapabilities
  </code></pre>