{"action":"opened","number":26714,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/26714","id":141908465,"html_url":"https://github.com/elastic/elasticsearch/pull/26714","diff_url":"https://github.com/elastic/elasticsearch/pull/26714.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/26714.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/26714","number":26714,"state":"open","locked":false,"title":"Fix permission errors when using Read Only HDFS Repository","user":{"login":"jbaiera","id":875779,"avatar_url":"https://avatars1.githubusercontent.com/u/875779?v=4","gravatar_id":"","url":"https://api.github.com/users/jbaiera","html_url":"https://github.com/jbaiera","followers_url":"https://api.github.com/users/jbaiera/followers","following_url":"https://api.github.com/users/jbaiera/following{/other_user}","gists_url":"https://api.github.com/users/jbaiera/gists{/gist_id}","starred_url":"https://api.github.com/users/jbaiera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbaiera/subscriptions","organizations_url":"https://api.github.com/users/jbaiera/orgs","repos_url":"https://api.github.com/users/jbaiera/repos","events_url":"https://api.github.com/users/jbaiera/events{/privacy}","received_events_url":"https://api.github.com/users/jbaiera/received_events","type":"User","site_admin":false},"body":"This PR is specific to the 5.x line, as #22793 in master and 6.x, while unrelated, fixes this problem.\r\n\r\nWhen a user goes to list the available snapshots under a `readonly` HDFDS repository, before any other repository actions are performed, the requests will be met with a security exception. In this scenario, certain methods within the RPC layer have yet to be set accessible for usage in HDFS's dynamic-proxy-based RPC client. Normally, these methods would be set accessible during a privileged call in the validation step, but this process is skipped for `readonly` repositories. Instead, the security check is made to see if the code allows for `supressAccessChecks`. While the HDFS repository has these permissions, the core code base that is on the stack trace does not, and thus, a security exception is thrown for that permission.\r\n\r\nThis PR adds a reproducing test case for the behavior and backports the relevant portions of #22793 - Namely the HDFSPrivilegedInputStream. Additional validations of permissions within privileged blocks are added to the privileged input stream. These validations will be forward-ported to master in a different PR (link).\r\n\r\nRelates #26513 ","created_at":"2017-09-19T17:22:25Z","updated_at":"2017-09-19T17:22:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/26714/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/26714/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/26714/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/564a1f996e7a9245463648ad3b539ead066c37cc","head":{"label":"jbaiera:jbaiera-fix-readonlyhdfs","ref":"jbaiera-fix-readonlyhdfs","sha":"564a1f996e7a9245463648ad3b539ead066c37cc","user":{"login":"jbaiera","id":875779,"avatar_url":"https://avatars1.githubusercontent.com/u/875779?v=4","gravatar_id":"","url":"https://api.github.com/users/jbaiera","html_url":"https://github.com/jbaiera","followers_url":"https://api.github.com/users/jbaiera/followers","following_url":"https://api.github.com/users/jbaiera/following{/other_user}","gists_url":"https://api.github.com/users/jbaiera/gists{/gist_id}","starred_url":"https://api.github.com/users/jbaiera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbaiera/subscriptions","organizations_url":"https://api.github.com/users/jbaiera/orgs","repos_url":"https://api.github.com/users/jbaiera/repos","events_url":"https://api.github.com/users/jbaiera/events{/privacy}","received_events_url":"https://api.github.com/users/jbaiera/received_events","type":"User","site_admin":false},"repo":{"id":60186687,"name":"elasticsearch","full_name":"jbaiera/elasticsearch","owner":{"login":"jbaiera","id":875779,"avatar_url":"https://avatars1.githubusercontent.com/u/875779?v=4","gravatar_id":"","url":"https://api.github.com/users/jbaiera","html_url":"https://github.com/jbaiera","followers_url":"https://api.github.com/users/jbaiera/followers","following_url":"https://api.github.com/users/jbaiera/following{/other_user}","gists_url":"https://api.github.com/users/jbaiera/gists{/gist_id}","starred_url":"https://api.github.com/users/jbaiera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbaiera/subscriptions","organizations_url":"https://api.github.com/users/jbaiera/orgs","repos_url":"https://api.github.com/users/jbaiera/repos","events_url":"https://api.github.com/users/jbaiera/events{/privacy}","received_events_url":"https://api.github.com/users/jbaiera/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jbaiera/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/jbaiera/elasticsearch","forks_url":"https://api.github.com/repos/jbaiera/elasticsearch/forks","keys_url":"https://api.github.com/repos/jbaiera/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jbaiera/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jbaiera/elasticsearch/teams","hooks_url":"https://api.github.com/repos/jbaiera/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/jbaiera/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/jbaiera/elasticsearch/events","assignees_url":"https://api.github.com/repos/jbaiera/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/jbaiera/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/jbaiera/elasticsearch/tags","blobs_url":"https://api.github.com/repos/jbaiera/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jbaiera/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jbaiera/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jbaiera/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jbaiera/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/jbaiera/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/jbaiera/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/jbaiera/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/jbaiera/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/jbaiera/elasticsearch/subscription","commits_url":"https://api.github.com/repos/jbaiera/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jbaiera/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jbaiera/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jbaiera/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jbaiera/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/jbaiera/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jbaiera/elasticsearch/merges","archive_url":"https://api.github.com/repos/jbaiera/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jbaiera/elasticsearch/downloads","issues_url":"https://api.github.com/repos/jbaiera/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/jbaiera/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/jbaiera/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/jbaiera/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jbaiera/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/jbaiera/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/jbaiera/elasticsearch/deployments","created_at":"2016-06-01T15:00:41Z","updated_at":"2017-03-01T16:27:58Z","pushed_at":"2017-09-19T17:08:07Z","git_url":"git://github.com/jbaiera/elasticsearch.git","ssh_url":"git@github.com:jbaiera/elasticsearch.git","clone_url":"https://github.com/jbaiera/elasticsearch.git","svn_url":"https://github.com/jbaiera/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":326973,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"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":"elastic:5.6","ref":"5.6","sha":"c42eade00e733656b10be95d62cae867804d176e","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars0.githubusercontent.com/u/6764390?v=4","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/elastic/elasticsearch/deployments","created_at":"2010-02-08T13:20:56Z","updated_at":"2017-09-19T16:58:23Z","pushed_at":"2017-09-19T17:20:28Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":369823,"stargazers_count":25244,"watchers_count":25244,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8905,"mirror_url":null,"open_issues_count":1325,"forks":8905,"open_issues":1325,"watchers":25244,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/26714"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/26714"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/26714"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/26714/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/26714/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/26714/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/564a1f996e7a9245463648ad3b539ead066c37cc"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":3,"additions":165,"deletions":16,"changed_files":8}}
{"actor":{"display_login":"jbaiera"}}