{"action":"created","comment":{"url":"https://api.github.com/repos/cilium/cilium/pulls/comments/182830056","pull_request_review_id":113709579,"id":182830056,"diff_hunk":"@@ -1393,3 +1394,101 @@ var _ = Describe(\"RuntimeValidatedPolicyImportTests\", func() {\n \t\tExpect(res.Output().String()).Should(ContainSubstring(allowedVerdict), \"Policy trace did not contain %s\", allowedVerdict)\n \t})\n })\n+\n+var _ = Describe(\"RuntimeValidatedPolicyDropAllTests\", func() {\n+\tvar once sync.Once\n+\tvar logger *logrus.Entry\n+\tvar vm *helpers.SSHMeta\n+\tvar dropAll bool\n+\n+\tinitialize := func() {\n+\t\tlogger = log.WithFields(logrus.Fields{\"test\": \"RuntimeValidatedPolicyDropAllTests\"})\n+\t\tlogger.Info(\"Starting\")\n+\t\tvm = helpers.CreateNewRuntimeHelper(helpers.Runtime, logger)\n+\t\tareEndpointsReady := vm.WaitEndpointsReady()\n+\t\tExpect(areEndpointsReady).Should(BeTrue())\n+\t}\n+\n+\tBeforeEach(func() {\n+\t\tonce.Do(initialize)\n+\t\tvm.PolicyDelAll()\n+\t\tres := vm.SetPolicyEnforcement(helpers.PolicyEnforcementDefault)\n+\t\tres.ExpectSuccess(\"Setting policyEnforcement to default\")\n+\t})\n+\n+\tAfterEach(func() {\n+\t\tvm.ValidateNoErrorsOnLogs(CurrentGinkgoTestDescription().Duration)\n+\t\tif CurrentGinkgoTestDescription().Failed {\n+\t\t\tvm.ReportFailed()\n+\t\t}\n+\t})\n+\n+\tIt(\"DROP_ALL Ingress Policy test\", func() {\n+\t\tBy(\"Starting cilium monitor in background to filter DROP requests\")\n+\t\tctx, cancel := context.WithCancel(context.Background())\n+\t\tres := vm.ExecContext(ctx, \"cilium monitor --type drop\")\n+\t\tdefer cancel()\n+\n+\t\tBy(\"Create an endpoint with no labels to test DROP_ALL\")\n+\t\tcmdStr := \"docker run -dt --name ingressContainer --net=cilium-net tgraf/netperf\"","path":"test/runtime/Policies.go","position":48,"original_position":48,"commit_id":"fe3934343a9f5b18ba0f82ef5b7035670238af4a","original_commit_id":"fe3934343a9f5b18ba0f82ef5b7035670238af4a","user":{"login":"manalibhutiyani","id":31253464,"avatar_url":"https://avatars3.githubusercontent.com/u/31253464?v=4","gravatar_id":"","url":"https://api.github.com/users/manalibhutiyani","html_url":"https://github.com/manalibhutiyani","followers_url":"https://api.github.com/users/manalibhutiyani/followers","following_url":"https://api.github.com/users/manalibhutiyani/following{/other_user}","gists_url":"https://api.github.com/users/manalibhutiyani/gists{/gist_id}","starred_url":"https://api.github.com/users/manalibhutiyani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manalibhutiyani/subscriptions","organizations_url":"https://api.github.com/users/manalibhutiyani/orgs","repos_url":"https://api.github.com/users/manalibhutiyani/repos","events_url":"https://api.github.com/users/manalibhutiyani/events{/privacy}","received_events_url":"https://api.github.com/users/manalibhutiyani/received_events","type":"User","site_admin":false},"body":"Yes, I think I can do it with `vm.ContainerCreate()` ","created_at":"2018-04-19T17:45:54Z","updated_at":"2018-04-19T17:45:54Z","html_url":"https://github.com/cilium/cilium/pull/3804#discussion_r182830056","pull_request_url":"https://api.github.com/repos/cilium/cilium/pulls/3804","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/cilium/cilium/pulls/comments/182830056"},"html":{"href":"https://github.com/cilium/cilium/pull/3804#discussion_r182830056"},"pull_request":{"href":"https://api.github.com/repos/cilium/cilium/pulls/3804"}},"in_reply_to_id":182666797},"pull_request":{"url":"https://api.github.com/repos/cilium/cilium/pulls/3804","id":182639517,"html_url":"https://github.com/cilium/cilium/pull/3804","diff_url":"https://github.com/cilium/cilium/pull/3804.diff","patch_url":"https://github.com/cilium/cilium/pull/3804.patch","issue_url":"https://api.github.com/repos/cilium/cilium/issues/3804","number":3804,"state":"open","locked":false,"title":"CI: add Runtime DROP_ALL test","user":{"login":"manalibhutiyani","id":31253464,"avatar_url":"https://avatars3.githubusercontent.com/u/31253464?v=4","gravatar_id":"","url":"https://api.github.com/users/manalibhutiyani","html_url":"https://github.com/manalibhutiyani","followers_url":"https://api.github.com/users/manalibhutiyani/followers","following_url":"https://api.github.com/users/manalibhutiyani/following{/other_user}","gists_url":"https://api.github.com/users/manalibhutiyani/gists{/gist_id}","starred_url":"https://api.github.com/users/manalibhutiyani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manalibhutiyani/subscriptions","organizations_url":"https://api.github.com/users/manalibhutiyani/orgs","repos_url":"https://api.github.com/users/manalibhutiyani/repos","events_url":"https://api.github.com/users/manalibhutiyani/events{/privacy}","received_events_url":"https://api.github.com/users/manalibhutiyani/received_events","type":"User","site_admin":false},"body":"This test adds the runtime `DROP_ALL`  tests and does 3 checks to make sure DROP_ALL is applied properly\r\n\r\n1. It starts the conatiner with no labels and checks if state is waiting-for-identity\r\n2. Checks if the corresponding lxc_config.h contains the DROP_ALL macro\r\n3. Checks if cilium monitor shows the correct L3 deny message for the endpoint.\r\n\r\nFor ingress, we try to ping from host to the container without labels.\r\nFor egress, we create a container and make it execute ping to 8.8.8.8\r\n\r\nFixes: #3625\r\nSigned-Off-By: Manali Bhutiyani <manali@covalent.io>","created_at":"2018-04-19T00:49:42Z","updated_at":"2018-04-19T17:45:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7447bff3612bc6bcdbee33c73f1672cd1bb339c1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":709779088,"url":"https://api.github.com/repos/cilium/cilium/labels/area/CI","name":"area/CI","color":"bfd4f2","default":false},{"id":677243782,"url":"https://api.github.com/repos/cilium/cilium/labels/kind/bug/CI","name":"kind/bug/CI","color":"fc2929","default":false},{"id":403149902,"url":"https://api.github.com/repos/cilium/cilium/labels/pending-review","name":"pending-review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cilium/cilium/pulls/3804/commits","review_comments_url":"https://api.github.com/repos/cilium/cilium/pulls/3804/comments","review_comment_url":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cilium/cilium/issues/3804/comments","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/fe3934343a9f5b18ba0f82ef5b7035670238af4a","head":{"label":"cilium:drop-all-test","ref":"drop-all-test","sha":"fe3934343a9f5b18ba0f82ef5b7035670238af4a","user":{"login":"cilium","id":21054566,"avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"name":"cilium","full_name":"cilium/cilium","owner":{"login":"cilium","id":21054566,"avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cilium/cilium","description":"HTTP, gRPC, and Kafka Aware Security and Networking for Containers with BPF and XDP","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2018-04-19T16:23:34Z","pushed_at":"2018-04-19T17:12:19Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":45263,"stargazers_count":1790,"watchers_count":1790,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":171,"mirror_url":null,"archived":false,"open_issues_count":495,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":171,"open_issues":495,"watchers":1790,"default_branch":"master"}},"base":{"label":"cilium:master","ref":"master","sha":"d9143000325e61a9ed63817b453f7cffbf76de89","user":{"login":"cilium","id":21054566,"avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"repo":{"id":48109239,"name":"cilium","full_name":"cilium/cilium","owner":{"login":"cilium","id":21054566,"avatar_url":"https://avatars0.githubusercontent.com/u/21054566?v=4","gravatar_id":"","url":"https://api.github.com/users/cilium","html_url":"https://github.com/cilium","followers_url":"https://api.github.com/users/cilium/followers","following_url":"https://api.github.com/users/cilium/following{/other_user}","gists_url":"https://api.github.com/users/cilium/gists{/gist_id}","starred_url":"https://api.github.com/users/cilium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cilium/subscriptions","organizations_url":"https://api.github.com/users/cilium/orgs","repos_url":"https://api.github.com/users/cilium/repos","events_url":"https://api.github.com/users/cilium/events{/privacy}","received_events_url":"https://api.github.com/users/cilium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cilium/cilium","description":"HTTP, gRPC, and Kafka Aware Security and Networking for Containers with BPF and XDP","fork":false,"url":"https://api.github.com/repos/cilium/cilium","forks_url":"https://api.github.com/repos/cilium/cilium/forks","keys_url":"https://api.github.com/repos/cilium/cilium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cilium/cilium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cilium/cilium/teams","hooks_url":"https://api.github.com/repos/cilium/cilium/hooks","issue_events_url":"https://api.github.com/repos/cilium/cilium/issues/events{/number}","events_url":"https://api.github.com/repos/cilium/cilium/events","assignees_url":"https://api.github.com/repos/cilium/cilium/assignees{/user}","branches_url":"https://api.github.com/repos/cilium/cilium/branches{/branch}","tags_url":"https://api.github.com/repos/cilium/cilium/tags","blobs_url":"https://api.github.com/repos/cilium/cilium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cilium/cilium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cilium/cilium/git/refs{/sha}","trees_url":"https://api.github.com/repos/cilium/cilium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cilium/cilium/statuses/{sha}","languages_url":"https://api.github.com/repos/cilium/cilium/languages","stargazers_url":"https://api.github.com/repos/cilium/cilium/stargazers","contributors_url":"https://api.github.com/repos/cilium/cilium/contributors","subscribers_url":"https://api.github.com/repos/cilium/cilium/subscribers","subscription_url":"https://api.github.com/repos/cilium/cilium/subscription","commits_url":"https://api.github.com/repos/cilium/cilium/commits{/sha}","git_commits_url":"https://api.github.com/repos/cilium/cilium/git/commits{/sha}","comments_url":"https://api.github.com/repos/cilium/cilium/comments{/number}","issue_comment_url":"https://api.github.com/repos/cilium/cilium/issues/comments{/number}","contents_url":"https://api.github.com/repos/cilium/cilium/contents/{+path}","compare_url":"https://api.github.com/repos/cilium/cilium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cilium/cilium/merges","archive_url":"https://api.github.com/repos/cilium/cilium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cilium/cilium/downloads","issues_url":"https://api.github.com/repos/cilium/cilium/issues{/number}","pulls_url":"https://api.github.com/repos/cilium/cilium/pulls{/number}","milestones_url":"https://api.github.com/repos/cilium/cilium/milestones{/number}","notifications_url":"https://api.github.com/repos/cilium/cilium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cilium/cilium/labels{/name}","releases_url":"https://api.github.com/repos/cilium/cilium/releases{/id}","deployments_url":"https://api.github.com/repos/cilium/cilium/deployments","created_at":"2015-12-16T12:33:31Z","updated_at":"2018-04-19T16:23:34Z","pushed_at":"2018-04-19T17:12:19Z","git_url":"git://github.com/cilium/cilium.git","ssh_url":"git@github.com:cilium/cilium.git","clone_url":"https://github.com/cilium/cilium.git","svn_url":"https://github.com/cilium/cilium","homepage":"","size":45263,"stargazers_count":1790,"watchers_count":1790,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":171,"mirror_url":null,"archived":false,"open_issues_count":495,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":171,"open_issues":495,"watchers":1790,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cilium/cilium/pulls/3804"},"html":{"href":"https://github.com/cilium/cilium/pull/3804"},"issue":{"href":"https://api.github.com/repos/cilium/cilium/issues/3804"},"comments":{"href":"https://api.github.com/repos/cilium/cilium/issues/3804/comments"},"review_comments":{"href":"https://api.github.com/repos/cilium/cilium/pulls/3804/comments"},"review_comment":{"href":"https://api.github.com/repos/cilium/cilium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cilium/cilium/pulls/3804/commits"},"statuses":{"href":"https://api.github.com/repos/cilium/cilium/statuses/fe3934343a9f5b18ba0f82ef5b7035670238af4a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"manalibhutiyani"}}