{"action":"closed","number":1679,"pull_request":{"url":"https://api.github.com/repos/hyperledger/fabric/pulls/1679","id":72270114,"html_url":"https://github.com/hyperledger/fabric/pull/1679","diff_url":"https://github.com/hyperledger/fabric/pull/1679.diff","patch_url":"https://github.com/hyperledger/fabric/pull/1679.patch","issue_url":"https://api.github.com/repos/hyperledger/fabric/issues/1679","number":1679,"state":"closed","locked":false,"title":"Fix some of Issue 1309","user":{"login":"lehors","id":6464618,"avatar_url":"https://avatars.githubusercontent.com/u/6464618?v=3","gravatar_id":"","url":"https://api.github.com/users/lehors","html_url":"https://github.com/lehors","followers_url":"https://api.github.com/users/lehors/followers","following_url":"https://api.github.com/users/lehors/following{/other_user}","gists_url":"https://api.github.com/users/lehors/gists{/gist_id}","starred_url":"https://api.github.com/users/lehors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehors/subscriptions","organizations_url":"https://api.github.com/users/lehors/orgs","repos_url":"https://api.github.com/users/lehors/repos","events_url":"https://api.github.com/users/lehors/events{/privacy}","received_events_url":"https://api.github.com/users/lehors/received_events","type":"User","site_admin":false},"body":"<!--- Provide a general summary of your changes in the Title above -->\r\n\r\n## Description\r\n<!--- Describe your changes in detail. -->\r\nThis PR makes the peer command fail when it is configured to enable privacy while security is off and spit out a warning if a username is provided with security is off.\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\nAddresses some of issue #1309\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- If this PR does not contain a new test case, explain why. -->\r\n```\r\n$ CORE_SECURITY_ENABLED=false CORE_SECURITY_PRIVACY=true ./peer node start\r\n23:35:42.864 [crypto] main -> INFO 001 Log level recognized 'info', set to INFO\r\n23:35:42.876 [main] serve -> INFO 003 Security enabled status: false\r\npanic: Privacy cannot be enabled as requested because security is disabled\r\n\r\ngoroutine 1 [running]:\r\npanic(0xd033e0, 0xc820246960)\r\n        /opt/go/src/runtime/panic.go:464 +0x3e6\r\nmain.serve(0x155ca10, 0x0, 0x0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:439 +0x1c62\r\nmain.glob.func3(0x151f160, 0x155ca10, 0x0, 0x0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:96 +0x41\r\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).execute(0x151f160, 0x155ca10, 0x0, 0x0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:497 +0x62c\r\ngithub.com/hyperledger/fabric/vendor/github.com/spf13/cobra.(*Command).Execute(0x151ede0, 0x0, 0x0)\r\n        /opt/gopath/src/github.com/hyperledger/fabric/vendor/github.com/spf13/cobra/command.go:584 +0x46a\r\nmain.main()\r\n        /opt/gopath/src/github.com/hyperledger/fabric/peer/main.go:316 +0x18d9\r\n\r\n```\r\n\r\n```\r\n$ CORE_SECURITY_ENABLED=false ./peer chaincode deploy -u jim -n mycc -c '{\"Function\":\"init\", \"Args\": [\"a\",\"100\", \"b\", \"200\"]}'\r\n23:43:02.942 [crypto] main -> INFO 001 Log level recognized 'info', set to INFO\r\n23:43:02.958 [main] chaincodeDeploy -> WARN 002 Username supplied but security is disabled.\r\nmycc\r\n\r\n```\r\n\r\n## Checklist:\r\n<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->\r\n<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n- [x] I have added a [Signed-off-by](https://github.com/hyperledger/fabric/blob/master/CONTRIBUTING.md#legal-stuff)\r\n- [x] Either no new documentation is required by this change, OR I added new documentation\r\n- [x] Either no new tests are required by this change, OR I added new tests\r\n- [x] I have run [goimports](https://godoc.org/golang.org/x/tools/cmd/goimports), [go vet](https://golang.org/cmd/vet/), and [golint](https://github.com/golang/lint). I have cleaned up all valid errors and warnings in code I have added or modified. These tools may generate false positives. Don't be worried about ignoring some errors or warnings. The goal is clean, consistent, and readable code.\r\n\r\nSigned-off-by:Arnaud J Le Hors <lehors@us.ibm.com>\r\n","created_at":"2016-06-01T23:45:01Z","updated_at":"2016-06-04T20:08:02Z","closed_at":"2016-06-04T20:08:02Z","merged_at":"2016-06-04T20:08:02Z","merge_commit_sha":"f3cdada9998ea2b918a5ae14d7645c201aff3289","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hyperledger/fabric/pulls/1679/commits","review_comments_url":"https://api.github.com/repos/hyperledger/fabric/pulls/1679/comments","review_comment_url":"https://api.github.com/repos/hyperledger/fabric/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperledger/fabric/issues/1679/comments","statuses_url":"https://api.github.com/repos/hyperledger/fabric/statuses/0372928b9e9c36ed7f8877b1bbbae71a8ca8bab4","head":{"label":"lehors:issue-1309","ref":"issue-1309","sha":"0372928b9e9c36ed7f8877b1bbbae71a8ca8bab4","user":{"login":"lehors","id":6464618,"avatar_url":"https://avatars.githubusercontent.com/u/6464618?v=3","gravatar_id":"","url":"https://api.github.com/users/lehors","html_url":"https://github.com/lehors","followers_url":"https://api.github.com/users/lehors/followers","following_url":"https://api.github.com/users/lehors/following{/other_user}","gists_url":"https://api.github.com/users/lehors/gists{/gist_id}","starred_url":"https://api.github.com/users/lehors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehors/subscriptions","organizations_url":"https://api.github.com/users/lehors/orgs","repos_url":"https://api.github.com/users/lehors/repos","events_url":"https://api.github.com/users/lehors/events{/privacy}","received_events_url":"https://api.github.com/users/lehors/received_events","type":"User","site_admin":false},"repo":{"id":55450739,"name":"fabric","full_name":"lehors/fabric","owner":{"login":"lehors","id":6464618,"avatar_url":"https://avatars.githubusercontent.com/u/6464618?v=3","gravatar_id":"","url":"https://api.github.com/users/lehors","html_url":"https://github.com/lehors","followers_url":"https://api.github.com/users/lehors/followers","following_url":"https://api.github.com/users/lehors/following{/other_user}","gists_url":"https://api.github.com/users/lehors/gists{/gist_id}","starred_url":"https://api.github.com/users/lehors/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lehors/subscriptions","organizations_url":"https://api.github.com/users/lehors/orgs","repos_url":"https://api.github.com/users/lehors/repos","events_url":"https://api.github.com/users/lehors/events{/privacy}","received_events_url":"https://api.github.com/users/lehors/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lehors/fabric","description":"Blockchain fabric incubator code","fork":true,"url":"https://api.github.com/repos/lehors/fabric","forks_url":"https://api.github.com/repos/lehors/fabric/forks","keys_url":"https://api.github.com/repos/lehors/fabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lehors/fabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lehors/fabric/teams","hooks_url":"https://api.github.com/repos/lehors/fabric/hooks","issue_events_url":"https://api.github.com/repos/lehors/fabric/issues/events{/number}","events_url":"https://api.github.com/repos/lehors/fabric/events","assignees_url":"https://api.github.com/repos/lehors/fabric/assignees{/user}","branches_url":"https://api.github.com/repos/lehors/fabric/branches{/branch}","tags_url":"https://api.github.com/repos/lehors/fabric/tags","blobs_url":"https://api.github.com/repos/lehors/fabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lehors/fabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lehors/fabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/lehors/fabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lehors/fabric/statuses/{sha}","languages_url":"https://api.github.com/repos/lehors/fabric/languages","stargazers_url":"https://api.github.com/repos/lehors/fabric/stargazers","contributors_url":"https://api.github.com/repos/lehors/fabric/contributors","subscribers_url":"https://api.github.com/repos/lehors/fabric/subscribers","subscription_url":"https://api.github.com/repos/lehors/fabric/subscription","commits_url":"https://api.github.com/repos/lehors/fabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/lehors/fabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/lehors/fabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/lehors/fabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/lehors/fabric/contents/{+path}","compare_url":"https://api.github.com/repos/lehors/fabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lehors/fabric/merges","archive_url":"https://api.github.com/repos/lehors/fabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lehors/fabric/downloads","issues_url":"https://api.github.com/repos/lehors/fabric/issues{/number}","pulls_url":"https://api.github.com/repos/lehors/fabric/pulls{/number}","milestones_url":"https://api.github.com/repos/lehors/fabric/milestones{/number}","notifications_url":"https://api.github.com/repos/lehors/fabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lehors/fabric/labels{/name}","releases_url":"https://api.github.com/repos/lehors/fabric/releases{/id}","deployments_url":"https://api.github.com/repos/lehors/fabric/deployments","created_at":"2016-04-04T22:44:15Z","updated_at":"2016-04-07T03:39:21Z","pushed_at":"2016-06-03T14:43:16Z","git_url":"git://github.com/lehors/fabric.git","ssh_url":"git@github.com:lehors/fabric.git","clone_url":"https://github.com/lehors/fabric.git","svn_url":"https://github.com/lehors/fabric","homepage":"","size":42755,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hyperledger:master","ref":"master","sha":"0a7f3e214d6539d87bae64f64e4d96ff2e2f2b0b","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars.githubusercontent.com/u/7657900?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":42975662,"name":"fabric","full_name":"hyperledger/fabric","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars.githubusercontent.com/u/7657900?v=3","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/fabric","description":"Fabric is a blockchain project in Incubation proposed to the community and documented at https://goo.gl/RYQZ5N.  Information on what Incubation entails can be found in the Hyperledger Project Lifecycle document (https://goo.gl/4edNRc)","fork":false,"url":"https://api.github.com/repos/hyperledger/fabric","forks_url":"https://api.github.com/repos/hyperledger/fabric/forks","keys_url":"https://api.github.com/repos/hyperledger/fabric/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/fabric/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/fabric/teams","hooks_url":"https://api.github.com/repos/hyperledger/fabric/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/fabric/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/fabric/events","assignees_url":"https://api.github.com/repos/hyperledger/fabric/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/fabric/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/fabric/tags","blobs_url":"https://api.github.com/repos/hyperledger/fabric/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/fabric/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/fabric/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/fabric/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/fabric/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/fabric/languages","stargazers_url":"https://api.github.com/repos/hyperledger/fabric/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/fabric/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/fabric/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/fabric/subscription","commits_url":"https://api.github.com/repos/hyperledger/fabric/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/fabric/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/fabric/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/fabric/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/fabric/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/fabric/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/fabric/merges","archive_url":"https://api.github.com/repos/hyperledger/fabric/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/fabric/downloads","issues_url":"https://api.github.com/repos/hyperledger/fabric/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/fabric/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/fabric/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/fabric/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/fabric/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/fabric/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/fabric/deployments","created_at":"2015-09-23T03:17:14Z","updated_at":"2016-06-04T18:47:05Z","pushed_at":"2016-06-04T20:08:03Z","git_url":"git://github.com/hyperledger/fabric.git","ssh_url":"git@github.com:hyperledger/fabric.git","clone_url":"https://github.com/hyperledger/fabric.git","svn_url":"https://github.com/hyperledger/fabric","homepage":"","size":72722,"stargazers_count":731,"watchers_count":731,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":632,"mirror_url":null,"open_issues_count":332,"forks":632,"open_issues":332,"watchers":731,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperledger/fabric/pulls/1679"},"html":{"href":"https://github.com/hyperledger/fabric/pull/1679"},"issue":{"href":"https://api.github.com/repos/hyperledger/fabric/issues/1679"},"comments":{"href":"https://api.github.com/repos/hyperledger/fabric/issues/1679/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperledger/fabric/pulls/1679/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperledger/fabric/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperledger/fabric/pulls/1679/commits"},"statuses":{"href":"https://api.github.com/repos/hyperledger/fabric/statuses/0372928b9e9c36ed7f8877b1bbbae71a8ca8bab4"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"binhn","id":3342057,"avatar_url":"https://avatars.githubusercontent.com/u/3342057?v=3","gravatar_id":"","url":"https://api.github.com/users/binhn","html_url":"https://github.com/binhn","followers_url":"https://api.github.com/users/binhn/followers","following_url":"https://api.github.com/users/binhn/following{/other_user}","gists_url":"https://api.github.com/users/binhn/gists{/gist_id}","starred_url":"https://api.github.com/users/binhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binhn/subscriptions","organizations_url":"https://api.github.com/users/binhn/orgs","repos_url":"https://api.github.com/users/binhn/repos","events_url":"https://api.github.com/users/binhn/events{/privacy}","received_events_url":"https://api.github.com/users/binhn/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":5,"additions":24,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"binhn"}}