diff --git a/Gopkg.lock b/Gopkg.lock index 829c950cf5b2..8a566157c092 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -370,7 +370,7 @@ "pkg/util", ] pruneopts = "T" - revision = "9abdeff70b1fcebc846b2518ccb73478fa10164e" + revision = "a29483497d9342d4e6419dd99723cb40fae96670" version = "v0.5.0" [[projects]] diff --git a/istio.deps b/istio.deps index d2ce13481c7f..df5348e1dce6 100644 --- a/istio.deps +++ b/istio.deps @@ -4,6 +4,6 @@ "name": "PROXY_REPO_SHA", "repoName": "proxy", "file": "", - "lastStableSHA": "a35b8f44b78439c3beeb2d3e805ab6b991d14f24" + "lastStableSHA": "f49833732cab7e6f249760d1ec9d3ec19d19fe2c" } ] diff --git a/mixer/test/client/check_cache_hit/check_cache_hit_test.go b/mixer/test/client/check_cache_hit/check_cache_hit_test.go index 6969d7e6df2d..d3a0c1d0f9e1 100644 --- a/mixer/test/client/check_cache_hit/check_cache_hit_test.go +++ b/mixer/test/client/check_cache_hit/check_cache_hit_test.go @@ -25,6 +25,7 @@ import ( // Check attributes from a good GET request const checkAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -38,6 +39,8 @@ const checkAttributesOkGet = ` "request.url_path": "/echo", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -59,6 +62,7 @@ const checkAttributesOkGet = ` // In reportAttributesOkGet[0], check.cache_hit and quota.cache_hit are false. // In reportAttributesOkGet[1], check.cache_hit and quota.cache_hit are true. var reportAttributesOkGet = [...]string{`{ + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -75,6 +79,8 @@ var reportAttributesOkGet = [...]string{`{ "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -106,6 +112,7 @@ var reportAttributesOkGet = [...]string{`{ "request.total_size": 306 }`, `{ + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -122,6 +129,8 @@ var reportAttributesOkGet = [...]string{`{ "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/check_report/check_report_test.go b/mixer/test/client/check_report/check_report_test.go index a73214b3c6b4..4019b6d95fae 100644 --- a/mixer/test/client/check_report/check_report_test.go +++ b/mixer/test/client/check_report/check_report_test.go @@ -24,6 +24,7 @@ import ( // Check attributes from a good GET request const checkAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -37,6 +38,8 @@ const checkAttributesOkGet = ` "request.url_path": "/echo", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -57,6 +60,7 @@ const checkAttributesOkGet = ` // Report attributes from a good GET request const reportAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -73,6 +77,8 @@ const reportAttributesOkGet = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -108,6 +114,7 @@ const reportAttributesOkGet = ` // Check attributes from a good POST request const checkAttributesOkPost = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -121,6 +128,8 @@ const checkAttributesOkPost = ` "request.url_path": "/echo", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -141,6 +150,7 @@ const checkAttributesOkPost = ` // Report attributes from a good POST request const reportAttributesOkPost = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -157,6 +167,8 @@ const reportAttributesOkPost = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/check_report_large_post_request/check_report_large_post_request_test.go b/mixer/test/client/check_report_large_post_request/check_report_large_post_request_test.go index e829fc10e8f8..8929905a32fe 100644 --- a/mixer/test/client/check_report_large_post_request/check_report_large_post_request_test.go +++ b/mixer/test/client/check_report_large_post_request/check_report_large_post_request_test.go @@ -24,6 +24,7 @@ import ( // Check attributes from a good POST request const checkAttributesOkPost = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -40,6 +41,8 @@ const checkAttributesOkPost = ` "target.namespace": "XYZ222", "connection.mtls": false, "origin.ip": "[127 0 0 1]", + "destination.namespace" : "*", + "destination.uid" : "*", "request.headers": { ":method": "POST", ":path": "/echo", @@ -54,6 +57,7 @@ const checkAttributesOkPost = ` // Report attributes from a good POST request const reportAttributesOkPost = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -67,6 +71,8 @@ const reportAttributesOkPost = ` "request.url_path": "/echo", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/disable_tcp_check_calls/disable_tcp_check_calls_test.go b/mixer/test/client/disable_tcp_check_calls/disable_tcp_check_calls_test.go index 7872ef1a4d21..793c95c5c073 100644 --- a/mixer/test/client/disable_tcp_check_calls/disable_tcp_check_calls_test.go +++ b/mixer/test/client/disable_tcp_check_calls/disable_tcp_check_calls_test.go @@ -24,6 +24,9 @@ import ( // Report attributes from a good POST request const reportAttributesOkPostOpen = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", @@ -44,6 +47,9 @@ const reportAttributesOkPostOpen = ` ` const reportAttributesOkPostClose = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", diff --git a/mixer/test/client/dynamic_attribute/dynamic_attribute_test.go b/mixer/test/client/dynamic_attribute/dynamic_attribute_test.go index 23d1cfe899b9..a55e1a04cee1 100644 --- a/mixer/test/client/dynamic_attribute/dynamic_attribute_test.go +++ b/mixer/test/client/dynamic_attribute/dynamic_attribute_test.go @@ -121,8 +121,10 @@ static_resources: const reportAttributesOkGet = ` { "destination.uid": "pod1.ns2", + "destination.namespace" : "*", "context.protocol": "http", "context.proxy_error_code": "-", + "context.reporter.uid" : "*", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", "request.host": "*", diff --git a/mixer/test/client/dynamic_listener/dynamic_listener_test.go b/mixer/test/client/dynamic_listener/dynamic_listener_test.go index 18d82030544f..e27277b9c527 100644 --- a/mixer/test/client/dynamic_listener/dynamic_listener_test.go +++ b/mixer/test/client/dynamic_listener/dynamic_listener_test.go @@ -87,6 +87,9 @@ static_resources: const checkAttributesOkGet = ` { "connection.mtls": false, + "context.reporter.uid" : "*", + "destination.namespace" : "*", + "destination.uid" : "*", "origin.ip": "[127 0 0 1]", "context.protocol": "http", "key": "count%s", diff --git a/mixer/test/client/failed_request/failed_request_test.go b/mixer/test/client/failed_request/failed_request_test.go index ae51ef19583b..b8a459d18926 100644 --- a/mixer/test/client/failed_request/failed_request_test.go +++ b/mixer/test/client/failed_request/failed_request_test.go @@ -30,6 +30,7 @@ const ( // Check attributes from a fail GET request from mixer const checkAttributesMixerFail = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -43,6 +44,8 @@ const checkAttributesMixerFail = ` "request.url_path": "/echo", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -63,6 +66,7 @@ const checkAttributesMixerFail = ` // Report attributes from a fail GET request from mixer const reportAttributesMixerFail = ` { + "context.reporter.uid" : "*", "check.error_code": 16, "check.error_message": "UNAUTHENTICATED:Unauthenticated by mixer.", "context.protocol": "http", @@ -79,6 +83,8 @@ const reportAttributesMixerFail = ` "request.url_path": "/echo", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -115,6 +121,7 @@ const reportAttributesMixerFail = ` // Report attributes from a fail GET request from backend const reportAttributesBackendFail = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -131,6 +138,8 @@ const reportAttributesBackendFail = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/fault_inject/fault_inject_test.go b/mixer/test/client/fault_inject/fault_inject_test.go index ce0188e57289..e27e6f389a3c 100644 --- a/mixer/test/client/fault_inject/fault_inject_test.go +++ b/mixer/test/client/fault_inject/fault_inject_test.go @@ -24,6 +24,7 @@ import ( // Report attributes from a fault inject GET request const reportAttributes = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "FI", "mesh1.ip": "[1 1 1 1]", @@ -37,6 +38,8 @@ const reportAttributes = ` "request.scheme": "http", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/istio_authn_origin_jwt_bound_origin/authn_report_test.go b/mixer/test/client/istio_authn_origin_jwt_bound_origin/authn_report_test.go index 030220769478..970481a07afb 100644 --- a/mixer/test/client/istio_authn_origin_jwt_bound_origin/authn_report_test.go +++ b/mixer/test/client/istio_authn_origin_jwt_bound_origin/authn_report_test.go @@ -48,6 +48,7 @@ const secIstioAuthUserinfoHeaderValue = `{"aud":"aud1","exp":20000000000,` + // Check attributes from a good GET request var checkAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -60,6 +61,8 @@ var checkAttributesOkGet = ` "request.scheme": "http", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -90,6 +93,7 @@ var checkAttributesOkGet = ` // Report attributes from a good GET request with Istio authn policy binding to origin var reportAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -105,6 +109,8 @@ var reportAttributesOkGet = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/istio_authn_origin_jwt_bound_peer/authn_report_test.go b/mixer/test/client/istio_authn_origin_jwt_bound_peer/authn_report_test.go index bd8b0269c62c..12a0b78c3f8c 100644 --- a/mixer/test/client/istio_authn_origin_jwt_bound_peer/authn_report_test.go +++ b/mixer/test/client/istio_authn_origin_jwt_bound_peer/authn_report_test.go @@ -47,6 +47,7 @@ const secIstioAuthUserinfoHeaderValue = `{"aud":"aud1","exp":20000000000,` + // Check attributes from a good GET request var checkAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -59,6 +60,8 @@ var checkAttributesOkGet = ` "request.scheme": "http", "source.uid": "POD11", "source.namespace": "XYZ11", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -88,6 +91,7 @@ var checkAttributesOkGet = ` // Report attributes from a good GET request var reportAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -103,6 +107,8 @@ var reportAttributesOkGet = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/istio_authn_peer_jwt_bound_peer/authn_report_test.go b/mixer/test/client/istio_authn_peer_jwt_bound_peer/authn_report_test.go index c33ec508e7a2..83ea1a722b69 100644 --- a/mixer/test/client/istio_authn_peer_jwt_bound_peer/authn_report_test.go +++ b/mixer/test/client/istio_authn_peer_jwt_bound_peer/authn_report_test.go @@ -48,6 +48,7 @@ const secIstioAuthUserinfoHeaderValue = `{"aud":"aud1","exp":20000000000,` + // Check attributes from a good GET request var checkAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "mesh1.ip": "[1 1 1 1]", "mesh2.ip": "[0 0 0 0 0 0 0 0 0 0 255 255 204 152 189 116]", @@ -62,6 +63,8 @@ var checkAttributesOkGet = ` "source.namespace": "XYZ11", "source.principal": "issuer@foo.com/sub@foo.com", "source.user": "issuer@foo.com/sub@foo.com", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -92,6 +95,7 @@ var checkAttributesOkGet = ` // Report attributes from a good GET request with Istio authn policy var reportAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -109,6 +113,8 @@ var reportAttributesOkGet = ` "source.user": "issuer@foo.com/sub@foo.com", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/report_batch/report_batch_test.go b/mixer/test/client/report_batch/report_batch_test.go index 559dcab0d26b..17260bc65457 100644 --- a/mixer/test/client/report_batch/report_batch_test.go +++ b/mixer/test/client/report_batch/report_batch_test.go @@ -24,6 +24,7 @@ import ( // Report attributes from a good GET request const reportAttributesOkGet = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -40,6 +41,8 @@ const reportAttributesOkGet = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -76,6 +79,7 @@ const reportAttributesOkGet = ` // Report attributes from a good POST request const reportAttributesOkPost1 = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -92,6 +96,8 @@ const reportAttributesOkPost1 = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", @@ -129,6 +135,7 @@ const reportAttributesOkPost1 = ` // Report attributes from a good POST request const reportAttributesOkPost2 = ` { + "context.reporter.uid" : "*", "context.protocol": "http", "context.proxy_error_code": "-", "mesh1.ip": "[1 1 1 1]", @@ -145,6 +152,8 @@ const reportAttributesOkPost2 = ` "source.namespace": "XYZ11", "destination.ip": "[127 0 0 1]", "destination.port": "*", + "destination.namespace" : "*", + "destination.uid" : "*", "target.name": "target-name", "target.user": "target-user", "target.uid": "POD222", diff --git a/mixer/test/client/tcp_filter/tcp_filter_test.go b/mixer/test/client/tcp_filter/tcp_filter_test.go index 14f8349f599e..8f2abf85a458 100644 --- a/mixer/test/client/tcp_filter/tcp_filter_test.go +++ b/mixer/test/client/tcp_filter/tcp_filter_test.go @@ -26,6 +26,9 @@ import ( // Check attributes from a good POST request const checkAttributesOkPost = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", @@ -41,6 +44,9 @@ const checkAttributesOkPost = ` // Report attributes from a good POST request const reportAttributesOkPostOpen = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", @@ -63,6 +69,9 @@ const reportAttributesOkPostOpen = ` ` const reportAttributesOkPostClose = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", @@ -88,6 +97,9 @@ const reportAttributesOkPostClose = ` // Report attributes from a failed POST request const reportAttributesFailPost = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", diff --git a/mixer/test/client/tcp_filter_periodical_report/tcp_filter_periodical_report_test.go b/mixer/test/client/tcp_filter_periodical_report/tcp_filter_periodical_report_test.go index ed40b14c6094..6342c87f696b 100644 --- a/mixer/test/client/tcp_filter_periodical_report/tcp_filter_periodical_report_test.go +++ b/mixer/test/client/tcp_filter_periodical_report/tcp_filter_periodical_report_test.go @@ -24,6 +24,9 @@ import ( // Report attributes from a good POST request const openReportAttributesOkPost = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", @@ -46,6 +49,9 @@ const openReportAttributesOkPost = ` ` const deltaReportAttributesOkPost = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]", @@ -68,6 +74,9 @@ const deltaReportAttributesOkPost = ` ` const finalReportAttributesOkPost = ` { + "context.reporter.uid": "*", + "destination.uid": "*", + "destination.namespace": "*", "context.protocol": "tcp", "context.time": "*", "mesh1.ip": "[1 1 1 1]",