{"action":"created","comment":{"url":"https://api.github.com/repos/gaborcsardi/secret/pulls/comments/126486174","pull_request_review_id":48974918,"id":126486174,"diff_hunk":"@@ -179,3 +179,22 @@ users_exist <- function(vault, users) {\n on_failure(users_exist) <- function(call, env) {\n   paste0(\"Secret \", deparse(call$users), \" do not exist\")\n }\n+\n+#' @importFrom openssl fingerprint read_pubkey\n+\n+lookup_user <- function(key, vault) {\n+  if (is.character(key)) {\n+    key <- tryCatch(read_key(key),\n+                    error = function(e) NULL)\n+    if (is.null(key)) return(NULL)\n+  }\n+  fp <- fingerprint(key)\n+  for (pubkey in dir(file.path(vault, \"users\"), pattern='\\\\.pem$')) {\n+    pubkeyfile = file.path(vault, 'users', pubkey)","path":"R/users.R","position":15,"original_position":15,"commit_id":"3cb3ff5c1209dee1a570eb845ce3ba9e42129805","original_commit_id":"3cb3ff5c1209dee1a570eb845ce3ba9e42129805","user":{"login":"gaborcsardi","id":660288,"avatar_url":"https://avatars0.githubusercontent.com/u/660288?v=3","gravatar_id":"","url":"https://api.github.com/users/gaborcsardi","html_url":"https://github.com/gaborcsardi","followers_url":"https://api.github.com/users/gaborcsardi/followers","following_url":"https://api.github.com/users/gaborcsardi/following{/other_user}","gists_url":"https://api.github.com/users/gaborcsardi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaborcsardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaborcsardi/subscriptions","organizations_url":"https://api.github.com/users/gaborcsardi/orgs","repos_url":"https://api.github.com/users/gaborcsardi/repos","events_url":"https://api.github.com/users/gaborcsardi/events{/privacy}","received_events_url":"https://api.github.com/users/gaborcsardi/received_events","type":"User","site_admin":false},"body":"Can you use `<-` instead of `=`? Thanks.","created_at":"2017-07-10T17:29:24Z","updated_at":"2017-07-10T17:30:43Z","html_url":"https://github.com/gaborcsardi/secret/pull/19#discussion_r126486174","pull_request_url":"https://api.github.com/repos/gaborcsardi/secret/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/gaborcsardi/secret/pulls/comments/126486174"},"html":{"href":"https://github.com/gaborcsardi/secret/pull/19#discussion_r126486174"},"pull_request":{"href":"https://api.github.com/repos/gaborcsardi/secret/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/gaborcsardi/secret/pulls/19","id":129551641,"html_url":"https://github.com/gaborcsardi/secret/pull/19","diff_url":"https://github.com/gaborcsardi/secret/pull/19.diff","patch_url":"https://github.com/gaborcsardi/secret/pull/19.patch","issue_url":"https://api.github.com/repos/gaborcsardi/secret/issues/19","number":19,"state":"open","locked":false,"title":"Lookup user via fingerprint before attempting decrypt","user":{"login":"jiwalker-usgs","id":1173041,"avatar_url":"https://avatars2.githubusercontent.com/u/1173041?v=3","gravatar_id":"","url":"https://api.github.com/users/jiwalker-usgs","html_url":"https://github.com/jiwalker-usgs","followers_url":"https://api.github.com/users/jiwalker-usgs/followers","following_url":"https://api.github.com/users/jiwalker-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jiwalker-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jiwalker-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiwalker-usgs/subscriptions","organizations_url":"https://api.github.com/users/jiwalker-usgs/orgs","repos_url":"https://api.github.com/users/jiwalker-usgs/repos","events_url":"https://api.github.com/users/jiwalker-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jiwalker-usgs/received_events","type":"User","site_admin":false},"body":"First pass at #18, thoughts?","created_at":"2017-07-09T04:45:46Z","updated_at":"2017-07-10T17:30:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91e495b4b54092b7d31502e7c90ccdaeb5907a4e","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/gaborcsardi/secret/pulls/19/commits","review_comments_url":"https://api.github.com/repos/gaborcsardi/secret/pulls/19/comments","review_comment_url":"https://api.github.com/repos/gaborcsardi/secret/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gaborcsardi/secret/issues/19/comments","statuses_url":"https://api.github.com/repos/gaborcsardi/secret/statuses/3cb3ff5c1209dee1a570eb845ce3ba9e42129805","head":{"label":"jiwalker-usgs:master","ref":"master","sha":"3cb3ff5c1209dee1a570eb845ce3ba9e42129805","user":{"login":"jiwalker-usgs","id":1173041,"avatar_url":"https://avatars2.githubusercontent.com/u/1173041?v=3","gravatar_id":"","url":"https://api.github.com/users/jiwalker-usgs","html_url":"https://github.com/jiwalker-usgs","followers_url":"https://api.github.com/users/jiwalker-usgs/followers","following_url":"https://api.github.com/users/jiwalker-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jiwalker-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jiwalker-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiwalker-usgs/subscriptions","organizations_url":"https://api.github.com/users/jiwalker-usgs/orgs","repos_url":"https://api.github.com/users/jiwalker-usgs/repos","events_url":"https://api.github.com/users/jiwalker-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jiwalker-usgs/received_events","type":"User","site_admin":false},"repo":{"id":96656006,"name":"secret","full_name":"jiwalker-usgs/secret","owner":{"login":"jiwalker-usgs","id":1173041,"avatar_url":"https://avatars2.githubusercontent.com/u/1173041?v=3","gravatar_id":"","url":"https://api.github.com/users/jiwalker-usgs","html_url":"https://github.com/jiwalker-usgs","followers_url":"https://api.github.com/users/jiwalker-usgs/followers","following_url":"https://api.github.com/users/jiwalker-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jiwalker-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jiwalker-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiwalker-usgs/subscriptions","organizations_url":"https://api.github.com/users/jiwalker-usgs/orgs","repos_url":"https://api.github.com/users/jiwalker-usgs/repos","events_url":"https://api.github.com/users/jiwalker-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jiwalker-usgs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jiwalker-usgs/secret","description":":closed_lock_with_key: Secure sharing of sensitive information in R packages","fork":true,"url":"https://api.github.com/repos/jiwalker-usgs/secret","forks_url":"https://api.github.com/repos/jiwalker-usgs/secret/forks","keys_url":"https://api.github.com/repos/jiwalker-usgs/secret/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jiwalker-usgs/secret/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jiwalker-usgs/secret/teams","hooks_url":"https://api.github.com/repos/jiwalker-usgs/secret/hooks","issue_events_url":"https://api.github.com/repos/jiwalker-usgs/secret/issues/events{/number}","events_url":"https://api.github.com/repos/jiwalker-usgs/secret/events","assignees_url":"https://api.github.com/repos/jiwalker-usgs/secret/assignees{/user}","branches_url":"https://api.github.com/repos/jiwalker-usgs/secret/branches{/branch}","tags_url":"https://api.github.com/repos/jiwalker-usgs/secret/tags","blobs_url":"https://api.github.com/repos/jiwalker-usgs/secret/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jiwalker-usgs/secret/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jiwalker-usgs/secret/git/refs{/sha}","trees_url":"https://api.github.com/repos/jiwalker-usgs/secret/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jiwalker-usgs/secret/statuses/{sha}","languages_url":"https://api.github.com/repos/jiwalker-usgs/secret/languages","stargazers_url":"https://api.github.com/repos/jiwalker-usgs/secret/stargazers","contributors_url":"https://api.github.com/repos/jiwalker-usgs/secret/contributors","subscribers_url":"https://api.github.com/repos/jiwalker-usgs/secret/subscribers","subscription_url":"https://api.github.com/repos/jiwalker-usgs/secret/subscription","commits_url":"https://api.github.com/repos/jiwalker-usgs/secret/commits{/sha}","git_commits_url":"https://api.github.com/repos/jiwalker-usgs/secret/git/commits{/sha}","comments_url":"https://api.github.com/repos/jiwalker-usgs/secret/comments{/number}","issue_comment_url":"https://api.github.com/repos/jiwalker-usgs/secret/issues/comments{/number}","contents_url":"https://api.github.com/repos/jiwalker-usgs/secret/contents/{+path}","compare_url":"https://api.github.com/repos/jiwalker-usgs/secret/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jiwalker-usgs/secret/merges","archive_url":"https://api.github.com/repos/jiwalker-usgs/secret/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jiwalker-usgs/secret/downloads","issues_url":"https://api.github.com/repos/jiwalker-usgs/secret/issues{/number}","pulls_url":"https://api.github.com/repos/jiwalker-usgs/secret/pulls{/number}","milestones_url":"https://api.github.com/repos/jiwalker-usgs/secret/milestones{/number}","notifications_url":"https://api.github.com/repos/jiwalker-usgs/secret/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jiwalker-usgs/secret/labels{/name}","releases_url":"https://api.github.com/repos/jiwalker-usgs/secret/releases{/id}","deployments_url":"https://api.github.com/repos/jiwalker-usgs/secret/deployments","created_at":"2017-07-09T02:18:40Z","updated_at":"2017-07-09T02:18:41Z","pushed_at":"2017-07-10T16:50:57Z","git_url":"git://github.com/jiwalker-usgs/secret.git","ssh_url":"git@github.com:jiwalker-usgs/secret.git","clone_url":"https://github.com/jiwalker-usgs/secret.git","svn_url":"https://github.com/jiwalker-usgs/secret","homepage":"","size":348,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_projects":true,"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":"gaborcsardi:master","ref":"master","sha":"975a8a0210bcf83eaef3d0dc5fd9a69efe87a0d0","user":{"login":"gaborcsardi","id":660288,"avatar_url":"https://avatars0.githubusercontent.com/u/660288?v=3","gravatar_id":"","url":"https://api.github.com/users/gaborcsardi","html_url":"https://github.com/gaborcsardi","followers_url":"https://api.github.com/users/gaborcsardi/followers","following_url":"https://api.github.com/users/gaborcsardi/following{/other_user}","gists_url":"https://api.github.com/users/gaborcsardi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaborcsardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaborcsardi/subscriptions","organizations_url":"https://api.github.com/users/gaborcsardi/orgs","repos_url":"https://api.github.com/users/gaborcsardi/repos","events_url":"https://api.github.com/users/gaborcsardi/events{/privacy}","received_events_url":"https://api.github.com/users/gaborcsardi/received_events","type":"User","site_admin":false},"repo":{"id":81970821,"name":"secret","full_name":"gaborcsardi/secret","owner":{"login":"gaborcsardi","id":660288,"avatar_url":"https://avatars0.githubusercontent.com/u/660288?v=3","gravatar_id":"","url":"https://api.github.com/users/gaborcsardi","html_url":"https://github.com/gaborcsardi","followers_url":"https://api.github.com/users/gaborcsardi/followers","following_url":"https://api.github.com/users/gaborcsardi/following{/other_user}","gists_url":"https://api.github.com/users/gaborcsardi/gists{/gist_id}","starred_url":"https://api.github.com/users/gaborcsardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaborcsardi/subscriptions","organizations_url":"https://api.github.com/users/gaborcsardi/orgs","repos_url":"https://api.github.com/users/gaborcsardi/repos","events_url":"https://api.github.com/users/gaborcsardi/events{/privacy}","received_events_url":"https://api.github.com/users/gaborcsardi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gaborcsardi/secret","description":":closed_lock_with_key: Secure sharing of sensitive information in R packages","fork":false,"url":"https://api.github.com/repos/gaborcsardi/secret","forks_url":"https://api.github.com/repos/gaborcsardi/secret/forks","keys_url":"https://api.github.com/repos/gaborcsardi/secret/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaborcsardi/secret/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaborcsardi/secret/teams","hooks_url":"https://api.github.com/repos/gaborcsardi/secret/hooks","issue_events_url":"https://api.github.com/repos/gaborcsardi/secret/issues/events{/number}","events_url":"https://api.github.com/repos/gaborcsardi/secret/events","assignees_url":"https://api.github.com/repos/gaborcsardi/secret/assignees{/user}","branches_url":"https://api.github.com/repos/gaborcsardi/secret/branches{/branch}","tags_url":"https://api.github.com/repos/gaborcsardi/secret/tags","blobs_url":"https://api.github.com/repos/gaborcsardi/secret/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaborcsardi/secret/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaborcsardi/secret/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaborcsardi/secret/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaborcsardi/secret/statuses/{sha}","languages_url":"https://api.github.com/repos/gaborcsardi/secret/languages","stargazers_url":"https://api.github.com/repos/gaborcsardi/secret/stargazers","contributors_url":"https://api.github.com/repos/gaborcsardi/secret/contributors","subscribers_url":"https://api.github.com/repos/gaborcsardi/secret/subscribers","subscription_url":"https://api.github.com/repos/gaborcsardi/secret/subscription","commits_url":"https://api.github.com/repos/gaborcsardi/secret/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaborcsardi/secret/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaborcsardi/secret/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaborcsardi/secret/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaborcsardi/secret/contents/{+path}","compare_url":"https://api.github.com/repos/gaborcsardi/secret/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaborcsardi/secret/merges","archive_url":"https://api.github.com/repos/gaborcsardi/secret/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaborcsardi/secret/downloads","issues_url":"https://api.github.com/repos/gaborcsardi/secret/issues{/number}","pulls_url":"https://api.github.com/repos/gaborcsardi/secret/pulls{/number}","milestones_url":"https://api.github.com/repos/gaborcsardi/secret/milestones{/number}","notifications_url":"https://api.github.com/repos/gaborcsardi/secret/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaborcsardi/secret/labels{/name}","releases_url":"https://api.github.com/repos/gaborcsardi/secret/releases{/id}","deployments_url":"https://api.github.com/repos/gaborcsardi/secret/deployments","created_at":"2017-02-14T17:25:17Z","updated_at":"2017-07-10T16:27:43Z","pushed_at":"2017-07-10T16:50:58Z","git_url":"git://github.com/gaborcsardi/secret.git","ssh_url":"git@github.com:gaborcsardi/secret.git","clone_url":"https://github.com/gaborcsardi/secret.git","svn_url":"https://github.com/gaborcsardi/secret","homepage":"","size":381,"stargazers_count":34,"watchers_count":34,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":4,"forks":2,"open_issues":4,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gaborcsardi/secret/pulls/19"},"html":{"href":"https://github.com/gaborcsardi/secret/pull/19"},"issue":{"href":"https://api.github.com/repos/gaborcsardi/secret/issues/19"},"comments":{"href":"https://api.github.com/repos/gaborcsardi/secret/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/gaborcsardi/secret/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/gaborcsardi/secret/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gaborcsardi/secret/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/gaborcsardi/secret/statuses/3cb3ff5c1209dee1a570eb845ce3ba9e42129805"}}}}
{"actor":{"display_login":"gaborcsardi"}}