{"action":"opened","number":30787,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/30787","id":189719940,"html_url":"https://github.com/elastic/elasticsearch/pull/30787","diff_url":"https://github.com/elastic/elasticsearch/pull/30787.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/30787.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30787","number":30787,"state":"open","locked":false,"title":"Security: fix dynamic mapping updates with aliases","user":{"login":"jaymode","id":4339958,"avatar_url":"https://avatars1.githubusercontent.com/u/4339958?v=4","gravatar_id":"","url":"https://api.github.com/users/jaymode","html_url":"https://github.com/jaymode","followers_url":"https://api.github.com/users/jaymode/followers","following_url":"https://api.github.com/users/jaymode/following{/other_user}","gists_url":"https://api.github.com/users/jaymode/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymode/subscriptions","organizations_url":"https://api.github.com/users/jaymode/orgs","repos_url":"https://api.github.com/users/jaymode/repos","events_url":"https://api.github.com/users/jaymode/events{/privacy}","received_events_url":"https://api.github.com/users/jaymode/received_events","type":"User","site_admin":false},"body":"This commit fixes an issue with dynamic mapping updates when an index\r\noperation is performed against an alias and when the user only has\r\npermissions to the alias. Dynamic mapping updates resolve the concrete\r\nindex early to prevent issues so the information about the alias that\r\nthe triggering operation was being executed against is lost. When\r\nsecurity is enabled and a user only has privileges to the alias, this\r\ndynamic mapping update would be rejected as it is executing against the\r\nconcrete index and not the alias. In order to handle this situation,\r\nthe security code needs to look at the concrete index and the\r\nauthorized indices of the user; if the concrete index is not authorized\r\nthe code will attempt to find an alias that the user has permissions to\r\nupdate the mappings of.\r\n\r\nCloses #30597","created_at":"2018-05-22T16:20:15Z","updated_at":"2018-05-22T16:20:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":912838209,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Security/Authorization","name":":Security/Authorization","color":"0e8a16","default":false},{"id":23173,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/%3Ebug","name":">bug","color":"b60205","default":false},{"id":914911779,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.3.1","name":"v6.3.1","color":"DDDDDD","default":false},{"id":912911731,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v6.4.0","name":"v6.4.0","color":"DDDDDD","default":false},{"id":484855464,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v7.0.0","name":"v7.0.0","color":"dddddd","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/30787/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/30787/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/30787/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/8d655deed0563899f4db83fd9044ed38037ac77c","head":{"label":"jaymode:put_mapping_alias","ref":"put_mapping_alias","sha":"8d655deed0563899f4db83fd9044ed38037ac77c","user":{"login":"jaymode","id":4339958,"avatar_url":"https://avatars1.githubusercontent.com/u/4339958?v=4","gravatar_id":"","url":"https://api.github.com/users/jaymode","html_url":"https://github.com/jaymode","followers_url":"https://api.github.com/users/jaymode/followers","following_url":"https://api.github.com/users/jaymode/following{/other_user}","gists_url":"https://api.github.com/users/jaymode/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymode/subscriptions","organizations_url":"https://api.github.com/users/jaymode/orgs","repos_url":"https://api.github.com/users/jaymode/repos","events_url":"https://api.github.com/users/jaymode/events{/privacy}","received_events_url":"https://api.github.com/users/jaymode/received_events","type":"User","site_admin":false},"repo":{"id":16960752,"name":"elasticsearch","full_name":"jaymode/elasticsearch","owner":{"login":"jaymode","id":4339958,"avatar_url":"https://avatars1.githubusercontent.com/u/4339958?v=4","gravatar_id":"","url":"https://api.github.com/users/jaymode","html_url":"https://github.com/jaymode","followers_url":"https://api.github.com/users/jaymode/followers","following_url":"https://api.github.com/users/jaymode/following{/other_user}","gists_url":"https://api.github.com/users/jaymode/gists{/gist_id}","starred_url":"https://api.github.com/users/jaymode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaymode/subscriptions","organizations_url":"https://api.github.com/users/jaymode/orgs","repos_url":"https://api.github.com/users/jaymode/repos","events_url":"https://api.github.com/users/jaymode/events{/privacy}","received_events_url":"https://api.github.com/users/jaymode/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jaymode/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/jaymode/elasticsearch","forks_url":"https://api.github.com/repos/jaymode/elasticsearch/forks","keys_url":"https://api.github.com/repos/jaymode/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jaymode/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jaymode/elasticsearch/teams","hooks_url":"https://api.github.com/repos/jaymode/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/jaymode/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/jaymode/elasticsearch/events","assignees_url":"https://api.github.com/repos/jaymode/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/jaymode/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/jaymode/elasticsearch/tags","blobs_url":"https://api.github.com/repos/jaymode/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jaymode/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jaymode/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/jaymode/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jaymode/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/jaymode/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/jaymode/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/jaymode/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/jaymode/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/jaymode/elasticsearch/subscription","commits_url":"https://api.github.com/repos/jaymode/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/jaymode/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/jaymode/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/jaymode/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/jaymode/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/jaymode/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jaymode/elasticsearch/merges","archive_url":"https://api.github.com/repos/jaymode/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jaymode/elasticsearch/downloads","issues_url":"https://api.github.com/repos/jaymode/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/jaymode/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/jaymode/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/jaymode/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jaymode/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/jaymode/elasticsearch/releases{/id}","deployments_url":"https://api.github.com/repos/jaymode/elasticsearch/deployments","created_at":"2014-02-18T19:25:41Z","updated_at":"2018-04-26T14:42:45Z","pushed_at":"2018-05-22T16:18:50Z","git_url":"git://github.com/jaymode/elasticsearch.git","ssh_url":"git@github.com:jaymode/elasticsearch.git","clone_url":"https://github.com/jaymode/elasticsearch.git","svn_url":"https://github.com/jaymode/elasticsearch","homepage":"http://elasticsearch.org","size":399112,"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,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"9ffeb171e0c460449e132840c29ae598a36fafb5","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":"2018-05-22T16:12:13Z","pushed_at":"2018-05-22T16:19:33Z","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":481488,"stargazers_count":31147,"watchers_count":31147,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10754,"mirror_url":null,"archived":false,"open_issues_count":1450,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":10754,"open_issues":1450,"watchers":31147,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/30787"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/30787"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/30787"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/30787/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/30787/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/30787/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/8d655deed0563899f4db83fd9044ed38037ac77c"}},"author_association":"MEMBER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":165,"deletions":10,"changed_files":3}}
{"actor":{"display_login":"jaymode"}}