• 1) Configure ACL
    • 기본적으로 'configtx.yaml'에서 ACL을 설정 합니다.
    • 특정 channel의 '리소스'와 그에대한 '정책'을 관리 하는것이죠.
    • 예)
    • Application: &ApplicationDefaults
      • ACLs: &ACLsDefault
        • lscc/ChaincodeExists: /Channel/Application/Readers
        • qscc/GetChainInfo: /Channel/Application/Readers
        • cscc/GetConfigBlock: /Channel/Application/Readers
        • peer/Propose: /Channel/Application/Writers
        • event/Block: /Channel/Application/Readers
        • ...
      • Policies: &ApplicationDefaultPolicies
        • Readers:
          • Type: ImplicitMeta
          • Rule: "ANY Readers"
        • Writers:
          • Type: ImplicitMeta
          • Rule: "ANY Writers"
        • Admins:
          • Type: ImplicitMeta
          • Rule: "MAJORITY Admins"
    • '리소스'는 '{component명}/{resource명}' 식으로 명시됩니다.
      • 예) lscc/ChaincodeExists   # "Lifecycle System Chaincode (lscc)"의 getid() 함수
      • 예) qscc/GetChainInfo  # "Query System Chaincode (qscc)"의 GetChainInfo() 함수
      • 예) cscc/GetConfigBlock  # "Configuration System Chaincode (cscc)"의 GetConfigBlock() 함수
      • 예) peer/Propose  # peer의 invoke 기능
      • 예) event/Block   # block 이벤트
    • '정책'은 두가지 방식으로 표현됩니다.
      • Signature policies : 특정 identity를 구체적으로 명시.
        • 예) Policies:
          • MyPolicy:
            • Type: Signature
            • Rule: "Org1.Peer OR Org2.Peer" // AND|OR|NOutOf
      • ImplicitMeta policies : 더 세분화된 정의...
        • 예) Policies:
          • AnotherPolicy:
            • Type: ImplicitMeta
            • Rule: "MAJORITY Admins" // ALL|ANY|MAJORITY , Admins|Readers|Writers|(Peer)|(Client)
    • 참고적으로 https://github.com/hyperledger/fabric/blob/release-1.4/sampleconfig/configtx.yaml 좋음.
  • 2) Create end user identity
    • 아마도... Fabric CA 기반으로, Wallet를 다루는 영역인거 같다.
    • 기본적으로, 'hyperledger/fabric-ca' 를~ 해당 organization에 'CA 인증서' 와 'ID/PW' 으로 잘 띄운다.
    • (이렇게 해당 organization의 'CA 인증서' 로 -> 'Admin 및 User 인증서' 를 발급 하는거 같다.)
    • 그리고, Admin 와 User 를 잘 등록한다.
      • 예) fabric_client = new Fabric_Client();
      • 예) fabric_ca_client = new Fabric_CA_Client(...);
      • 예) fabric_ca_client.enroll({enrollmentID: 'ID',enrollmentSecret: 'PW'})
      • 예) fabric_client.createUser({username:'user', mspid:'OrgMSP', cryptoContent:{privateKeyPEM:..., signedCertPEM:...}});
      • 예) fabric_ca_client.register({enrollmentID: 'user', affiliation: 'org1',role: 'client'}, admin_user);
    • 'hfc-key-store'에 해당이름에 'json파일' 과 "private 및 public key" 가 생기는거 같다.
    • 음...
  • 3) Revoke an identity
    • admin 권한의 new Fabric_CA_Client() 으로... user를 하면 되지 않으까???
    • 음...
  • 4) Configure and start Hyperledger Fabric CA
    • 'hyperledger/fabric-ca' 를 해당 organization에 'CA 인증서' 와 'ID/PW' 으로 잘 띄우면 될듯
    • 음...
  • 5) Configure Hyperledger Fabric for hardware security module
    • HSM : https://en.wikipedia.org/wiki/Hardware_security_module
    • wallet의 type으로 가 있다...
    • ...

-끝-

+ Recent posts