2017-09-23 6 views

답변

1

현재 모든 체인 코드 용 API는 interface.go 파일에 설명되어 있습니다. 현재로서는 체인 코드 내부에서 피어와 조직 호출을 식별 할 수있는 API가 없습니다. 그 주된 이유는 체인 코드가 그 유형의 정보에 대해 불가지론 적이어야한다는 것입니다. 피어와 체인 코드에 의해 관리되는 모든 ACL은 그곳에 대해 불가지론을 유지해야하며, 호출하는 사람과 상관없이 결정 론적 인 행동을 보존해야합니다. 또한 당신이 할 수있는 클라이언트에 대해 배울 클라이언트 인증서를 구문 분석 한 후

// GetCreator returns `SignatureHeader.Creator` (e.g. an identity) 
    // of the `SignedProposal`. This is the identity of the agent (or user) 
    // submitting the transaction. 
    GetCreator() ([]byte, error) 

그리고 :

만약 당신이 아마 GetCreator API를 사용하여 트랜잭션 제안 요청을 만든 클라이언트의 신원을 활용하는 시도 할 수 필요 나는이에 대한 인식하지 오전부터

// GetTransient returns the `ChaincodeProposalPayload.Transient` field. 
// It is a map that contains data (e.g. cryptographic material) 
// that might be used to implement some form of application-level 
// confidentiality. The contents of this field, as prescribed by 
// `ChaincodeProposalPayload`, are supposed to always 
// be omitted from the transaction and excluded from the ledger. 
GetTransient() (map[string][]byte, error) 
+0

이 정보가 도움이 보인다도 나중에 chaincode 읽을 수있는 관련 정보를 넣어 클라이언트를 만들기 위해 transient fields를 사용하는 것이 좋습니다. 그러나 여전히 나는 나의 요구 사항에 도달 할 수 없었다. 내 마음 속의 것들에 대해 분명히하기 위해, 나는 단지 포스트를 업데이트하고있다. 그냥 통과하고이 요구 사항을 달성하도록 제안하십시오. – Girish007

+0

업데이트 후에는 첫 번째 글 머리 기호와 동일한 질문을 https://stackoverflow.com/questions/46352182/implement-inter-channel-security-among-the-peers-within-the-same-로 질문합니다. 과장된 채널, 맞습니까? –

+0

업데이트 된 섹션을 별도의 질문으로 추출 하시겠습니까? –