diff --git a/go.mod b/go.mod index 50fd9af0f..57c1bf3d0 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module knative.dev/operator go 1.21 -toolchain go1.21.4 - require ( github.com/go-logr/zapr v1.2.2 github.com/google/go-cmp v0.6.0 @@ -16,8 +14,8 @@ require ( golang.org/x/mod v0.14.0 golang.org/x/oauth2 v0.14.0 google.golang.org/api v0.151.0 - istio.io/api v0.0.0-20220420164308-b6a03a9e477e - istio.io/client-go v1.13.3 + istio.io/api v0.0.0-20231206023236-e7cadb36da57 + istio.io/client-go v1.18.7 k8s.io/api v0.27.6 k8s.io/apimachinery v0.27.6 k8s.io/client-go v0.27.6 diff --git a/go.sum b/go.sum index f018c637f..30ac9b8cc 100644 --- a/go.sum +++ b/go.sum @@ -18,10 +18,6 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.66.0/go.mod h1:dgqGAjKCDxyhGTtC9dAREQGUJpkceNm1yt590Qno0Ko= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= -cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= @@ -187,11 +183,7 @@ github.com/cloudevents/sdk-go/v2 v2.13.0/go.mod h1:xDmKfzNjM8gBvjaF8ijFjM1VYOVUE github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= @@ -240,7 +232,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v0.0.0-20190203023257-5858425f7550/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -261,7 +252,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -307,7 +297,6 @@ github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwds github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= @@ -385,7 +374,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -402,7 +390,6 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= @@ -459,9 +446,6 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -489,7 +473,6 @@ github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97Dwqy github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= @@ -779,7 +762,6 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -839,7 +821,6 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= @@ -869,7 +850,6 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -879,8 +859,6 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -930,14 +908,10 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -953,12 +927,7 @@ golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201203001011-0b49973bad19/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= @@ -972,7 +941,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= @@ -1029,20 +997,13 @@ golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1052,7 +1013,6 @@ golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= @@ -1143,11 +1103,7 @@ golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201202200335-bef1c476418a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201203202102-a1a1cbeaa516/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1185,9 +1141,6 @@ google.golang.org/api v0.31.0/go.mod h1:CL+9IBCa2WWU6gRuBWaKqGWLFFwbEUXkfeMkHLQW google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= -google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.151.0 h1:FhfXLO/NFdJIzQtCqjpysWwqKk8AzGWBUhMIx67cVDU= google.golang.org/api v0.151.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= @@ -1240,13 +1193,6 @@ google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201203001206-6486ece9c497/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= @@ -1274,11 +1220,8 @@ google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1340,18 +1283,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -istio.io/api v0.0.0-20220413180505-1574de06b7bd/go.mod h1:8ZZgyVgYrHhsFQarEgTfPnMGpdgTDZbxSjYhdwTUuAQ= -istio.io/api v0.0.0-20220420164308-b6a03a9e477e h1:PiNQiNIgEpioHeslnETLn8yjVccRrYwg+Z56bVk7psE= -istio.io/api v0.0.0-20220420164308-b6a03a9e477e/go.mod h1:qGm6l1okCpLqVKyXSfYjB+UXXgpE/LCggALuK25cSFY= -istio.io/client-go v1.13.3 h1:xbEgTX4NRlvVRI/JsCmMI0ATvCc9P85HkQ20SphEGZ4= -istio.io/client-go v1.13.3/go.mod h1:DeT/l4yO+bwyv0ZgavSTj7BfkA2cTckHD0jtluwtXhE= -istio.io/gogo-genproto v0.0.0-20211208193508-5ab4acc9eb1e/go.mod h1:vJDAniIqryf/z///fgZqVPKJ7N2lBk7Gg8DCTB7oCfU= +istio.io/api v0.0.0-20231206023236-e7cadb36da57 h1:yINFMnBRewB/CxEwnR8bfsAcdkqgM0OqG1XweO8ctuU= +istio.io/api v0.0.0-20231206023236-e7cadb36da57/go.mod h1:dDMe1TsOtrRoUlBzdxqNolWXpXPQjLfbcXvqPMtQ6eo= +istio.io/client-go v1.18.7 h1:ZFCnnDuEPCz7kYoTfpaF17+KNVMhlsGK/wA11px1zws= +istio.io/client-go v1.18.7/go.mod h1:MeI/KZUVp3jWyoXGSpFkiLYz012qpbQbjnVuYMcM9k4= k8s.io/api v0.15.7/go.mod h1:a/tUxscL+UxvYyA7Tj5DRc8ivYqJIO1Y5KDdlI6wSvo= k8s.io/api v0.19.2/go.mod h1:IQpK0zFQ1xc5iNIQPqzgoOwuFugaYHK4iCknlAQP9nI= k8s.io/api v0.19.7/go.mod h1:KTryDUT3l6Mtv7K2J2486PNL9DBns3wOYTkGR+iz63Y= k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= -k8s.io/api v0.23.0/go.mod h1:8wmDdLBHBNxtOIytwLstXt5E9PddnZb0GaMcqsvDBpg= -k8s.io/api v0.23.1/go.mod h1:WfXnOnwSqNtG62Y1CdjoMxh7r7u9QXGCkA1u0na2jgo= k8s.io/api v0.27.6 h1:PBWu/lywJe2qQcshMjubzcBg7+XDZOo7O8JJAWuYtUo= k8s.io/api v0.27.6/go.mod h1:AQYj0UsFCp3qJE7bOVnUuy4orCsXVkvHefnbYQiNWgk= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= @@ -1361,8 +1300,6 @@ k8s.io/apimachinery v0.15.7/go.mod h1:Xc10RHc1U+F/e9GCloJ8QAeCGevSVP5xhOhqlE+e1k k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.19.7/go.mod h1:6sRbGRAVY5DOCuZwB5XkqguBqpqLU6q/kOaOdk29z6Q= k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= -k8s.io/apimachinery v0.23.0/go.mod h1:fFCTTBKvKcwTPFzjlcxp91uPFZr+JA0FubU4fLzzFYc= -k8s.io/apimachinery v0.23.1/go.mod h1:SADt2Kl8/sttJ62RRsi9MIV4o8f5S3coArm0Iu3fBno= k8s.io/apimachinery v0.27.6 h1:mGU8jmBq5o8mWBov+mLjdTBcU+etTE19waies4AQ6NE= k8s.io/apimachinery v0.27.6/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E= k8s.io/apiserver v0.19.2/go.mod h1:FreAq0bJ2vtZFj9Ago/X0oNGC51GfubKK/ViOKfVAOA= @@ -1372,7 +1309,6 @@ k8s.io/client-go v0.15.7/go.mod h1:QMNB76d3lKPvPQdOOnnxUF693C3hnCzUbC2umg70pWA= k8s.io/client-go v0.19.2/go.mod h1:S5wPhCqyDNAlzM9CnEdgTGV4OqhsW3jGO1UM1epwfJA= k8s.io/client-go v0.19.7/go.mod h1:iytGI7S3kmv6bWnn+bSQUE4VlrEi4YFssvVB7J7Hvqg= k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y= -k8s.io/client-go v0.23.1/go.mod h1:6QSI8fEuqD4zgFK0xbdwfB/PthBsIxCJMa3s17WlcO0= k8s.io/client-go v0.27.6 h1:vzI8804gpUtpMCNaFjIFyJrifH7u//LJCJPy8fQuYQg= k8s.io/client-go v0.27.6/go.mod h1:PMsXcDKiJTW7PHJ64oEsIUJF319wm+EFlCj76oE5QXM= k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZhgk= @@ -1382,7 +1318,6 @@ k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agE k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9 h1:iu3o/SxaHVI7tKPtkGzD3M9IzrE21j+CUKH98NQJ8Ms= k8s.io/gengo v0.0.0-20221011193443-fad74ee6edd9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= @@ -1391,7 +1326,6 @@ k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.90.1 h1:m4bYOKall2MmOiRaR1J+We67Do7vm9KiQVlT96lnHUw= k8s.io/klog/v2 v2.90.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= @@ -1399,15 +1333,12 @@ k8s.io/kube-openapi v0.0.0-20190228160746-b3a7cee44a30/go.mod h1:BXM9ceUBTj2QnfH k8s.io/kube-openapi v0.0.0-20200204173128-addea2498afe/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f h1:2kWPakN3i/k81b0gvD5C5FJ2kxm1WrQFanWchyKuqGg= k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f/go.mod h1:byini6yhqGC14c3ebc/QwanvYwhuMWF6yz2F8uwW8eg= k8s.io/utils v0.0.0-20190221042446-c2654d5206da/go.mod h1:8k8uAuAQ0rXslZKaEWd0c3oVhZz7sSzSiPnVZayjIX0= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20200912215256-4140de9c8800/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20230209194617-a36077c30491 h1:r0BAOLElQnnFhE/ApUsg3iHdVYYPBjNSSOMowRZxxsY= k8s.io/utils v0.0.0-20230209194617-a36077c30491/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= knative.dev/caching v0.0.0-20231129014048-3fefe85d37a2 h1:M9KP+LdwJHo00R9rM4vzXpXoTm7rKqKitDFqLjAnYUY= @@ -1431,7 +1362,6 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.9/go.mod h1:dzAXnQbTRyDlZPJX2SUPEqvnB+j7AJjtlox7PEwigU0= sigs.k8s.io/controller-runtime v0.7.2 h1:gD2JZp0bBLLuvSRYVNvox+bRCz1UUUxKDjPUCb56Ukk= sigs.k8s.io/controller-runtime v0.7.2/go.mod h1:pJ3YBrJiAqMAZKi6UVGuE98ZrroV1p+pIhoHsMm9wdU= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= diff --git a/third_party/VENDOR-LICENSE/istio.io/api/LICENSE b/third_party/VENDOR-LICENSE/istio.io/api/LICENSE index 56e48aa37..bb7b19dec 100644 --- a/third_party/VENDOR-LICENSE/istio.io/api/LICENSE +++ b/third_party/VENDOR-LICENSE/istio.io/api/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2020 Istio Authors + Copyright 2016-2022 Istio Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/third_party/VENDOR-LICENSE/istio.io/client-go/pkg/LICENSE b/third_party/VENDOR-LICENSE/istio.io/client-go/pkg/LICENSE index 56e48aa37..bb7b19dec 100644 --- a/third_party/VENDOR-LICENSE/istio.io/client-go/pkg/LICENSE +++ b/third_party/VENDOR-LICENSE/istio.io/client-go/pkg/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2020 Istio Authors + Copyright 2016-2022 Istio Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/istio.io/api/LICENSE b/vendor/istio.io/api/LICENSE index 56e48aa37..bb7b19dec 100644 --- a/vendor/istio.io/api/LICENSE +++ b/vendor/istio.io/api/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2020 Istio Authors + Copyright 2016-2022 Istio Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/istio.io/api/analysis/v1alpha1/message.pb.go b/vendor/istio.io/api/analysis/v1alpha1/message.pb.go index 411f14cc5..9d3b1aa7b 100644 --- a/vendor/istio.io/api/analysis/v1alpha1/message.pb.go +++ b/vendor/istio.io/api/analysis/v1alpha1/message.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: analysis/v1alpha1/message.proto diff --git a/vendor/istio.io/api/analysis/v1alpha1/message.pb.html b/vendor/istio.io/api/analysis/v1alpha1/message.pb.html index 5d9640a7a..bd53f75ea 100644 --- a/vendor/istio.io/api/analysis/v1alpha1/message.pb.html +++ b/vendor/istio.io/api/analysis/v1alpha1/message.pb.html @@ -104,7 +104,7 @@

AnalysisMessageWeakSchema

template string -

A go-style template string (https://golang.org/pkg/fmt/#hdr-Printing) +

A go-style template string (https://golang.org/pkg/fmt/#hdr-Printing) defining how to combine the args for a particular message into a log line. Required.

@@ -173,10 +173,10 @@

GenericAnalysisMessage

string[]

A list of strings specifying the resource identifiers that were the cause -of message generation. A “path” here is a (NAMESPACE\/)?RESOURCETYPE/NAME +of message generation. A “path” here is a (NAMESPACE/)?RESOURCETYPE/NAME tuple that uniquely identifies a particular resource. There doesn’t seem to be a single concept for this, but this is intuitively taken from -https://kubernetes.io/docs/reference/using-api/api-concepts/#standard-api-terminology +https://kubernetes.io/docs/reference/using-api/api-concepts/#standard-api-terminology At least one is required.

diff --git a/vendor/istio.io/api/analysis/v1alpha1/message_deepcopy.gen.go b/vendor/istio.io/api/analysis/v1alpha1/message_deepcopy.gen.go index 3d0a97919..5419f20bb 100644 --- a/vendor/istio.io/api/analysis/v1alpha1/message_deepcopy.gen.go +++ b/vendor/istio.io/api/analysis/v1alpha1/message_deepcopy.gen.go @@ -2,7 +2,7 @@ package v1alpha1 import ( - proto "github.com/golang/protobuf/proto" + proto "google.golang.org/protobuf/proto" ) // DeepCopyInto supports using AnalysisMessageBase within kubernetes types, where deepcopy-gen is used. diff --git a/vendor/istio.io/api/extensions/v1alpha1/wasm.gen.json b/vendor/istio.io/api/extensions/v1alpha1/wasm.gen.json index 6df220625..80e9e0c29 100644 --- a/vendor/istio.io/api/extensions/v1alpha1/wasm.gen.json +++ b/vendor/istio.io/api/extensions/v1alpha1/wasm.gen.json @@ -40,7 +40,7 @@ ] }, "istio.extensions.v1alpha1.PullPolicy": { - "description": "The pull behaviour to be applied when fetching an OCI image, mirroring K8s behaviour.", + "description": "The pull behaviour to be applied when fetching a Wam module, mirroring K8s behaviour.", "type": "string", "enum": [ "UNSPECIFIED_POLICY", @@ -84,7 +84,7 @@ "type": "string" }, "verificationKey": { - "description": "Public key that will be used to verify signatures of signed OCI images or Wasm modules. Must be supplied in PEM format.", + "description": "Public key that will be used to verify signatures of signed OCI images or Wasm modules.", "type": "string" }, "pluginConfig": { @@ -105,9 +105,52 @@ }, "vmConfig": { "$ref": "#/components/schemas/istio.extensions.v1alpha1.VmConfig" + }, + "match": { + "description": "Specifies the criteria to determine which traffic is passed to WasmPlugin. If a traffic satisfies any of TrafficSelectors, the traffic passes the WasmPlugin.", + "type": "array", + "items": { + "$ref": "#/components/schemas/istio.extensions.v1alpha1.WasmPlugin.TrafficSelector" + } + } + } + }, + "istio.extensions.v1alpha1.WasmPlugin.TrafficSelector": { + "description": "TrafficSelector provides a mechanism to select a specific traffic flow for which this Wasm Plugin will be enabled. When all the sub conditions in the TrafficSelector are satisfied, the traffic will be selected.", + "type": "object", + "properties": { + "mode": { + "$ref": "#/components/schemas/istio.type.v1beta1.WorkloadMode" + }, + "ports": { + "description": "Criteria for selecting traffic by their destination port. More specifically, for the outbound traffic, the destination port would be the port of the target service. On the other hand, for the inbound traffic, the destiation port is the port bound by the server process in the same Pod.", + "type": "array", + "items": { + "$ref": "#/components/schemas/istio.type.v1beta1.PortSelector" + } } } }, + "istio.type.v1beta1.PortSelector": { + "description": "PortSelector is the criteria for specifying if a policy can be applied to a listener having a specific port.", + "type": "object", + "properties": { + "number": { + "description": "Port number", + "type": "integer" + } + } + }, + "istio.type.v1beta1.WorkloadMode": { + "description": "WorkloadMode allows selection of the role of the underlying workload in network traffic. A workload is considered as acting as a SERVER if it is the destination of the traffic (that is, traffic direction, from the perspective of the workload is *inbound*). If the workload is the source of the network traffic, it is considered to be in CLIENT mode (traffic is *outbound* from the workload).", + "type": "string", + "enum": [ + "UNDEFINED", + "CLIENT", + "SERVER", + "CLIENT_AND_SERVER" + ] + }, "istio.type.v1beta1.WorkloadSelector": { "description": "WorkloadSelector specifies the criteria used to determine if a policy can be applied to a proxy. The matching criteria includes the metadata associated with a proxy, workload instance info such as labels attached to the pod/VM, or any other info that the proxy provides to Istio during the initial handshake. If multiple conditions are specified, all conditions need to match in order for the workload instance to be selected. Currently, only label based selection mechanism is supported.", "type": "object", diff --git a/vendor/istio.io/api/extensions/v1alpha1/wasm.pb.go b/vendor/istio.io/api/extensions/v1alpha1/wasm.pb.go index 196293eed..f83dc3d71 100644 --- a/vendor/istio.io/api/extensions/v1alpha1/wasm.pb.go +++ b/vendor/istio.io/api/extensions/v1alpha1/wasm.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: extensions/v1alpha1/wasm.proto @@ -66,7 +66,7 @@ // namespace: istio-ingress // spec: // selector: -// labels: +// matchLabels: // istio: ingressgateway // url: oci://private-registry:5000/openid-connect/openid:latest // imagePullPolicy: IfNotPresent @@ -87,7 +87,7 @@ // namespace: istio-ingress // spec: // selector: -// labels: +// matchLabels: // istio: ingressgateway // url: oci://private-registry:5000/openid-connect/openid:latest // imagePullPolicy: IfNotPresent @@ -104,6 +104,31 @@ // value: "cluster.local" // ``` // +// This is also the same as the last example, but the Wasm module is pulled via https and updated for each time when this plugin resource is changed. +// ```yaml +// apiVersion: extensions.istio.io/v1alpha1 +// kind: WasmPlugin +// metadata: +// name: openid-connect +// namespace: istio-ingress +// spec: +// selector: +// matchLabels: +// istio: ingressgateway +// url: https://private-bucket/filters/openid.wasm +// imagePullPolicy: Always +// phase: AUTHN +// pluginConfig: +// openid_server: authn +// openid_realm: ingress +// vmConfig: +// env: +// - name: POD_NAME +// valueFrom: HOST +// - name: TRUST_DOMAIN +// value: "cluster.local" +// ``` +// // And a more complex example that deploys three WasmPlugins and orders them // using `phase` and `priority`. The (hypothetical) setup is that the // `openid-connect` filter performs an OpenID Connect flow to authenticate the @@ -258,7 +283,7 @@ func (PluginPhase) EnumDescriptor() ([]byte, []int) { return file_extensions_v1alpha1_wasm_proto_rawDescGZIP(), []int{0} } -// The pull behaviour to be applied when fetching an OCI image, +// The pull behaviour to be applied when fetching a Wam module, // mirroring K8s behaviour. // // +// +// +// +type AuthorizationPolicy struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The selector decides where to apply the authorization policy. The selector will match with workloads + // in the same namespace as the authorization policy. If the authorization policy is in the root namespace, the selector + // will additionally match with workloads in all namespaces. + // + // If not set, the selector will match all workloads. + Selector *v1beta1.WorkloadSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // Optional. A list of rules to match the request. A match occurs when at least one rule matches the request. + // + // If not set, the match will never occur. This is equivalent to setting a default of deny for the target workloads if + // the action is ALLOW. + Rules []*Rule `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"` + // Optional. The action to take if the request is matched with the rules. Default is ALLOW if not specified. + Action AuthorizationPolicy_Action `protobuf:"varint,3,opt,name=action,proto3,enum=istio.security.v1.AuthorizationPolicy_Action" json:"action,omitempty"` + // Types that are assignable to ActionDetail: + // + // *AuthorizationPolicy_Provider + ActionDetail isAuthorizationPolicy_ActionDetail `protobuf_oneof:"action_detail"` +} + +func (x *AuthorizationPolicy) Reset() { + *x = AuthorizationPolicy{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthorizationPolicy) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthorizationPolicy) ProtoMessage() {} + +func (x *AuthorizationPolicy) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthorizationPolicy.ProtoReflect.Descriptor instead. +func (*AuthorizationPolicy) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{0} +} + +func (x *AuthorizationPolicy) GetSelector() *v1beta1.WorkloadSelector { + if x != nil { + return x.Selector + } + return nil +} + +func (x *AuthorizationPolicy) GetRules() []*Rule { + if x != nil { + return x.Rules + } + return nil +} + +func (x *AuthorizationPolicy) GetAction() AuthorizationPolicy_Action { + if x != nil { + return x.Action + } + return AuthorizationPolicy_ALLOW +} + +func (m *AuthorizationPolicy) GetActionDetail() isAuthorizationPolicy_ActionDetail { + if m != nil { + return m.ActionDetail + } + return nil +} + +func (x *AuthorizationPolicy) GetProvider() *AuthorizationPolicy_ExtensionProvider { + if x, ok := x.GetActionDetail().(*AuthorizationPolicy_Provider); ok { + return x.Provider + } + return nil +} + +type isAuthorizationPolicy_ActionDetail interface { + isAuthorizationPolicy_ActionDetail() +} + +type AuthorizationPolicy_Provider struct { + // Specifies detailed configuration of the CUSTOM action. Must be used only with CUSTOM action. + Provider *AuthorizationPolicy_ExtensionProvider `protobuf:"bytes,4,opt,name=provider,proto3,oneof"` +} + +func (*AuthorizationPolicy_Provider) isAuthorizationPolicy_ActionDetail() {} + +// Rule matches requests from a list of sources that perform a list of operations subject to a +// list of conditions. A match occurs when at least one source, one operation and all conditions +// matches the request. An empty rule is always matched. +// +// Any string field in the rule supports Exact, Prefix, Suffix and Presence match: +// +// - Exact match: "abc" will match on value "abc". +// - Prefix match: "abc*" will match on value "abc" and "abcd". +// - Suffix match: "*abc" will match on value "abc" and "xabc". +// - Presence match: "*" will match when value is not empty. +type Rule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. from specifies the source of a request. + // + // If not set, any source is allowed. + From []*Rule_From `protobuf:"bytes,1,rep,name=from,proto3" json:"from,omitempty"` + // Optional. to specifies the operation of a request. + // + // If not set, any operation is allowed. + To []*Rule_To `protobuf:"bytes,2,rep,name=to,proto3" json:"to,omitempty"` + // Optional. when specifies a list of additional conditions of a request. + // + // If not set, any condition is allowed. + When []*Condition `protobuf:"bytes,3,rep,name=when,proto3" json:"when,omitempty"` +} + +func (x *Rule) Reset() { + *x = Rule{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rule) ProtoMessage() {} + +func (x *Rule) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rule.ProtoReflect.Descriptor instead. +func (*Rule) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{1} +} + +func (x *Rule) GetFrom() []*Rule_From { + if x != nil { + return x.From + } + return nil +} + +func (x *Rule) GetTo() []*Rule_To { + if x != nil { + return x.To + } + return nil +} + +func (x *Rule) GetWhen() []*Condition { + if x != nil { + return x.When + } + return nil +} + +// Source specifies the source identities of a request. Fields in the source are +// ANDed together. +// +// For example, the following source matches if the principal is "admin" or "dev" +// and the namespace is "prod" or "test" and the ip is not "203.0.113.4". +// +// ```yaml +// principals: ["admin", "dev"] +// namespaces: ["prod", "test"] +// notIpBlocks: ["203.0.113.4"] +// ``` +type Source struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. A list of peer identities derived from the peer certificate. The peer identity is in the format of + // `"/ns//sa/"`, for example, `"cluster.local/ns/default/sa/productpage"`. + // This field requires mTLS enabled and is the same as the `source.principal` attribute. + // + // If not set, any principal is allowed. + Principals []string `protobuf:"bytes,1,rep,name=principals,proto3" json:"principals,omitempty"` + // Optional. A list of negative match of peer identities. + NotPrincipals []string `protobuf:"bytes,5,rep,name=not_principals,json=notPrincipals,proto3" json:"not_principals,omitempty"` + // Optional. A list of request identities derived from the JWT. The request identity is in the format of + // `"/"`, for example, `"example.com/sub-1"`. This field requires request authentication enabled and is the + // same as the `request.auth.principal` attribute. + // + // If not set, any request principal is allowed. + RequestPrincipals []string `protobuf:"bytes,2,rep,name=request_principals,json=requestPrincipals,proto3" json:"request_principals,omitempty"` + // Optional. A list of negative match of request identities. + NotRequestPrincipals []string `protobuf:"bytes,6,rep,name=not_request_principals,json=notRequestPrincipals,proto3" json:"not_request_principals,omitempty"` + // Optional. A list of namespaces derived from the peer certificate. + // This field requires mTLS enabled and is the same as the `source.namespace` attribute. + // + // If not set, any namespace is allowed. + Namespaces []string `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + // Optional. A list of negative match of namespaces. + NotNamespaces []string `protobuf:"bytes,7,rep,name=not_namespaces,json=notNamespaces,proto3" json:"not_namespaces,omitempty"` + // Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. "203.0.113.4") and + // CIDR (e.g. "203.0.113.0/24") are supported. This is the same as the `source.ip` attribute. + // + // If not set, any IP is allowed. + IpBlocks []string `protobuf:"bytes,4,rep,name=ip_blocks,json=ipBlocks,proto3" json:"ip_blocks,omitempty"` + // Optional. A list of negative match of IP blocks. + NotIpBlocks []string `protobuf:"bytes,8,rep,name=not_ip_blocks,json=notIpBlocks,proto3" json:"not_ip_blocks,omitempty"` + // Optional. A list of IP blocks, populated from X-Forwarded-For header or proxy protocol. + // To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig + // when you install Istio or using an annotation on the ingress gateway. See the documentation here: + // [Configuring Gateway Network Topology](https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/). + // Single IP (e.g. "203.0.113.4") and CIDR (e.g. "203.0.113.0/24") are supported. + // This is the same as the `remote.ip` attribute. + // + // If not set, any IP is allowed. + RemoteIpBlocks []string `protobuf:"bytes,9,rep,name=remote_ip_blocks,json=remoteIpBlocks,proto3" json:"remote_ip_blocks,omitempty"` + // Optional. A list of negative match of remote IP blocks. + NotRemoteIpBlocks []string `protobuf:"bytes,10,rep,name=not_remote_ip_blocks,json=notRemoteIpBlocks,proto3" json:"not_remote_ip_blocks,omitempty"` +} + +func (x *Source) Reset() { + *x = Source{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Source) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Source) ProtoMessage() {} + +func (x *Source) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Source.ProtoReflect.Descriptor instead. +func (*Source) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{2} +} + +func (x *Source) GetPrincipals() []string { + if x != nil { + return x.Principals + } + return nil +} + +func (x *Source) GetNotPrincipals() []string { + if x != nil { + return x.NotPrincipals + } + return nil +} + +func (x *Source) GetRequestPrincipals() []string { + if x != nil { + return x.RequestPrincipals + } + return nil +} + +func (x *Source) GetNotRequestPrincipals() []string { + if x != nil { + return x.NotRequestPrincipals + } + return nil +} + +func (x *Source) GetNamespaces() []string { + if x != nil { + return x.Namespaces + } + return nil +} + +func (x *Source) GetNotNamespaces() []string { + if x != nil { + return x.NotNamespaces + } + return nil +} + +func (x *Source) GetIpBlocks() []string { + if x != nil { + return x.IpBlocks + } + return nil +} + +func (x *Source) GetNotIpBlocks() []string { + if x != nil { + return x.NotIpBlocks + } + return nil +} + +func (x *Source) GetRemoteIpBlocks() []string { + if x != nil { + return x.RemoteIpBlocks + } + return nil +} + +func (x *Source) GetNotRemoteIpBlocks() []string { + if x != nil { + return x.NotRemoteIpBlocks + } + return nil +} + +// Operation specifies the operations of a request. Fields in the operation are +// ANDed together. +// +// For example, the following operation matches if the host has suffix ".example.com" +// and the method is "GET" or "HEAD" and the path doesn't have prefix "/admin". +// +// ```yaml +// hosts: ["*.example.com"] +// methods: ["GET", "HEAD"] +// notPaths: ["/admin*"] +// ``` +type Operation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. A list of hosts as specified in the HTTP request. The match is case-insensitive. + // See the [security best practices](https://istio.io/latest/docs/ops/best-practices/security/#writing-host-match-policies) for + // recommended usage of this field. + // + // If not set, any host is allowed. Must be used only with HTTP. + Hosts []string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty"` + // Optional. A list of negative match of hosts as specified in the HTTP request. The match is case-insensitive. + NotHosts []string `protobuf:"bytes,5,rep,name=not_hosts,json=notHosts,proto3" json:"not_hosts,omitempty"` + // Optional. A list of ports as specified in the connection. + // + // If not set, any port is allowed. + Ports []string `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports,omitempty"` + // Optional. A list of negative match of ports as specified in the connection. + NotPorts []string `protobuf:"bytes,6,rep,name=not_ports,json=notPorts,proto3" json:"not_ports,omitempty"` + // Optional. A list of methods as specified in the HTTP request. + // For gRPC service, this will always be "POST". + // + // If not set, any method is allowed. Must be used only with HTTP. + Methods []string `protobuf:"bytes,3,rep,name=methods,proto3" json:"methods,omitempty"` + // Optional. A list of negative match of methods as specified in the HTTP request. + NotMethods []string `protobuf:"bytes,7,rep,name=not_methods,json=notMethods,proto3" json:"not_methods,omitempty"` + // Optional. A list of paths as specified in the HTTP request. See the [Authorization Policy Normalization](https://istio.io/latest/docs/reference/config/security/normalization/) + // for details of the path normalization. + // For gRPC service, this will be the fully-qualified name in the form of "/package.service/method". + // + // If not set, any path is allowed. Must be used only with HTTP. + Paths []string `protobuf:"bytes,4,rep,name=paths,proto3" json:"paths,omitempty"` + // Optional. A list of negative match of paths. + NotPaths []string `protobuf:"bytes,8,rep,name=not_paths,json=notPaths,proto3" json:"not_paths,omitempty"` +} + +func (x *Operation) Reset() { + *x = Operation{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Operation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Operation) ProtoMessage() {} + +func (x *Operation) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Operation.ProtoReflect.Descriptor instead. +func (*Operation) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{3} +} + +func (x *Operation) GetHosts() []string { + if x != nil { + return x.Hosts + } + return nil +} + +func (x *Operation) GetNotHosts() []string { + if x != nil { + return x.NotHosts + } + return nil +} + +func (x *Operation) GetPorts() []string { + if x != nil { + return x.Ports + } + return nil +} + +func (x *Operation) GetNotPorts() []string { + if x != nil { + return x.NotPorts + } + return nil +} + +func (x *Operation) GetMethods() []string { + if x != nil { + return x.Methods + } + return nil +} + +func (x *Operation) GetNotMethods() []string { + if x != nil { + return x.NotMethods + } + return nil +} + +func (x *Operation) GetPaths() []string { + if x != nil { + return x.Paths + } + return nil +} + +func (x *Operation) GetNotPaths() []string { + if x != nil { + return x.NotPaths + } + return nil +} + +// Condition specifies additional required attributes. +type Condition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of an Istio attribute. + // See the [full list of supported attributes](https://istio.io/docs/reference/config/security/conditions/). + Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // Optional. A list of allowed values for the attribute. + // Note: at least one of values or not_values must be set. + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` + // Optional. A list of negative match of values for the attribute. + // Note: at least one of values or not_values must be set. + NotValues []string `protobuf:"bytes,3,rep,name=not_values,json=notValues,proto3" json:"not_values,omitempty"` +} + +func (x *Condition) Reset() { + *x = Condition{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Condition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Condition) ProtoMessage() {} + +func (x *Condition) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Condition.ProtoReflect.Descriptor instead. +func (*Condition) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{4} +} + +func (x *Condition) GetKey() string { + if x != nil { + return x.Key + } + return "" +} + +func (x *Condition) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + +func (x *Condition) GetNotValues() []string { + if x != nil { + return x.NotValues + } + return nil +} + +type AuthorizationPolicy_ExtensionProvider struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Specifies the name of the extension provider. The list of available providers is defined in the MeshConfig. + // Note, currently at most 1 extension provider is allowed per workload. Different workloads can use different extension provider. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *AuthorizationPolicy_ExtensionProvider) Reset() { + *x = AuthorizationPolicy_ExtensionProvider{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AuthorizationPolicy_ExtensionProvider) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AuthorizationPolicy_ExtensionProvider) ProtoMessage() {} + +func (x *AuthorizationPolicy_ExtensionProvider) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AuthorizationPolicy_ExtensionProvider.ProtoReflect.Descriptor instead. +func (*AuthorizationPolicy_ExtensionProvider) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *AuthorizationPolicy_ExtensionProvider) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +// From includes a list of sources. +type Rule_From struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Source specifies the source of a request. + Source *Source `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` +} + +func (x *Rule_From) Reset() { + *x = Rule_From{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Rule_From) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rule_From) ProtoMessage() {} + +func (x *Rule_From) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rule_From.ProtoReflect.Descriptor instead. +func (*Rule_From) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Rule_From) GetSource() *Source { + if x != nil { + return x.Source + } + return nil +} + +// To includes a list of operations. +type Rule_To struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Operation specifies the operation of a request. + Operation *Operation `protobuf:"bytes,1,opt,name=operation,proto3" json:"operation,omitempty"` +} + +func (x *Rule_To) Reset() { + *x = Rule_To{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_authorization_policy_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Rule_To) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rule_To) ProtoMessage() {} + +func (x *Rule_To) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_authorization_policy_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rule_To.ProtoReflect.Descriptor instead. +func (*Rule_To) Descriptor() ([]byte, []int) { + return file_security_v1_authorization_policy_proto_rawDescGZIP(), []int{1, 1} +} + +func (x *Rule_To) GetOperation() *Operation { + if x != nil { + return x.Operation + } + return nil +} + +var File_security_v1_authorization_policy_proto protoreflect.FileDescriptor + +var file_security_v1_authorization_policy_proto_rawDesc = []byte{ + 0x0a, 0x26, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x79, + 0x70, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x03, 0x0a, 0x13, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x12, 0x40, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x12, 0x2d, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x45, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x69, 0x73, + 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x76, 0x69, 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, + 0x72, 0x1a, 0x27, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, + 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x06, 0x41, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x10, 0x00, 0x12, + 0x08, 0x0a, 0x04, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x55, 0x44, + 0x49, 0x54, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x10, 0x03, + 0x42, 0x0f, 0x0a, 0x0d, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, + 0x6c, 0x22, 0x93, 0x02, 0x0a, 0x04, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x30, 0x0a, 0x04, 0x66, 0x72, + 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, + 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, + 0x65, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x2a, 0x0a, 0x02, + 0x74, 0x6f, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, + 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x75, 0x6c, + 0x65, 0x2e, 0x54, 0x6f, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x30, 0x0a, 0x04, 0x77, 0x68, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x77, 0x68, 0x65, 0x6e, 0x1a, 0x39, 0x0a, 0x04, 0x46, 0x72, + 0x6f, 0x6d, 0x12, 0x31, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x1a, 0x40, 0x0a, 0x02, 0x54, 0x6f, 0x12, 0x3a, 0x0a, 0x09, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x97, 0x03, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, + 0x70, 0x61, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x6f, 0x74, 0x50, + 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, + 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x6e, 0x6f, 0x74, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, + 0x6c, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x6e, 0x6f, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x73, 0x12, 0x1e, + 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x25, + 0x0a, 0x0e, 0x6e, 0x6f, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x6f, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x70, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x69, 0x70, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x70, 0x5f, 0x62, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x49, 0x70, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, + 0x5f, 0x69, 0x70, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x12, 0x2f, 0x0a, 0x14, 0x6e, 0x6f, 0x74, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x69, + 0x70, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, + 0x6e, 0x6f, 0x74, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x70, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x22, 0xdf, 0x01, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x14, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, + 0x68, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x68, 0x6f, 0x73, + 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x48, 0x6f, 0x73, + 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, + 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x74, + 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, + 0x1f, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x70, 0x61, + 0x74, 0x68, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x74, 0x50, 0x61, + 0x74, 0x68, 0x73, 0x22, 0x59, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x15, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x42, 0x1a, + 0x5a, 0x18, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_security_v1_authorization_policy_proto_rawDescOnce sync.Once + file_security_v1_authorization_policy_proto_rawDescData = file_security_v1_authorization_policy_proto_rawDesc +) + +func file_security_v1_authorization_policy_proto_rawDescGZIP() []byte { + file_security_v1_authorization_policy_proto_rawDescOnce.Do(func() { + file_security_v1_authorization_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_security_v1_authorization_policy_proto_rawDescData) + }) + return file_security_v1_authorization_policy_proto_rawDescData +} + +var file_security_v1_authorization_policy_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_security_v1_authorization_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_security_v1_authorization_policy_proto_goTypes = []interface{}{ + (AuthorizationPolicy_Action)(0), // 0: istio.security.v1.AuthorizationPolicy.Action + (*AuthorizationPolicy)(nil), // 1: istio.security.v1.AuthorizationPolicy + (*Rule)(nil), // 2: istio.security.v1.Rule + (*Source)(nil), // 3: istio.security.v1.Source + (*Operation)(nil), // 4: istio.security.v1.Operation + (*Condition)(nil), // 5: istio.security.v1.Condition + (*AuthorizationPolicy_ExtensionProvider)(nil), // 6: istio.security.v1.AuthorizationPolicy.ExtensionProvider + (*Rule_From)(nil), // 7: istio.security.v1.Rule.From + (*Rule_To)(nil), // 8: istio.security.v1.Rule.To + (*v1beta1.WorkloadSelector)(nil), // 9: istio.type.v1beta1.WorkloadSelector +} +var file_security_v1_authorization_policy_proto_depIdxs = []int32{ + 9, // 0: istio.security.v1.AuthorizationPolicy.selector:type_name -> istio.type.v1beta1.WorkloadSelector + 2, // 1: istio.security.v1.AuthorizationPolicy.rules:type_name -> istio.security.v1.Rule + 0, // 2: istio.security.v1.AuthorizationPolicy.action:type_name -> istio.security.v1.AuthorizationPolicy.Action + 6, // 3: istio.security.v1.AuthorizationPolicy.provider:type_name -> istio.security.v1.AuthorizationPolicy.ExtensionProvider + 7, // 4: istio.security.v1.Rule.from:type_name -> istio.security.v1.Rule.From + 8, // 5: istio.security.v1.Rule.to:type_name -> istio.security.v1.Rule.To + 5, // 6: istio.security.v1.Rule.when:type_name -> istio.security.v1.Condition + 3, // 7: istio.security.v1.Rule.From.source:type_name -> istio.security.v1.Source + 4, // 8: istio.security.v1.Rule.To.operation:type_name -> istio.security.v1.Operation + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_security_v1_authorization_policy_proto_init() } +func file_security_v1_authorization_policy_proto_init() { + if File_security_v1_authorization_policy_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_security_v1_authorization_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthorizationPolicy); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_authorization_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Rule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_authorization_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Source); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_authorization_policy_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Operation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_authorization_policy_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Condition); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_authorization_policy_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthorizationPolicy_ExtensionProvider); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_authorization_policy_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Rule_From); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_authorization_policy_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Rule_To); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_security_v1_authorization_policy_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*AuthorizationPolicy_Provider)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_security_v1_authorization_policy_proto_rawDesc, + NumEnums: 1, + NumMessages: 8, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_security_v1_authorization_policy_proto_goTypes, + DependencyIndexes: file_security_v1_authorization_policy_proto_depIdxs, + EnumInfos: file_security_v1_authorization_policy_proto_enumTypes, + MessageInfos: file_security_v1_authorization_policy_proto_msgTypes, + }.Build() + File_security_v1_authorization_policy_proto = out.File + file_security_v1_authorization_policy_proto_rawDesc = nil + file_security_v1_authorization_policy_proto_goTypes = nil + file_security_v1_authorization_policy_proto_depIdxs = nil +} diff --git a/vendor/istio.io/api/security/v1/authorization_policy.pb.html b/vendor/istio.io/api/security/v1/authorization_policy.pb.html new file mode 100644 index 000000000..f3e6ef3c4 --- /dev/null +++ b/vendor/istio.io/api/security/v1/authorization_policy.pb.html @@ -0,0 +1,802 @@ +--- +title: Authorization Policy +description: Configuration for access control on workloads. +location: https://istio.io/docs/reference/config/security/authorization-policy.html +layout: protoc-gen-docs +generator: protoc-gen-docs +schema: istio.security.v1.AuthorizationPolicy +weight: 20 +aliases: [/docs/reference/config/authorization/authorization-policy] +number_of_entries: 9 +--- +

Istio Authorization Policy enables access control on workloads in the mesh.

+

Authorization policy supports CUSTOM, DENY and ALLOW actions for access control. When CUSTOM, DENY and ALLOW actions +are used for a workload at the same time, the CUSTOM action is evaluated first, then the DENY action, and finally the ALLOW action. +The evaluation is determined by the following rules:

+
    +
  1. If there are any CUSTOM policies that match the request, evaluate and deny the request if the evaluation result is deny.
  2. +
  3. If there are any DENY policies that match the request, deny the request.
  4. +
  5. If there are no ALLOW policies for the workload, allow the request.
  6. +
  7. If any of the ALLOW policies match the request, allow the request.
  8. +
  9. Deny the request.
  10. +
+

Istio Authorization Policy also supports the AUDIT action to decide whether to log requests. +AUDIT policies do not affect whether requests are allowed or denied to the workload. +Requests will be allowed or denied based solely on CUSTOM, DENY and ALLOW actions.

+

A request will be internally marked that it should be audited if there is an AUDIT policy on the workload that matches the request. +A separate plugin must be configured and enabled to actually fulfill the audit decision and complete the audit behavior. +The request will not be audited if there are no such supporting plugins enabled. +Currently, the only supported plugin is the Stackdriver plugin.

+

Here is an example of Istio Authorization Policy:

+

It sets the action to ALLOW to create an allow policy. The default action is ALLOW +but it is useful to be explicit in the policy.

+

It allows requests from:

+
    +
  • service account cluster.local/ns/default/sa/sleep or
  • +
  • namespace test
  • +
+

to access the workload with:

+
    +
  • GET method at paths of prefix /info or,
  • +
  • POST method at path /data.
  • +
+

when the request has a valid JWT token issued by https://accounts.google.com.

+

Any other requests will be denied.

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  action: ALLOW
+  rules:
+  - from:
+    - source:
+        principals: ["cluster.local/ns/default/sa/sleep"]
+    - source:
+        namespaces: ["test"]
+    to:
+    - operation:
+        methods: ["GET"]
+        paths: ["/info*"]
+    - operation:
+        methods: ["POST"]
+        paths: ["/data"]
+    when:
+    - key: request.auth.claims[iss]
+      values: ["https://accounts.google.com"]
+
+

The following is another example that sets action to DENY to create a deny policy. +It denies requests from the dev namespace to the POST method on all workloads +in the foo namespace.

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  action: DENY
+  rules:
+  - from:
+    - source:
+        namespaces: ["dev"]
+    to:
+    - operation:
+        methods: ["POST"]
+
+

The following is another example that sets action to DENY to create a deny policy. +It denies all the requests with POST method on port 8080 on all workloads +in the foo namespace.

+
apiVersion: security.istio.io/v1
+kind: AuthorizaionPolicy
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  action: DENY
+  rules:
+  - to:
+    - operation:
+        methods: ["POST"]
+        ports: ["8080"]
+
+

When this rule is applied to TCP traffic, the method field (as will all HTTP based attributes) cannot be processed. +For a DENY rule, missing attributes are treated as matches. This means all TCP traffic on port 8080 would be denied in the example above. +If we were to remove the ports match, all TCP traffic would be denied. As a result, it is recommended to always scope DENY policies to a specific port, +especially when using HTTP attributes Authorization Policy for TCP Ports.

+

The following authorization policy sets the action to AUDIT. It will audit any GET requests to the path with the +prefix /user/profile.

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  namespace: ns1
+  name: anyname
+spec:
+  selector:
+    matchLabels:
+      app: myapi
+  action: AUDIT
+  rules:
+  - to:
+    - operation:
+        methods: ["GET"]
+        paths: ["/user/profile/*"]
+
+

Authorization Policy scope (target) is determined by “metadata/namespace” and +an optional selector.

+
    +
  • “metadata/namespace” tells which namespace the policy applies. If set to root +namespace, the policy applies to all namespaces in a mesh.
  • +
  • workload selector can be used to further restrict where a policy applies.
  • +
+

For example, the following authorization policy applies to all workloads in namespace foo. It allows nothing and effectively denies +all requests to workloads in namespace foo.

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+ name: allow-nothing
+ namespace: foo
+spec:
+  {}
+
+

The following authorization policy allows all requests to workloads in namespace foo.

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+ name: allow-all
+ namespace: foo
+spec:
+ rules:
+ - {}
+
+

The following authorization policy applies to workloads containing label app: httpbin in namespace bar. It allows +nothing and effectively denies all requests to the selected workloads.

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: allow-nothing
+  namespace: bar
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+
+

The following authorization policy applies to workloads containing label version: v1 in all namespaces in the mesh. +(Assuming the root namespace is configured to istio-system).

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+ name: allow-nothing
+ namespace: istio-system
+spec:
+ selector:
+   matchLabels:
+     version: v1
+
+

The following example shows you how to set up an authorization policy using an experimental annotation +istio.io/dry-run to dry-run the policy without actually enforcing it.

+

The dry-run annotation allows you to better understand the effect of an authorization policy before applying it to the production traffic. +This helps to reduce the risk of breaking the production traffic caused by an incorrect authorization policy. +For more information, see dry-run tasks.

+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: dry-run-example
+  annotations:
+    "istio.io/dry-run": "true"
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+  action: DENY
+  rules:
+  - to:
+    - operation:
+        paths: ["/headers"]
+
+ +

AuthorizationPolicy

+
+

AuthorizationPolicy enables access control on workloads.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
selectorWorkloadSelector +

Optional. The selector decides where to apply the authorization policy. The selector will match with workloads +in the same namespace as the authorization policy. If the authorization policy is in the root namespace, the selector +will additionally match with workloads in all namespaces.

+

If not set, the selector will match all workloads.

+ +
+No +
rulesRule[] +

Optional. A list of rules to match the request. A match occurs when at least one rule matches the request.

+

If not set, the match will never occur. This is equivalent to setting a default of deny for the target workloads if +the action is ALLOW.

+ +
+No +
actionAction +

Optional. The action to take if the request is matched with the rules. Default is ALLOW if not specified.

+ +
+No +
providerExtensionProvider (oneof) +

Specifies detailed configuration of the CUSTOM action. Must be used only with CUSTOM action.

+ +
+No +
+
+

Rule

+
+

Rule matches requests from a list of sources that perform a list of operations subject to a +list of conditions. A match occurs when at least one source, one operation and all conditions +matches the request. An empty rule is always matched.

+

Any string field in the rule supports Exact, Prefix, Suffix and Presence match:

+
    +
  • Exact match: “abc” will match on value “abc”.
  • +
  • Prefix match: “abc*” will match on value “abc” and “abcd”.
  • +
  • Suffix match: “*abc” will match on value “abc” and “xabc”.
  • +
  • Presence match: “*” will match when value is not empty.
  • +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
fromFrom[] +

Optional. from specifies the source of a request.

+

If not set, any source is allowed.

+ +
+No +
toTo[] +

Optional. to specifies the operation of a request.

+

If not set, any operation is allowed.

+ +
+No +
whenCondition[] +

Optional. when specifies a list of additional conditions of a request.

+

If not set, any condition is allowed.

+ +
+No +
+
+

Source

+
+

Source specifies the source identities of a request. Fields in the source are +ANDed together.

+

For example, the following source matches if the principal is “admin” or “dev” +and the namespace is “prod” or “test” and the ip is not “203.0.113.4”.

+
principals: ["admin", "dev"]
+namespaces: ["prod", "test"]
+notIpBlocks: ["203.0.113.4"]
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
principalsstring[] +

Optional. A list of peer identities derived from the peer certificate. The peer identity is in the format of +"<TRUST_DOMAIN>/ns/<NAMESPACE>/sa/<SERVICE_ACCOUNT>", for example, "cluster.local/ns/default/sa/productpage". +This field requires mTLS enabled and is the same as the source.principal attribute.

+

If not set, any principal is allowed.

+ +
+No +
notPrincipalsstring[] +

Optional. A list of negative match of peer identities.

+ +
+No +
requestPrincipalsstring[] +

Optional. A list of request identities derived from the JWT. The request identity is in the format of +"<ISS>/<SUB>", for example, "example.com/sub-1". This field requires request authentication enabled and is the +same as the request.auth.principal attribute.

+

If not set, any request principal is allowed.

+ +
+No +
notRequestPrincipalsstring[] +

Optional. A list of negative match of request identities.

+ +
+No +
namespacesstring[] +

Optional. A list of namespaces derived from the peer certificate. +This field requires mTLS enabled and is the same as the source.namespace attribute.

+

If not set, any namespace is allowed.

+ +
+No +
notNamespacesstring[] +

Optional. A list of negative match of namespaces.

+ +
+No +
ipBlocksstring[] +

Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. “203.0.113.4”) and +CIDR (e.g. “203.0.113.0/24”) are supported. This is the same as the source.ip attribute.

+

If not set, any IP is allowed.

+ +
+No +
notIpBlocksstring[] +

Optional. A list of negative match of IP blocks.

+ +
+No +
remoteIpBlocksstring[] +

Optional. A list of IP blocks, populated from X-Forwarded-For header or proxy protocol. +To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig +when you install Istio or using an annotation on the ingress gateway. See the documentation here: +Configuring Gateway Network Topology. +Single IP (e.g. “203.0.113.4”) and CIDR (e.g. “203.0.113.0/24”) are supported. +This is the same as the remote.ip attribute.

+

If not set, any IP is allowed.

+ +
+No +
notRemoteIpBlocksstring[] +

Optional. A list of negative match of remote IP blocks.

+ +
+No +
+
+

Operation

+
+

Operation specifies the operations of a request. Fields in the operation are +ANDed together.

+

For example, the following operation matches if the host has suffix “.example.com” +and the method is “GET” or “HEAD” and the path doesn’t have prefix “/admin”.

+
hosts: ["*.example.com"]
+methods: ["GET", "HEAD"]
+notPaths: ["/admin*"]
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
hostsstring[] +

Optional. A list of hosts as specified in the HTTP request. The match is case-insensitive. +See the security best practices for +recommended usage of this field.

+

If not set, any host is allowed. Must be used only with HTTP.

+ +
+No +
notHostsstring[] +

Optional. A list of negative match of hosts as specified in the HTTP request. The match is case-insensitive.

+ +
+No +
portsstring[] +

Optional. A list of ports as specified in the connection.

+

If not set, any port is allowed.

+ +
+No +
notPortsstring[] +

Optional. A list of negative match of ports as specified in the connection.

+ +
+No +
methodsstring[] +

Optional. A list of methods as specified in the HTTP request. +For gRPC service, this will always be “POST”.

+

If not set, any method is allowed. Must be used only with HTTP.

+ +
+No +
notMethodsstring[] +

Optional. A list of negative match of methods as specified in the HTTP request.

+ +
+No +
pathsstring[] +

Optional. A list of paths as specified in the HTTP request. See the Authorization Policy Normalization +for details of the path normalization. +For gRPC service, this will be the fully-qualified name in the form of “/package.service/method”.

+

If not set, any path is allowed. Must be used only with HTTP.

+ +
+No +
notPathsstring[] +

Optional. A list of negative match of paths.

+ +
+No +
+
+

Condition

+
+

Condition specifies additional required attributes.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
keystring +

The name of an Istio attribute. +See the full list of supported attributes.

+ +
+Yes +
valuesstring[] +

Optional. A list of allowed values for the attribute. +Note: at least one of values or not_values must be set.

+ +
+No +
notValuesstring[] +

Optional. A list of negative match of values for the attribute. +Note: at least one of values or not_values must be set.

+ +
+No +
+
+

AuthorizationPolicy.ExtensionProvider

+
+ + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
namestring +

Specifies the name of the extension provider. The list of available providers is defined in the MeshConfig. +Note, currently at most 1 extension provider is allowed per workload. Different workloads can use different extension provider.

+ +
+No +
+
+

Rule.From

+
+

From includes a list of sources.

+ + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
sourceSource +

Source specifies the source of a request.

+ +
+No +
+
+

Rule.To

+
+

To includes a list of operations.

+ + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
operationOperation +

Operation specifies the operation of a request.

+ +
+No +
+
+

AuthorizationPolicy.Action

+
+

Action specifies the operation to take.

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
NameDescription
ALLOW +

Allow a request only if it matches the rules. This is the default type.

+ +
DENY +

Deny a request if it matches any of the rules.

+ +
AUDIT +

Audit a request if it matches any of the rules.

+ +
CUSTOM +

The CUSTOM action allows an extension to handle the user request if the matching rules evaluate to true. +The extension is evaluated independently and before the native ALLOW and DENY actions. When used together, A request +is allowed if and only if all the actions return allow, in other words, the extension cannot bypass the +authorization decision made by ALLOW and DENY action. +Extension behavior is defined by the named providers declared in MeshConfig. The authorization policy refers to +the extension by specifying the name of the provider. +One example use case of the extension is to integrate with a custom external authorization system to delegate +the authorization decision to it.

+

Note: The CUSTOM action is currently an alpha feature and is subject to breaking changes in later versions.

+

The following authorization policy applies to an ingress gateway and delegates the authorization check to a named extension +“my-custom-authz” if the request path has prefix “/admin/”.

+
apiVersion: security.istio.io/v1beta1
+kind: AuthorizationPolicy
+metadata:
+  name: ext-authz
+  namespace: istio-system
+spec:
+  selector:
+    matchLabels:
+      app: istio-ingressgateway
+  action: CUSTOM
+  provider:
+    name: "my-custom-authz"
+  rules:
+  - to:
+    - operation:
+        paths: ["/admin/*"]
+
+ +
+
diff --git a/vendor/istio.io/api/security/v1/authorization_policy.proto b/vendor/istio.io/api/security/v1/authorization_policy.proto new file mode 100644 index 000000000..1e432e45a --- /dev/null +++ b/vendor/istio.io/api/security/v1/authorization_policy.proto @@ -0,0 +1,516 @@ +// Copyright 2019 Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +syntax = "proto3"; + +import "google/api/field_behavior.proto"; +import "type/v1beta1/selector.proto"; + +// $schema: istio.security.v1.AuthorizationPolicy +// $title: Authorization Policy +// $description: Configuration for access control on workloads. +// $location: https://istio.io/docs/reference/config/security/authorization-policy.html +// $weight: 20 +// $aliases: [/docs/reference/config/authorization/authorization-policy] + +// Istio Authorization Policy enables access control on workloads in the mesh. +// +// Authorization policy supports CUSTOM, DENY and ALLOW actions for access control. When CUSTOM, DENY and ALLOW actions +// are used for a workload at the same time, the CUSTOM action is evaluated first, then the DENY action, and finally the ALLOW action. +// The evaluation is determined by the following rules: +// +// 1. If there are any CUSTOM policies that match the request, evaluate and deny the request if the evaluation result is deny. +// 2. If there are any DENY policies that match the request, deny the request. +// 3. If there are no ALLOW policies for the workload, allow the request. +// 4. If any of the ALLOW policies match the request, allow the request. +// 5. Deny the request. +// +// Istio Authorization Policy also supports the AUDIT action to decide whether to log requests. +// AUDIT policies do not affect whether requests are allowed or denied to the workload. +// Requests will be allowed or denied based solely on CUSTOM, DENY and ALLOW actions. +// +// A request will be internally marked that it should be audited if there is an AUDIT policy on the workload that matches the request. +// A separate plugin must be configured and enabled to actually fulfill the audit decision and complete the audit behavior. +// The request will not be audited if there are no such supporting plugins enabled. +// Currently, the only supported plugin is the [Stackdriver](https://istio.io/latest/docs/reference/config/proxy_extensions/stackdriver/) plugin. +// +// Here is an example of Istio Authorization Policy: +// +// It sets the `action` to `ALLOW` to create an allow policy. The default action is `ALLOW` +// but it is useful to be explicit in the policy. +// +// It allows requests from: +// +// - service account `cluster.local/ns/default/sa/sleep` or +// - namespace `test` +// +// to access the workload with: +// +// - `GET` method at paths of prefix `/info` or, +// - `POST` method at path `/data`. +// +// when the request has a valid JWT token issued by `https://accounts.google.com`. +// +// Any other requests will be denied. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// action: ALLOW +// rules: +// - from: +// - source: +// principals: ["cluster.local/ns/default/sa/sleep"] +// - source: +// namespaces: ["test"] +// to: +// - operation: +// methods: ["GET"] +// paths: ["/info*"] +// - operation: +// methods: ["POST"] +// paths: ["/data"] +// when: +// - key: request.auth.claims[iss] +// values: ["https://accounts.google.com"] +// ``` +// +// The following is another example that sets `action` to `DENY` to create a deny policy. +// It denies requests from the `dev` namespace to the `POST` method on all workloads +// in the `foo` namespace. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// action: DENY +// rules: +// - from: +// - source: +// namespaces: ["dev"] +// to: +// - operation: +// methods: ["POST"] +// ``` +// +// The following is another example that sets `action` to `DENY` to create a deny policy. +// It denies all the requests with `POST` method on port `8080` on all workloads +// in the `foo` namespace. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizaionPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// action: DENY +// rules: +// - to: +// - operation: +// methods: ["POST"] +// ports: ["8080"] +// ``` +// +// When this rule is applied to TCP traffic, the `method` field (as will all HTTP based attributes) cannot be processed. +// For a `DENY` rule, missing attributes are treated as matches. This means all TCP traffic on port `8080` would be denied in the example above. +// If we were to remove the `ports` match, all TCP traffic would be denied. As a result, it is recommended to always scope `DENY` policies to a specific port, +// especially when using HTTP attributes [Authorization Policy for TCP Ports](https://istio.io/latest/docs/tasks/security/authorization/authz-tcp/). +// +// The following authorization policy sets the `action` to `AUDIT`. It will audit any GET requests to the path with the +// prefix `/user/profile`. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// namespace: ns1 +// name: anyname +// spec: +// selector: +// matchLabels: +// app: myapi +// action: AUDIT +// rules: +// - to: +// - operation: +// methods: ["GET"] +// paths: ["/user/profile/*"] +// ``` +// +// Authorization Policy scope (target) is determined by "metadata/namespace" and +// an optional `selector`. +// +// - "metadata/namespace" tells which namespace the policy applies. If set to root +// namespace, the policy applies to all namespaces in a mesh. +// - workload `selector` can be used to further restrict where a policy applies. +// +// For example, the following authorization policy applies to all workloads in namespace `foo`. It allows nothing and effectively denies +// all requests to workloads in namespace `foo`. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: allow-nothing +// namespace: foo +// spec: +// {} +// ``` +// +// The following authorization policy allows all requests to workloads in namespace `foo`. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: allow-all +// namespace: foo +// spec: +// rules: +// - {} +// ``` +// +// The following authorization policy applies to workloads containing label `app: httpbin` in namespace `bar`. It allows +// nothing and effectively denies all requests to the selected workloads. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: allow-nothing +// namespace: bar +// spec: +// selector: +// matchLabels: +// app: httpbin +// ``` +// +// The following authorization policy applies to workloads containing label `version: v1` in all namespaces in the mesh. +// (Assuming the root namespace is configured to `istio-system`). +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: allow-nothing +// namespace: istio-system +// spec: +// selector: +// matchLabels: +// version: v1 +// ``` +// +// The following example shows you how to set up an authorization policy using an [experimental annotation](https://istio.io/latest/docs/reference/config/annotations/) +// `istio.io/dry-run` to dry-run the policy without actually enforcing it. +// +// The dry-run annotation allows you to better understand the effect of an authorization policy before applying it to the production traffic. +// This helps to reduce the risk of breaking the production traffic caused by an incorrect authorization policy. +// For more information, see [dry-run tasks](https://istio.io/latest/docs/tasks/security/authorization/authz-dry-run/). +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: dry-run-example +// annotations: +// "istio.io/dry-run": "true" +// spec: +// selector: +// matchLabels: +// app: httpbin +// action: DENY +// rules: +// - to: +// - operation: +// paths: ["/headers"] +// ``` +package istio.security.v1; + +option go_package="istio.io/api/security/v1"; + +// AuthorizationPolicy enables access control on workloads. +// +// +// +// +// +message AuthorizationPolicy { + // Optional. The selector decides where to apply the authorization policy. The selector will match with workloads + // in the same namespace as the authorization policy. If the authorization policy is in the root namespace, the selector + // will additionally match with workloads in all namespaces. + // + // If not set, the selector will match all workloads. + istio.type.v1beta1.WorkloadSelector selector = 1; + + // Optional. A list of rules to match the request. A match occurs when at least one rule matches the request. + // + // If not set, the match will never occur. This is equivalent to setting a default of deny for the target workloads if + // the action is ALLOW. + repeated Rule rules = 2; + + // Action specifies the operation to take. + enum Action { + // Allow a request only if it matches the rules. This is the default type. + ALLOW = 0; + + // Deny a request if it matches any of the rules. + DENY = 1; + + // Audit a request if it matches any of the rules. + AUDIT = 2; + + // $hide_from_docs + // Audit policy decisions can be read by telemetry plugins using the function getAuditPolicy + // defined [here](https://github.com/istio/proxy/blob/master/extensions/common/context.h). + + // The CUSTOM action allows an extension to handle the user request if the matching rules evaluate to true. + // The extension is evaluated independently and before the native ALLOW and DENY actions. When used together, A request + // is allowed if and only if all the actions return allow, in other words, the extension cannot bypass the + // authorization decision made by ALLOW and DENY action. + // Extension behavior is defined by the named providers declared in MeshConfig. The authorization policy refers to + // the extension by specifying the name of the provider. + // One example use case of the extension is to integrate with a custom external authorization system to delegate + // the authorization decision to it. + // + // Note: The CUSTOM action is currently an **alpha feature** and is subject to breaking changes in later versions. + // + // The following authorization policy applies to an ingress gateway and delegates the authorization check to a named extension + // "my-custom-authz" if the request path has prefix "/admin/". + // + // ```yaml + // apiVersion: security.istio.io/v1beta1 + // kind: AuthorizationPolicy + // metadata: + // name: ext-authz + // namespace: istio-system + // spec: + // selector: + // matchLabels: + // app: istio-ingressgateway + // action: CUSTOM + // provider: + // name: "my-custom-authz" + // rules: + // - to: + // - operation: + // paths: ["/admin/*"] + // ``` + CUSTOM = 3; + } + + // Optional. The action to take if the request is matched with the rules. Default is ALLOW if not specified. + Action action = 3; + + message ExtensionProvider { + // Specifies the name of the extension provider. The list of available providers is defined in the MeshConfig. + // Note, currently at most 1 extension provider is allowed per workload. Different workloads can use different extension provider. + string name = 1; + } + + oneof action_detail { + // Specifies detailed configuration of the CUSTOM action. Must be used only with CUSTOM action. + ExtensionProvider provider = 4; + } +} + +// Rule matches requests from a list of sources that perform a list of operations subject to a +// list of conditions. A match occurs when at least one source, one operation and all conditions +// matches the request. An empty rule is always matched. +// +// Any string field in the rule supports Exact, Prefix, Suffix and Presence match: +// +// - Exact match: "abc" will match on value "abc". +// - Prefix match: "abc*" will match on value "abc" and "abcd". +// - Suffix match: "*abc" will match on value "abc" and "xabc". +// - Presence match: "*" will match when value is not empty. +message Rule { + // From includes a list of sources. + message From { + // Source specifies the source of a request. + Source source = 1; + } + + // Optional. from specifies the source of a request. + // + // If not set, any source is allowed. + repeated From from = 1; + + // To includes a list of operations. + message To { + // Operation specifies the operation of a request. + Operation operation = 1; + } + + // Optional. to specifies the operation of a request. + // + // If not set, any operation is allowed. + repeated To to = 2; + + // Optional. when specifies a list of additional conditions of a request. + // + // If not set, any condition is allowed. + repeated Condition when = 3; +} + +// Source specifies the source identities of a request. Fields in the source are +// ANDed together. +// +// For example, the following source matches if the principal is "admin" or "dev" +// and the namespace is "prod" or "test" and the ip is not "203.0.113.4". +// +// ```yaml +// principals: ["admin", "dev"] +// namespaces: ["prod", "test"] +// notIpBlocks: ["203.0.113.4"] +// ``` +message Source { + // Optional. A list of peer identities derived from the peer certificate. The peer identity is in the format of + // `"/ns//sa/"`, for example, `"cluster.local/ns/default/sa/productpage"`. + // This field requires mTLS enabled and is the same as the `source.principal` attribute. + // + // If not set, any principal is allowed. + repeated string principals = 1; + + // Optional. A list of negative match of peer identities. + repeated string not_principals = 5; + + // Optional. A list of request identities derived from the JWT. The request identity is in the format of + // `"/"`, for example, `"example.com/sub-1"`. This field requires request authentication enabled and is the + // same as the `request.auth.principal` attribute. + // + // If not set, any request principal is allowed. + repeated string request_principals = 2; + + // Optional. A list of negative match of request identities. + repeated string not_request_principals = 6; + + // Optional. A list of namespaces derived from the peer certificate. + // This field requires mTLS enabled and is the same as the `source.namespace` attribute. + // + // If not set, any namespace is allowed. + repeated string namespaces = 3; + + // Optional. A list of negative match of namespaces. + repeated string not_namespaces = 7; + + // Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. "203.0.113.4") and + // CIDR (e.g. "203.0.113.0/24") are supported. This is the same as the `source.ip` attribute. + // + // If not set, any IP is allowed. + repeated string ip_blocks = 4; + + // Optional. A list of negative match of IP blocks. + repeated string not_ip_blocks = 8; + + // Optional. A list of IP blocks, populated from X-Forwarded-For header or proxy protocol. + // To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig + // when you install Istio or using an annotation on the ingress gateway. See the documentation here: + // [Configuring Gateway Network Topology](https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/). + // Single IP (e.g. "203.0.113.4") and CIDR (e.g. "203.0.113.0/24") are supported. + // This is the same as the `remote.ip` attribute. + // + // If not set, any IP is allowed. + repeated string remote_ip_blocks = 9; + + // Optional. A list of negative match of remote IP blocks. + repeated string not_remote_ip_blocks = 10; +} + +// Operation specifies the operations of a request. Fields in the operation are +// ANDed together. +// +// For example, the following operation matches if the host has suffix ".example.com" +// and the method is "GET" or "HEAD" and the path doesn't have prefix "/admin". +// +// ```yaml +// hosts: ["*.example.com"] +// methods: ["GET", "HEAD"] +// notPaths: ["/admin*"] +// ``` +message Operation { + // Optional. A list of hosts as specified in the HTTP request. The match is case-insensitive. + // See the [security best practices](https://istio.io/latest/docs/ops/best-practices/security/#writing-host-match-policies) for + // recommended usage of this field. + // + // If not set, any host is allowed. Must be used only with HTTP. + repeated string hosts = 1; + + // Optional. A list of negative match of hosts as specified in the HTTP request. The match is case-insensitive. + repeated string not_hosts = 5; + + // Optional. A list of ports as specified in the connection. + // + // If not set, any port is allowed. + repeated string ports = 2; + + // Optional. A list of negative match of ports as specified in the connection. + repeated string not_ports = 6; + + // Optional. A list of methods as specified in the HTTP request. + // For gRPC service, this will always be "POST". + // + // If not set, any method is allowed. Must be used only with HTTP. + repeated string methods = 3; + + // Optional. A list of negative match of methods as specified in the HTTP request. + repeated string not_methods = 7; + + // Optional. A list of paths as specified in the HTTP request. See the [Authorization Policy Normalization](https://istio.io/latest/docs/reference/config/security/normalization/) + // for details of the path normalization. + // For gRPC service, this will be the fully-qualified name in the form of "/package.service/method". + // + // If not set, any path is allowed. Must be used only with HTTP. + repeated string paths = 4; + + // Optional. A list of negative match of paths. + repeated string not_paths = 8; +} + +// Condition specifies additional required attributes. +message Condition { + // The name of an Istio attribute. + // See the [full list of supported attributes](https://istio.io/docs/reference/config/security/conditions/). + string key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A list of allowed values for the attribute. + // Note: at least one of values or not_values must be set. + repeated string values = 2; + + // Optional. A list of negative match of values for the attribute. + // Note: at least one of values or not_values must be set. + repeated string not_values = 3; +} diff --git a/vendor/istio.io/api/security/v1/authorization_policy_deepcopy.gen.go b/vendor/istio.io/api/security/v1/authorization_policy_deepcopy.gen.go new file mode 100644 index 000000000..f5f79746e --- /dev/null +++ b/vendor/istio.io/api/security/v1/authorization_policy_deepcopy.gen.go @@ -0,0 +1,174 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package v1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using AuthorizationPolicy within kubernetes types, where deepcopy-gen is used. +func (in *AuthorizationPolicy) DeepCopyInto(out *AuthorizationPolicy) { + p := proto.Clone(in).(*AuthorizationPolicy) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicy. Required by controller-gen. +func (in *AuthorizationPolicy) DeepCopy() *AuthorizationPolicy { + if in == nil { + return nil + } + out := new(AuthorizationPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicy. Required by controller-gen. +func (in *AuthorizationPolicy) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using AuthorizationPolicy_ExtensionProvider within kubernetes types, where deepcopy-gen is used. +func (in *AuthorizationPolicy_ExtensionProvider) DeepCopyInto(out *AuthorizationPolicy_ExtensionProvider) { + p := proto.Clone(in).(*AuthorizationPolicy_ExtensionProvider) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicy_ExtensionProvider. Required by controller-gen. +func (in *AuthorizationPolicy_ExtensionProvider) DeepCopy() *AuthorizationPolicy_ExtensionProvider { + if in == nil { + return nil + } + out := new(AuthorizationPolicy_ExtensionProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicy_ExtensionProvider. Required by controller-gen. +func (in *AuthorizationPolicy_ExtensionProvider) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Rule within kubernetes types, where deepcopy-gen is used. +func (in *Rule) DeepCopyInto(out *Rule) { + p := proto.Clone(in).(*Rule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule. Required by controller-gen. +func (in *Rule) DeepCopy() *Rule { + if in == nil { + return nil + } + out := new(Rule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Rule. Required by controller-gen. +func (in *Rule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Rule_From within kubernetes types, where deepcopy-gen is used. +func (in *Rule_From) DeepCopyInto(out *Rule_From) { + p := proto.Clone(in).(*Rule_From) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule_From. Required by controller-gen. +func (in *Rule_From) DeepCopy() *Rule_From { + if in == nil { + return nil + } + out := new(Rule_From) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Rule_From. Required by controller-gen. +func (in *Rule_From) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Rule_To within kubernetes types, where deepcopy-gen is used. +func (in *Rule_To) DeepCopyInto(out *Rule_To) { + p := proto.Clone(in).(*Rule_To) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule_To. Required by controller-gen. +func (in *Rule_To) DeepCopy() *Rule_To { + if in == nil { + return nil + } + out := new(Rule_To) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Rule_To. Required by controller-gen. +func (in *Rule_To) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Source within kubernetes types, where deepcopy-gen is used. +func (in *Source) DeepCopyInto(out *Source) { + p := proto.Clone(in).(*Source) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Source. Required by controller-gen. +func (in *Source) DeepCopy() *Source { + if in == nil { + return nil + } + out := new(Source) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Source. Required by controller-gen. +func (in *Source) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Operation within kubernetes types, where deepcopy-gen is used. +func (in *Operation) DeepCopyInto(out *Operation) { + p := proto.Clone(in).(*Operation) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation. Required by controller-gen. +func (in *Operation) DeepCopy() *Operation { + if in == nil { + return nil + } + out := new(Operation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Operation. Required by controller-gen. +func (in *Operation) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using Condition within kubernetes types, where deepcopy-gen is used. +func (in *Condition) DeepCopyInto(out *Condition) { + p := proto.Clone(in).(*Condition) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. Required by controller-gen. +func (in *Condition) DeepCopy() *Condition { + if in == nil { + return nil + } + out := new(Condition) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Condition. Required by controller-gen. +func (in *Condition) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/vendor/istio.io/api/security/v1/authorization_policy_json.gen.go b/vendor/istio.io/api/security/v1/authorization_policy_json.gen.go new file mode 100644 index 000000000..168c233fd --- /dev/null +++ b/vendor/istio.io/api/security/v1/authorization_policy_json.gen.go @@ -0,0 +1,100 @@ +// Code generated by protoc-gen-jsonshim. DO NOT EDIT. +package v1 + +import ( + bytes "bytes" + jsonpb "github.com/golang/protobuf/jsonpb" +) + +// MarshalJSON is a custom marshaler for AuthorizationPolicy +func (this *AuthorizationPolicy) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AuthorizationPolicy +func (this *AuthorizationPolicy) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for AuthorizationPolicy_ExtensionProvider +func (this *AuthorizationPolicy_ExtensionProvider) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for AuthorizationPolicy_ExtensionProvider +func (this *AuthorizationPolicy_ExtensionProvider) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for Rule +func (this *Rule) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Rule +func (this *Rule) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for Rule_From +func (this *Rule_From) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Rule_From +func (this *Rule_From) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for Rule_To +func (this *Rule_To) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Rule_To +func (this *Rule_To) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for Source +func (this *Source) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Source +func (this *Source) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for Operation +func (this *Operation) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Operation +func (this *Operation) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for Condition +func (this *Condition) MarshalJSON() ([]byte, error) { + str, err := AuthorizationPolicyMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for Condition +func (this *Condition) UnmarshalJSON(b []byte) error { + return AuthorizationPolicyUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +var ( + AuthorizationPolicyMarshaler = &jsonpb.Marshaler{} + AuthorizationPolicyUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true} +) diff --git a/vendor/istio.io/api/security/v1/jwt.pb.go b/vendor/istio.io/api/security/v1/jwt.pb.go new file mode 100644 index 000000000..a31f63d54 --- /dev/null +++ b/vendor/istio.io/api/security/v1/jwt.pb.go @@ -0,0 +1,522 @@ +// Copyright 2022 Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: security/v1/jwt.proto + +// $schema: istio.security.v1.JWTRule +// $title: JWTRule +// $description: Configuration to validate JWT. +// $location: https://istio.io/docs/reference/config/security/jwt.html +// $aliases: [/docs/reference/config/security/v1/jwt] + +package v1 + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// +// JSON Web Token (JWT) token format for authentication as defined by +// [RFC 7519](https://tools.ietf.org/html/rfc7519). See [OAuth 2.0](https://tools.ietf.org/html/rfc6749) and +// [OIDC 1.0](http://openid.net/connect) for how this is used in the whole +// authentication flow. +// +// Examples: +// +// Spec for a JWT that is issued by `https://example.com`, with the audience claims must be either +// `bookstore_android.apps.example.com` or `bookstore_web.apps.example.com`. +// The token should be presented at the `Authorization` header (default). The JSON Web Key Set (JWKS) +// will be discovered following OpenID Connect protocol. +// +// ```yaml +// issuer: https://example.com +// audiences: +// - bookstore_android.apps.example.com +// bookstore_web.apps.example.com +// +// ``` +// +// This example specifies a token in a non-default location (`x-goog-iap-jwt-assertion` header). It also +// defines the URI to fetch JWKS explicitly. +// +// ```yaml +// issuer: https://example.com +// jwksUri: https://example.com/.secret/jwks.json +// fromHeaders: +// - "x-goog-iap-jwt-assertion" +// ``` +type JWTRule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Identifies the issuer that issued the JWT. See + // [issuer](https://tools.ietf.org/html/rfc7519#section-4.1.1) + // A JWT with different `iss` claim will be rejected. + // + // Example: `https://foobar.auth0.com` + // Example: `1234567-compute@developer.gserviceaccount.com` + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + // The list of JWT + // [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3) + // that are allowed to access. A JWT containing any of these + // audiences will be accepted. + // + // The service name will be accepted if audiences is empty. + // + // Example: + // + // ```yaml + // audiences: + // - bookstore_android.apps.example.com + // bookstore_web.apps.example.com + // + // ``` + Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"` + // URL of the provider's public key set to validate signature of the + // JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + // + // Optional if the key set document can either (a) be retrieved from + // [OpenID + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of + // the issuer or (b) inferred from the email domain of the issuer (e.g. a + // Google service account). + // + // Example: `https://www.googleapis.com/oauth2/v1/certs` + // + // Note: Only one of `jwksUri` and `jwks` should be used. + JwksUri string `protobuf:"bytes,3,opt,name=jwks_uri,json=jwksUri,proto3" json:"jwks_uri,omitempty"` + // JSON Web Key Set of public keys to validate signature of the JWT. + // See https://auth0.com/docs/jwks. + // + // Note: Only one of `jwksUri` and `jwks` should be used. + Jwks string `protobuf:"bytes,10,opt,name=jwks,proto3" json:"jwks,omitempty"` + // List of header locations from which JWT is expected. For example, below is the location spec + // if JWT is expected to be found in `x-jwt-assertion` header, and have `Bearer` prefix: + // + // ```yaml + // + // fromHeaders: + // - name: x-jwt-assertion + // prefix: "Bearer " + // + // ``` + // + // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of + // such requests is undefined. + FromHeaders []*JWTHeader `protobuf:"bytes,6,rep,name=from_headers,json=fromHeaders,proto3" json:"from_headers,omitempty"` + // List of query parameters from which JWT is expected. For example, if JWT is provided via query + // parameter `my_token` (e.g `/path?my_token=`), the config is: + // + // ```yaml + // + // fromParams: + // - "my_token" + // + // ``` + // + // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of + // such requests is undefined. + FromParams []string `protobuf:"bytes,7,rep,name=from_params,json=fromParams,proto3" json:"from_params,omitempty"` + // This field specifies the header name to output a successfully verified JWT payload to the + // backend. The forwarded data is `base64_encoded(jwt_payload_in_JSON)`. If it is not specified, + // the payload will not be emitted. + OutputPayloadToHeader string `protobuf:"bytes,8,opt,name=output_payload_to_header,json=outputPayloadToHeader,proto3" json:"output_payload_to_header,omitempty"` + // If set to true, the original token will be kept for the upstream request. Default is false. + ForwardOriginalToken bool `protobuf:"varint,9,opt,name=forward_original_token,json=forwardOriginalToken,proto3" json:"forward_original_token,omitempty"` + // This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. + // This differs from the `output_payload_to_header` by allowing outputting individual claims instead of the whole payload. + // The header specified in each operation in the list must be unique. Nested claims of type string/int/bool is supported as well. + // ``` + // + // outputClaimToHeaders: + // - header: x-my-company-jwt-group + // claim: my-group + // - header: x-test-environment-flag + // claim: test-flag + // - header: x-jwt-claim-group + // claim: nested.key.group + // + // ``` + // [Experimental] This feature is a experimental feature. + OutputClaimToHeaders []*ClaimToHeader `protobuf:"bytes,11,rep,name=output_claim_to_headers,json=outputClaimToHeaders,proto3" json:"output_claim_to_headers,omitempty"` // [TODO:Update the status whenever this feature is promoted.] +} + +func (x *JWTRule) Reset() { + *x = JWTRule{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_jwt_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JWTRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JWTRule) ProtoMessage() {} + +func (x *JWTRule) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_jwt_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JWTRule.ProtoReflect.Descriptor instead. +func (*JWTRule) Descriptor() ([]byte, []int) { + return file_security_v1_jwt_proto_rawDescGZIP(), []int{0} +} + +func (x *JWTRule) GetIssuer() string { + if x != nil { + return x.Issuer + } + return "" +} + +func (x *JWTRule) GetAudiences() []string { + if x != nil { + return x.Audiences + } + return nil +} + +func (x *JWTRule) GetJwksUri() string { + if x != nil { + return x.JwksUri + } + return "" +} + +func (x *JWTRule) GetJwks() string { + if x != nil { + return x.Jwks + } + return "" +} + +func (x *JWTRule) GetFromHeaders() []*JWTHeader { + if x != nil { + return x.FromHeaders + } + return nil +} + +func (x *JWTRule) GetFromParams() []string { + if x != nil { + return x.FromParams + } + return nil +} + +func (x *JWTRule) GetOutputPayloadToHeader() string { + if x != nil { + return x.OutputPayloadToHeader + } + return "" +} + +func (x *JWTRule) GetForwardOriginalToken() bool { + if x != nil { + return x.ForwardOriginalToken + } + return false +} + +func (x *JWTRule) GetOutputClaimToHeaders() []*ClaimToHeader { + if x != nil { + return x.OutputClaimToHeaders + } + return nil +} + +// This message specifies a header location to extract JWT token. +type JWTHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The HTTP header name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // The prefix that should be stripped before decoding the token. + // For example, for `Authorization: Bearer `, prefix=`Bearer` with a space at the end. + // If the header doesn't have this exact prefix, it is considered invalid. + Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` +} + +func (x *JWTHeader) Reset() { + *x = JWTHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_jwt_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *JWTHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*JWTHeader) ProtoMessage() {} + +func (x *JWTHeader) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_jwt_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use JWTHeader.ProtoReflect.Descriptor instead. +func (*JWTHeader) Descriptor() ([]byte, []int) { + return file_security_v1_jwt_proto_rawDescGZIP(), []int{1} +} + +func (x *JWTHeader) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *JWTHeader) GetPrefix() string { + if x != nil { + return x.Prefix + } + return "" +} + +// This message specifies the detail for copying claim to header. +type ClaimToHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the header to be created. The header will be overridden if it already exists in the request. + Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The name of the claim to be copied from. Only claim of type string/int/bool is supported. + // The header will not be there if the claim does not exist or the type of the claim is not supported. + Claim string `protobuf:"bytes,2,opt,name=claim,proto3" json:"claim,omitempty"` +} + +func (x *ClaimToHeader) Reset() { + *x = ClaimToHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_jwt_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClaimToHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimToHeader) ProtoMessage() {} + +func (x *ClaimToHeader) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_jwt_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimToHeader.ProtoReflect.Descriptor instead. +func (*ClaimToHeader) Descriptor() ([]byte, []int) { + return file_security_v1_jwt_proto_rawDescGZIP(), []int{2} +} + +func (x *ClaimToHeader) GetHeader() string { + if x != nil { + return x.Header + } + return "" +} + +func (x *ClaimToHeader) GetClaim() string { + if x != nil { + return x.Claim + } + return "" +} + +var File_security_v1_jwt_proto protoreflect.FileDescriptor + +var file_security_v1_jwt_proto_rawDesc = []byte{ + 0x0a, 0x15, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x77, + 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, + 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9d, 0x03, 0x0a, 0x07, + 0x4a, 0x57, 0x54, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x69, 0x73, + 0x73, 0x75, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x77, 0x6b, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x77, 0x6b, 0x73, 0x55, 0x72, 0x69, 0x12, 0x12, 0x0a, + 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6a, 0x77, 0x6b, + 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, + 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x57, 0x54, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, + 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, + 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x66, 0x6f, + 0x72, 0x77, 0x61, 0x72, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x57, 0x0a, 0x17, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6c, 0x61, + 0x69, 0x6d, 0x5f, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, + 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x6f, 0x48, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, 0x3c, 0x0a, 0x09, 0x4a, + 0x57, 0x54, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x3d, 0x0a, 0x0d, 0x43, 0x6c, 0x61, + 0x69, 0x6d, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x1a, 0x5a, 0x18, 0x69, 0x73, 0x74, 0x69, + 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_security_v1_jwt_proto_rawDescOnce sync.Once + file_security_v1_jwt_proto_rawDescData = file_security_v1_jwt_proto_rawDesc +) + +func file_security_v1_jwt_proto_rawDescGZIP() []byte { + file_security_v1_jwt_proto_rawDescOnce.Do(func() { + file_security_v1_jwt_proto_rawDescData = protoimpl.X.CompressGZIP(file_security_v1_jwt_proto_rawDescData) + }) + return file_security_v1_jwt_proto_rawDescData +} + +var file_security_v1_jwt_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_security_v1_jwt_proto_goTypes = []interface{}{ + (*JWTRule)(nil), // 0: istio.security.v1.JWTRule + (*JWTHeader)(nil), // 1: istio.security.v1.JWTHeader + (*ClaimToHeader)(nil), // 2: istio.security.v1.ClaimToHeader +} +var file_security_v1_jwt_proto_depIdxs = []int32{ + 1, // 0: istio.security.v1.JWTRule.from_headers:type_name -> istio.security.v1.JWTHeader + 2, // 1: istio.security.v1.JWTRule.output_claim_to_headers:type_name -> istio.security.v1.ClaimToHeader + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_security_v1_jwt_proto_init() } +func file_security_v1_jwt_proto_init() { + if File_security_v1_jwt_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_security_v1_jwt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JWTRule); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_jwt_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JWTHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_security_v1_jwt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClaimToHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_security_v1_jwt_proto_rawDesc, + NumEnums: 0, + NumMessages: 3, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_security_v1_jwt_proto_goTypes, + DependencyIndexes: file_security_v1_jwt_proto_depIdxs, + MessageInfos: file_security_v1_jwt_proto_msgTypes, + }.Build() + File_security_v1_jwt_proto = out.File + file_security_v1_jwt_proto_rawDesc = nil + file_security_v1_jwt_proto_goTypes = nil + file_security_v1_jwt_proto_depIdxs = nil +} diff --git a/vendor/istio.io/api/security/v1/jwt.pb.html b/vendor/istio.io/api/security/v1/jwt.pb.html new file mode 100644 index 000000000..16d4eb44b --- /dev/null +++ b/vendor/istio.io/api/security/v1/jwt.pb.html @@ -0,0 +1,276 @@ +--- +title: JWTRule +description: Configuration to validate JWT. +location: https://istio.io/docs/reference/config/security/jwt.html +layout: protoc-gen-docs +generator: protoc-gen-docs +schema: istio.security.v1.JWTRule +aliases: [/docs/reference/config/security/v1/jwt] +number_of_entries: 3 +--- +

JWTRule

+
+

JSON Web Token (JWT) token format for authentication as defined by +RFC 7519. See OAuth 2.0 and +OIDC 1.0 for how this is used in the whole +authentication flow.

+

Examples:

+

Spec for a JWT that is issued by https://example.com, with the audience claims must be either +bookstore_android.apps.example.com or bookstore_web.apps.example.com. +The token should be presented at the Authorization header (default). The JSON Web Key Set (JWKS) +will be discovered following OpenID Connect protocol.

+
issuer: https://example.com
+audiences:
+- bookstore_android.apps.example.com
+  bookstore_web.apps.example.com
+
+

This example specifies a token in a non-default location (x-goog-iap-jwt-assertion header). It also +defines the URI to fetch JWKS explicitly.

+
issuer: https://example.com
+jwksUri: https://example.com/.secret/jwks.json
+fromHeaders:
+- "x-goog-iap-jwt-assertion"
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
issuerstring +

Identifies the issuer that issued the JWT. See +issuer +A JWT with different iss claim will be rejected.

+

Example: https://foobar.auth0.com +Example: 1234567-compute@developer.gserviceaccount.com

+ +
+Yes +
audiencesstring[] +

The list of JWT +audiences +that are allowed to access. A JWT containing any of these +audiences will be accepted.

+

The service name will be accepted if audiences is empty.

+

Example:

+
audiences:
+- bookstore_android.apps.example.com
+  bookstore_web.apps.example.com
+
+ +
+No +
jwksUristring +

URL of the provider’s public key set to validate signature of the +JWT. See OpenID Discovery.

+

Optional if the key set document can either (a) be retrieved from +OpenID +Discovery of +the issuer or (b) inferred from the email domain of the issuer (e.g. a +Google service account).

+

Example: https://www.googleapis.com/oauth2/v1/certs

+

Note: Only one of jwksUri and jwks should be used.

+ +
+No +
jwksstring +

JSON Web Key Set of public keys to validate signature of the JWT. +See https://auth0.com/docs/jwks.

+

Note: Only one of jwksUri and jwks should be used.

+ +
+No +
fromHeadersJWTHeader[] +

List of header locations from which JWT is expected. For example, below is the location spec +if JWT is expected to be found in x-jwt-assertion header, and have Bearer prefix:

+
  fromHeaders:
+  - name: x-jwt-assertion
+    prefix: "Bearer "
+
+

Note: Requests with multiple tokens (at different locations) are not supported, the output principal of +such requests is undefined.

+ +
+No +
fromParamsstring[] +

List of query parameters from which JWT is expected. For example, if JWT is provided via query +parameter my_token (e.g /path?my_token=<JWT>), the config is:

+
  fromParams:
+  - "my_token"
+
+

Note: Requests with multiple tokens (at different locations) are not supported, the output principal of +such requests is undefined.

+ +
+No +
outputPayloadToHeaderstring +

This field specifies the header name to output a successfully verified JWT payload to the +backend. The forwarded data is base64_encoded(jwt_payload_in_JSON). If it is not specified, +the payload will not be emitted.

+ +
+No +
forwardOriginalTokenbool +

If set to true, the original token will be kept for the upstream request. Default is false.

+ +
+No +
outputClaimToHeadersClaimToHeader[] +

This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. +This differs from the output_payload_to_header by allowing outputting individual claims instead of the whole payload. +The header specified in each operation in the list must be unique. Nested claims of type string/int/bool is supported as well.

+
  outputClaimToHeaders:
+  - header: x-my-company-jwt-group
+    claim: my-group
+  - header: x-test-environment-flag
+    claim: test-flag
+  - header: x-jwt-claim-group
+    claim: nested.key.group
+
+

[Experimental] This feature is a experimental feature.

+ +
+No +
+
+

JWTHeader

+
+

This message specifies a header location to extract JWT token.

+ + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
namestring +

The HTTP header name.

+ +
+Yes +
prefixstring +

The prefix that should be stripped before decoding the token. +For example, for Authorization: Bearer <token>, prefix=Bearer with a space at the end. +If the header doesn’t have this exact prefix, it is considered invalid.

+ +
+No +
+
+

ClaimToHeader

+
+

This message specifies the detail for copying claim to header.

+ + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
headerstring +

The name of the header to be created. The header will be overridden if it already exists in the request.

+ +
+No +
claimstring +

The name of the claim to be copied from. Only claim of type string/int/bool is supported. +The header will not be there if the claim does not exist or the type of the claim is not supported.

+ +
+No +
+
diff --git a/vendor/istio.io/api/security/v1/jwt.proto b/vendor/istio.io/api/security/v1/jwt.proto new file mode 100644 index 000000000..c75648620 --- /dev/null +++ b/vendor/istio.io/api/security/v1/jwt.proto @@ -0,0 +1,186 @@ +// Copyright 2022 Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +syntax = "proto3"; + +import "google/api/field_behavior.proto"; + +// $schema: istio.security.v1.JWTRule +// $title: JWTRule +// $description: Configuration to validate JWT. +// $location: https://istio.io/docs/reference/config/security/jwt.html +// $aliases: [/docs/reference/config/security/v1/jwt] + +package istio.security.v1; + +option go_package="istio.io/api/security/v1"; + +// +// JSON Web Token (JWT) token format for authentication as defined by +// [RFC 7519](https://tools.ietf.org/html/rfc7519). See [OAuth 2.0](https://tools.ietf.org/html/rfc6749) and +// [OIDC 1.0](http://openid.net/connect) for how this is used in the whole +// authentication flow. +// +// Examples: +// +// Spec for a JWT that is issued by `https://example.com`, with the audience claims must be either +// `bookstore_android.apps.example.com` or `bookstore_web.apps.example.com`. +// The token should be presented at the `Authorization` header (default). The JSON Web Key Set (JWKS) +// will be discovered following OpenID Connect protocol. +// +// ```yaml +// issuer: https://example.com +// audiences: +// - bookstore_android.apps.example.com +// bookstore_web.apps.example.com +// ``` +// +// This example specifies a token in a non-default location (`x-goog-iap-jwt-assertion` header). It also +// defines the URI to fetch JWKS explicitly. +// +// ```yaml +// issuer: https://example.com +// jwksUri: https://example.com/.secret/jwks.json +// fromHeaders: +// - "x-goog-iap-jwt-assertion" +// ``` +message JWTRule { + // Identifies the issuer that issued the JWT. See + // [issuer](https://tools.ietf.org/html/rfc7519#section-4.1.1) + // A JWT with different `iss` claim will be rejected. + // + // Example: `https://foobar.auth0.com` + // Example: `1234567-compute@developer.gserviceaccount.com` + string issuer = 1 [(google.api.field_behavior) = REQUIRED]; + + // The list of JWT + // [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3) + // that are allowed to access. A JWT containing any of these + // audiences will be accepted. + // + // The service name will be accepted if audiences is empty. + // + // Example: + // + // ```yaml + // audiences: + // - bookstore_android.apps.example.com + // bookstore_web.apps.example.com + // ``` + repeated string audiences = 2; + + // URL of the provider's public key set to validate signature of the + // JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + // + // Optional if the key set document can either (a) be retrieved from + // [OpenID + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of + // the issuer or (b) inferred from the email domain of the issuer (e.g. a + // Google service account). + // + // Example: `https://www.googleapis.com/oauth2/v1/certs` + // + // Note: Only one of `jwksUri` and `jwks` should be used. + string jwks_uri = 3; + + // JSON Web Key Set of public keys to validate signature of the JWT. + // See https://auth0.com/docs/jwks. + // + // Note: Only one of `jwksUri` and `jwks` should be used. + string jwks = 10; + + // The next two fields define how to extract the JWT from an HTTP request. + // + // If no explicit location is specified the following default + // locations are tried in order: + // + // 1) The Authorization header using the Bearer schema, + // e.g. Authorization: Bearer . (see + // [Authorization Request Header + // Field](https://tools.ietf.org/html/rfc6750#section-2.1)) + // + // 2) The `access_token` query parameter (see + // [URI Query Parameter](https://tools.ietf.org/html/rfc6750#section-2.3)) + + // List of header locations from which JWT is expected. For example, below is the location spec + // if JWT is expected to be found in `x-jwt-assertion` header, and have `Bearer` prefix: + // + // ```yaml + // fromHeaders: + // - name: x-jwt-assertion + // prefix: "Bearer " + // ``` + // + // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of + // such requests is undefined. + repeated JWTHeader from_headers = 6; + + // List of query parameters from which JWT is expected. For example, if JWT is provided via query + // parameter `my_token` (e.g `/path?my_token=`), the config is: + // + // ```yaml + // fromParams: + // - "my_token" + // ``` + // + // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of + // such requests is undefined. + repeated string from_params = 7; + + // This field specifies the header name to output a successfully verified JWT payload to the + // backend. The forwarded data is `base64_encoded(jwt_payload_in_JSON)`. If it is not specified, + // the payload will not be emitted. + string output_payload_to_header = 8; + + // If set to true, the original token will be kept for the upstream request. Default is false. + bool forward_original_token = 9; + + + // This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. + // This differs from the `output_payload_to_header` by allowing outputting individual claims instead of the whole payload. + // The header specified in each operation in the list must be unique. Nested claims of type string/int/bool is supported as well. + // ``` + // outputClaimToHeaders: + // - header: x-my-company-jwt-group + // claim: my-group + // - header: x-test-environment-flag + // claim: test-flag + // - header: x-jwt-claim-group + // claim: nested.key.group + // ``` + // [Experimental] This feature is a experimental feature. + repeated ClaimToHeader output_claim_to_headers = 11; // [TODO:Update the status whenever this feature is promoted.] +} + +// This message specifies a header location to extract JWT token. +message JWTHeader { + // The HTTP header name. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The prefix that should be stripped before decoding the token. + // For example, for `Authorization: Bearer `, prefix=`Bearer` with a space at the end. + // If the header doesn't have this exact prefix, it is considered invalid. + string prefix = 2; +} + +// This message specifies the detail for copying claim to header. +message ClaimToHeader { + // The name of the header to be created. The header will be overridden if it already exists in the request. + string header = 1; + + // The name of the claim to be copied from. Only claim of type string/int/bool is supported. + // The header will not be there if the claim does not exist or the type of the claim is not supported. + string claim = 2; +} diff --git a/vendor/istio.io/api/security/v1/jwt_deepcopy.gen.go b/vendor/istio.io/api/security/v1/jwt_deepcopy.gen.go new file mode 100644 index 000000000..8f44c7b55 --- /dev/null +++ b/vendor/istio.io/api/security/v1/jwt_deepcopy.gen.go @@ -0,0 +1,69 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package v1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using JWTRule within kubernetes types, where deepcopy-gen is used. +func (in *JWTRule) DeepCopyInto(out *JWTRule) { + p := proto.Clone(in).(*JWTRule) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTRule. Required by controller-gen. +func (in *JWTRule) DeepCopy() *JWTRule { + if in == nil { + return nil + } + out := new(JWTRule) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new JWTRule. Required by controller-gen. +func (in *JWTRule) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using JWTHeader within kubernetes types, where deepcopy-gen is used. +func (in *JWTHeader) DeepCopyInto(out *JWTHeader) { + p := proto.Clone(in).(*JWTHeader) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JWTHeader. Required by controller-gen. +func (in *JWTHeader) DeepCopy() *JWTHeader { + if in == nil { + return nil + } + out := new(JWTHeader) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new JWTHeader. Required by controller-gen. +func (in *JWTHeader) DeepCopyInterface() interface{} { + return in.DeepCopy() +} + +// DeepCopyInto supports using ClaimToHeader within kubernetes types, where deepcopy-gen is used. +func (in *ClaimToHeader) DeepCopyInto(out *ClaimToHeader) { + p := proto.Clone(in).(*ClaimToHeader) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimToHeader. Required by controller-gen. +func (in *ClaimToHeader) DeepCopy() *ClaimToHeader { + if in == nil { + return nil + } + out := new(ClaimToHeader) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ClaimToHeader. Required by controller-gen. +func (in *ClaimToHeader) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/vendor/istio.io/api/security/v1/jwt_json.gen.go b/vendor/istio.io/api/security/v1/jwt_json.gen.go new file mode 100644 index 000000000..b330a86ba --- /dev/null +++ b/vendor/istio.io/api/security/v1/jwt_json.gen.go @@ -0,0 +1,45 @@ +// Code generated by protoc-gen-jsonshim. DO NOT EDIT. +package v1 + +import ( + bytes "bytes" + jsonpb "github.com/golang/protobuf/jsonpb" +) + +// MarshalJSON is a custom marshaler for JWTRule +func (this *JWTRule) MarshalJSON() ([]byte, error) { + str, err := JwtMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for JWTRule +func (this *JWTRule) UnmarshalJSON(b []byte) error { + return JwtUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for JWTHeader +func (this *JWTHeader) MarshalJSON() ([]byte, error) { + str, err := JwtMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for JWTHeader +func (this *JWTHeader) UnmarshalJSON(b []byte) error { + return JwtUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +// MarshalJSON is a custom marshaler for ClaimToHeader +func (this *ClaimToHeader) MarshalJSON() ([]byte, error) { + str, err := JwtMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ClaimToHeader +func (this *ClaimToHeader) UnmarshalJSON(b []byte) error { + return JwtUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +var ( + JwtMarshaler = &jsonpb.Marshaler{} + JwtUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true} +) diff --git a/vendor/istio.io/api/security/v1/request_authentication.pb.go b/vendor/istio.io/api/security/v1/request_authentication.pb.go new file mode 100644 index 000000000..5110b10b0 --- /dev/null +++ b/vendor/istio.io/api/security/v1/request_authentication.pb.go @@ -0,0 +1,458 @@ +// Copyright 2019 Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc (unknown) +// source: security/v1/request_authentication.proto + +// $schema: istio.security.v1.RequestAuthentication +// $title: RequestAuthentication +// $description: Request authentication configuration for workloads. +// $location: https://istio.io/docs/reference/config/security/request_authentication.html +// $aliases: [/docs/reference/config/security/v1/request_authentication] + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + v1beta1 "istio.io/api/type/v1beta1" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// RequestAuthentication defines what request authentication methods are supported by a workload. +// It will reject a request if the request contains invalid authentication information, based on the +// configured authentication rules. A request that does not contain any authentication credentials +// will be accepted but will not have any authenticated identity. To restrict access to authenticated +// requests only, this should be accompanied by an authorization rule. +// Examples: +// +// - Require JWT for all request for workloads that have label `app:httpbin` +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// jwtRules: +// - issuer: "issuer-foo" +// jwksUri: https://example.com/.well-known/jwks.json +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// +// ``` +// +// - A policy in the root namespace ("istio-system" by default) applies to workloads in all namespaces +// in a mesh. The following policy makes all workloads only accept requests that contain a +// valid JWT token. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: req-authn-for-all +// namespace: istio-system +// +// spec: +// +// jwtRules: +// - issuer: "issuer-foo" +// jwksUri: https://example.com/.well-known/jwks.json +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: require-jwt-for-all +// namespace: istio-system +// +// spec: +// +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// +// ``` +// +// - The next example shows how to set a different JWT requirement for a different `host`. The `RequestAuthentication` +// declares it can accept JWTs issued by either `issuer-foo` or `issuer-bar` (the public key set is implicitly +// set from the OpenID Connect spec). +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// jwtRules: +// - issuer: "issuer-foo" +// - issuer: "issuer-bar" +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["issuer-foo/*"] +// to: +// - operation: +// hosts: ["example.com"] +// - from: +// - source: +// requestPrincipals: ["issuer-bar/*"] +// to: +// - operation: +// hosts: ["another-host.com"] +// +// ``` +// +// - You can fine tune the authorization policy to set different requirement per path. For example, +// to require JWT on all paths, except /healthz, the same `RequestAuthentication` can be used, but the +// authorization policy could be: +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// - to: +// - operation: +// paths: ["/healthz"] +// +// ``` +// +// [Experimental] Routing based on derived [metadata](https://istio.io/latest/docs/reference/config/security/conditions/) +// is now supported. A prefix '@' is used to denote a match against internal metadata instead of the headers in the request. +// Currently this feature is only supported for the following metadata: +// +// - `request.auth.claims.{claim-name}[.{sub-claim}]*` which are extracted from validated JWT tokens. The claim name +// currently does not support the `.` character. Examples: `request.auth.claims.sub` and `request.auth.claims.name.givenName`. +// +// The use of matches against JWT claim metadata is only supported in Gateways. The following example shows: +// +// - RequestAuthentication to decode and validate a JWT. This also makes the `@request.auth.claims` available for use in the VirtualService. +// - AuthorizationPolicy to check for valid principals in the request. This makes the JWT required for the request. +// - VirtualService to route the request based on the "sub" claim. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: jwt-on-ingress +// namespace: istio-system +// +// spec: +// +// selector: +// matchLabels: +// app: istio-ingressgateway +// jwtRules: +// - issuer: "example.com" +// jwksUri: https://example.com/.well-known/jwks.json +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: require-jwt +// namespace: istio-system +// +// spec: +// +// selector: +// matchLabels: +// app: istio-ingressgateway +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// +// --- +// apiVersion: networking.istio.io/v1alpha3 +// kind: VirtualService +// metadata: +// +// name: route-jwt +// +// spec: +// +// hosts: +// - foo.prod.svc.cluster.local +// gateways: +// - istio-ingressgateway +// http: +// - name: "v2" +// match: +// - headers: +// "@request.auth.claims.sub": +// exact: "dev" +// route: +// - destination: +// host: foo.prod.svc.cluster.local +// subset: v2 +// - name: "default" +// route: +// - destination: +// host: foo.prod.svc.cluster.local +// subset: v1 +// +// ``` +// +// +// +// +// +type RequestAuthentication struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional. The selector decides where to apply the request authentication policy. The selector will match with workloads + // in the same namespace as the request authentication policy. If the request authentication policy is in the root namespace, + // the selector will additionally match with workloads in all namespaces. + // + // If not set, the selector will match all workloads. + Selector *v1beta1.WorkloadSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + // Define the list of JWTs that can be validated at the selected workloads' proxy. A valid token + // will be used to extract the authenticated identity. + // Each rule will be activated only when a token is presented at the location recognized by the + // rule. The token will be validated based on the JWT rule config. If validation fails, the request will + // be rejected. + // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of + // such requests is undefined. + JwtRules []*JWTRule `protobuf:"bytes,2,rep,name=jwt_rules,json=jwtRules,proto3" json:"jwt_rules,omitempty"` +} + +func (x *RequestAuthentication) Reset() { + *x = RequestAuthentication{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1_request_authentication_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RequestAuthentication) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestAuthentication) ProtoMessage() {} + +func (x *RequestAuthentication) ProtoReflect() protoreflect.Message { + mi := &file_security_v1_request_authentication_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestAuthentication.ProtoReflect.Descriptor instead. +func (*RequestAuthentication) Descriptor() ([]byte, []int) { + return file_security_v1_request_authentication_proto_rawDescGZIP(), []int{0} +} + +func (x *RequestAuthentication) GetSelector() *v1beta1.WorkloadSelector { + if x != nil { + return x.Selector + } + return nil +} + +func (x *RequestAuthentication) GetJwtRules() []*JWTRule { + if x != nil { + return x.JwtRules + } + return nil +} + +var File_security_v1_request_authentication_proto protoreflect.FileDescriptor + +var file_security_v1_request_authentication_proto_rawDesc = []byte{ + 0x0a, 0x28, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x69, 0x73, 0x74, 0x69, + 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x1a, 0x15, 0x73, + 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6a, 0x77, 0x74, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x22, 0x92, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x08, 0x73, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, + 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x37, 0x0a, + 0x09, 0x6a, 0x77, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x4a, 0x57, 0x54, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x08, 0x6a, 0x77, + 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x1a, 0x5a, 0x18, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, + 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, + 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_security_v1_request_authentication_proto_rawDescOnce sync.Once + file_security_v1_request_authentication_proto_rawDescData = file_security_v1_request_authentication_proto_rawDesc +) + +func file_security_v1_request_authentication_proto_rawDescGZIP() []byte { + file_security_v1_request_authentication_proto_rawDescOnce.Do(func() { + file_security_v1_request_authentication_proto_rawDescData = protoimpl.X.CompressGZIP(file_security_v1_request_authentication_proto_rawDescData) + }) + return file_security_v1_request_authentication_proto_rawDescData +} + +var file_security_v1_request_authentication_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_security_v1_request_authentication_proto_goTypes = []interface{}{ + (*RequestAuthentication)(nil), // 0: istio.security.v1.RequestAuthentication + (*v1beta1.WorkloadSelector)(nil), // 1: istio.type.v1beta1.WorkloadSelector + (*JWTRule)(nil), // 2: istio.security.v1.JWTRule +} +var file_security_v1_request_authentication_proto_depIdxs = []int32{ + 1, // 0: istio.security.v1.RequestAuthentication.selector:type_name -> istio.type.v1beta1.WorkloadSelector + 2, // 1: istio.security.v1.RequestAuthentication.jwt_rules:type_name -> istio.security.v1.JWTRule + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_security_v1_request_authentication_proto_init() } +func file_security_v1_request_authentication_proto_init() { + if File_security_v1_request_authentication_proto != nil { + return + } + file_security_v1_jwt_proto_init() + if !protoimpl.UnsafeEnabled { + file_security_v1_request_authentication_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RequestAuthentication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_security_v1_request_authentication_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_security_v1_request_authentication_proto_goTypes, + DependencyIndexes: file_security_v1_request_authentication_proto_depIdxs, + MessageInfos: file_security_v1_request_authentication_proto_msgTypes, + }.Build() + File_security_v1_request_authentication_proto = out.File + file_security_v1_request_authentication_proto_rawDesc = nil + file_security_v1_request_authentication_proto_goTypes = nil + file_security_v1_request_authentication_proto_depIdxs = nil +} diff --git a/vendor/istio.io/api/security/v1/request_authentication.pb.html b/vendor/istio.io/api/security/v1/request_authentication.pb.html new file mode 100644 index 000000000..1041f528e --- /dev/null +++ b/vendor/istio.io/api/security/v1/request_authentication.pb.html @@ -0,0 +1,247 @@ +--- +title: RequestAuthentication +description: Request authentication configuration for workloads. +location: https://istio.io/docs/reference/config/security/request_authentication.html +layout: protoc-gen-docs +generator: protoc-gen-docs +schema: istio.security.v1.RequestAuthentication +aliases: [/docs/reference/config/security/v1/request_authentication] +number_of_entries: 1 +--- +

RequestAuthentication

+
+

RequestAuthentication defines what request authentication methods are supported by a workload. +It will reject a request if the request contains invalid authentication information, based on the +configured authentication rules. A request that does not contain any authentication credentials +will be accepted but will not have any authenticated identity. To restrict access to authenticated +requests only, this should be accompanied by an authorization rule. +Examples:

+
    +
  • Require JWT for all request for workloads that have label app:httpbin
  • +
+
apiVersion: security.istio.io/v1
+kind: RequestAuthentication
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+  jwtRules:
+  - issuer: "issuer-foo"
+    jwksUri: https://example.com/.well-known/jwks.json
+---
+apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+  rules:
+  - from:
+    - source:
+        requestPrincipals: ["*"]
+
+
    +
  • A policy in the root namespace (“istio-system” by default) applies to workloads in all namespaces +in a mesh. The following policy makes all workloads only accept requests that contain a +valid JWT token.
  • +
+
apiVersion: security.istio.io/v1
+kind: RequestAuthentication
+metadata:
+  name: req-authn-for-all
+  namespace: istio-system
+spec:
+  jwtRules:
+  - issuer: "issuer-foo"
+    jwksUri: https://example.com/.well-known/jwks.json
+---
+apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: require-jwt-for-all
+  namespace: istio-system
+spec:
+  rules:
+  - from:
+    - source:
+        requestPrincipals: ["*"]
+
+
    +
  • The next example shows how to set a different JWT requirement for a different host. The RequestAuthentication +declares it can accept JWTs issued by either issuer-foo or issuer-bar (the public key set is implicitly +set from the OpenID Connect spec).
  • +
+
apiVersion: security.istio.io/v1
+kind: RequestAuthentication
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+  jwtRules:
+  - issuer: "issuer-foo"
+  - issuer: "issuer-bar"
+---
+apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+  rules:
+  - from:
+    - source:
+        requestPrincipals: ["issuer-foo/*"]
+    to:
+    - operation:
+        hosts: ["example.com"]
+  - from:
+    - source:
+        requestPrincipals: ["issuer-bar/*"]
+    to:
+    - operation:
+        hosts: ["another-host.com"]
+
+
    +
  • You can fine tune the authorization policy to set different requirement per path. For example, +to require JWT on all paths, except /healthz, the same RequestAuthentication can be used, but the +authorization policy could be:
  • +
+
apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+  rules:
+  - from:
+    - source:
+        requestPrincipals: ["*"]
+  - to:
+    - operation:
+        paths: ["/healthz"]
+
+

[Experimental] Routing based on derived metadata +is now supported. A prefix ‘@’ is used to denote a match against internal metadata instead of the headers in the request. +Currently this feature is only supported for the following metadata:

+
    +
  • request.auth.claims.{claim-name}[.{sub-claim}]* which are extracted from validated JWT tokens. The claim name +currently does not support the . character. Examples: request.auth.claims.sub and request.auth.claims.name.givenName.
  • +
+

The use of matches against JWT claim metadata is only supported in Gateways. The following example shows:

+
    +
  • RequestAuthentication to decode and validate a JWT. This also makes the @request.auth.claims available for use in the VirtualService.
  • +
  • AuthorizationPolicy to check for valid principals in the request. This makes the JWT required for the request.
  • +
  • VirtualService to route the request based on the “sub” claim.
  • +
+
apiVersion: security.istio.io/v1
+kind: RequestAuthentication
+metadata:
+  name: jwt-on-ingress
+  namespace: istio-system
+spec:
+  selector:
+    matchLabels:
+      app: istio-ingressgateway
+  jwtRules:
+  - issuer: "example.com"
+    jwksUri: https://example.com/.well-known/jwks.json
+---
+apiVersion: security.istio.io/v1
+kind: AuthorizationPolicy
+metadata:
+  name: require-jwt
+  namespace: istio-system
+spec:
+  selector:
+    matchLabels:
+      app: istio-ingressgateway
+  rules:
+  - from:
+    - source:
+        requestPrincipals: ["*"]
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+  name: route-jwt
+spec:
+  hosts:
+  - foo.prod.svc.cluster.local
+  gateways:
+  - istio-ingressgateway
+  http:
+  - name: "v2"
+    match:
+    - headers:
+        "@request.auth.claims.sub":
+          exact: "dev"
+    route:
+    - destination:
+        host: foo.prod.svc.cluster.local
+        subset: v2
+  - name: "default"
+    route:
+    - destination:
+        host: foo.prod.svc.cluster.local
+        subset: v1
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeDescriptionRequired
selectorWorkloadSelector +

Optional. The selector decides where to apply the request authentication policy. The selector will match with workloads +in the same namespace as the request authentication policy. If the request authentication policy is in the root namespace, +the selector will additionally match with workloads in all namespaces.

+

If not set, the selector will match all workloads.

+ +
+No +
jwtRulesJWTRule[] +

Define the list of JWTs that can be validated at the selected workloads’ proxy. A valid token +will be used to extract the authenticated identity. +Each rule will be activated only when a token is presented at the location recognized by the +rule. The token will be validated based on the JWT rule config. If validation fails, the request will +be rejected. +Note: Requests with multiple tokens (at different locations) are not supported, the output principal of +such requests is undefined.

+ +
+No +
+
diff --git a/vendor/istio.io/api/security/v1/request_authentication.proto b/vendor/istio.io/api/security/v1/request_authentication.proto new file mode 100644 index 000000000..cf34e9365 --- /dev/null +++ b/vendor/istio.io/api/security/v1/request_authentication.proto @@ -0,0 +1,262 @@ +// Copyright 2019 Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +syntax = "proto3"; + +import "security/v1/jwt.proto"; +import "type/v1beta1/selector.proto"; + +// $schema: istio.security.v1.RequestAuthentication +// $title: RequestAuthentication +// $description: Request authentication configuration for workloads. +// $location: https://istio.io/docs/reference/config/security/request_authentication.html +// $aliases: [/docs/reference/config/security/v1/request_authentication] + +package istio.security.v1; + +option go_package="istio.io/api/security/v1"; + +// RequestAuthentication defines what request authentication methods are supported by a workload. +// It will reject a request if the request contains invalid authentication information, based on the +// configured authentication rules. A request that does not contain any authentication credentials +// will be accepted but will not have any authenticated identity. To restrict access to authenticated +// requests only, this should be accompanied by an authorization rule. +// Examples: +// +// - Require JWT for all request for workloads that have label `app:httpbin` +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// name: httpbin +// namespace: foo +// spec: +// selector: +// matchLabels: +// app: httpbin +// jwtRules: +// - issuer: "issuer-foo" +// jwksUri: https://example.com/.well-known/jwks.json +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// ``` +// +// - A policy in the root namespace ("istio-system" by default) applies to workloads in all namespaces +// in a mesh. The following policy makes all workloads only accept requests that contain a +// valid JWT token. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// name: req-authn-for-all +// namespace: istio-system +// spec: +// jwtRules: +// - issuer: "issuer-foo" +// jwksUri: https://example.com/.well-known/jwks.json +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: require-jwt-for-all +// namespace: istio-system +// spec: +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// ``` +// +// - The next example shows how to set a different JWT requirement for a different `host`. The `RequestAuthentication` +// declares it can accept JWTs issued by either `issuer-foo` or `issuer-bar` (the public key set is implicitly +// set from the OpenID Connect spec). +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// name: httpbin +// namespace: foo +// spec: +// selector: +// matchLabels: +// app: httpbin +// jwtRules: +// - issuer: "issuer-foo" +// - issuer: "issuer-bar" +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["issuer-foo/*"] +// to: +// - operation: +// hosts: ["example.com"] +// - from: +// - source: +// requestPrincipals: ["issuer-bar/*"] +// to: +// - operation: +// hosts: ["another-host.com"] +// ``` +// +// - You can fine tune the authorization policy to set different requirement per path. For example, +// to require JWT on all paths, except /healthz, the same `RequestAuthentication` can be used, but the +// authorization policy could be: +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// - to: +// - operation: +// paths: ["/healthz"] +// ``` +// +// [Experimental] Routing based on derived [metadata](https://istio.io/latest/docs/reference/config/security/conditions/) +// is now supported. A prefix '@' is used to denote a match against internal metadata instead of the headers in the request. +// Currently this feature is only supported for the following metadata: +// +// - `request.auth.claims.{claim-name}[.{sub-claim}]*` which are extracted from validated JWT tokens. The claim name +// currently does not support the `.` character. Examples: `request.auth.claims.sub` and `request.auth.claims.name.givenName`. +// +// The use of matches against JWT claim metadata is only supported in Gateways. The following example shows: +// +// - RequestAuthentication to decode and validate a JWT. This also makes the `@request.auth.claims` available for use in the VirtualService. +// - AuthorizationPolicy to check for valid principals in the request. This makes the JWT required for the request. +// - VirtualService to route the request based on the "sub" claim. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// name: jwt-on-ingress +// namespace: istio-system +// spec: +// selector: +// matchLabels: +// app: istio-ingressgateway +// jwtRules: +// - issuer: "example.com" +// jwksUri: https://example.com/.well-known/jwks.json +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// name: require-jwt +// namespace: istio-system +// spec: +// selector: +// matchLabels: +// app: istio-ingressgateway +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// --- +// apiVersion: networking.istio.io/v1alpha3 +// kind: VirtualService +// metadata: +// name: route-jwt +// spec: +// hosts: +// - foo.prod.svc.cluster.local +// gateways: +// - istio-ingressgateway +// http: +// - name: "v2" +// match: +// - headers: +// "@request.auth.claims.sub": +// exact: "dev" +// route: +// - destination: +// host: foo.prod.svc.cluster.local +// subset: v2 +// - name: "default" +// route: +// - destination: +// host: foo.prod.svc.cluster.local +// subset: v1 +// ``` +// +// +// +// +// +message RequestAuthentication { + // Optional. The selector decides where to apply the request authentication policy. The selector will match with workloads + // in the same namespace as the request authentication policy. If the request authentication policy is in the root namespace, + // the selector will additionally match with workloads in all namespaces. + // + // If not set, the selector will match all workloads. + istio.type.v1beta1.WorkloadSelector selector = 1; + + // Define the list of JWTs that can be validated at the selected workloads' proxy. A valid token + // will be used to extract the authenticated identity. + // Each rule will be activated only when a token is presented at the location recognized by the + // rule. The token will be validated based on the JWT rule config. If validation fails, the request will + // be rejected. + // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of + // such requests is undefined. + repeated JWTRule jwt_rules = 2; +} diff --git a/vendor/istio.io/api/security/v1/request_authentication_deepcopy.gen.go b/vendor/istio.io/api/security/v1/request_authentication_deepcopy.gen.go new file mode 100644 index 000000000..591aa76fb --- /dev/null +++ b/vendor/istio.io/api/security/v1/request_authentication_deepcopy.gen.go @@ -0,0 +1,27 @@ +// Code generated by protoc-gen-deepcopy. DO NOT EDIT. +package v1 + +import ( + proto "google.golang.org/protobuf/proto" +) + +// DeepCopyInto supports using RequestAuthentication within kubernetes types, where deepcopy-gen is used. +func (in *RequestAuthentication) DeepCopyInto(out *RequestAuthentication) { + p := proto.Clone(in).(*RequestAuthentication) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestAuthentication. Required by controller-gen. +func (in *RequestAuthentication) DeepCopy() *RequestAuthentication { + if in == nil { + return nil + } + out := new(RequestAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new RequestAuthentication. Required by controller-gen. +func (in *RequestAuthentication) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/vendor/istio.io/api/security/v1/request_authentication_json.gen.go b/vendor/istio.io/api/security/v1/request_authentication_json.gen.go new file mode 100644 index 000000000..c1db4c0a7 --- /dev/null +++ b/vendor/istio.io/api/security/v1/request_authentication_json.gen.go @@ -0,0 +1,23 @@ +// Code generated by protoc-gen-jsonshim. DO NOT EDIT. +package v1 + +import ( + bytes "bytes" + jsonpb "github.com/golang/protobuf/jsonpb" +) + +// MarshalJSON is a custom marshaler for RequestAuthentication +func (this *RequestAuthentication) MarshalJSON() ([]byte, error) { + str, err := RequestAuthenticationMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for RequestAuthentication +func (this *RequestAuthentication) UnmarshalJSON(b []byte) error { + return RequestAuthenticationUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + +var ( + RequestAuthenticationMarshaler = &jsonpb.Marshaler{} + RequestAuthenticationUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true} +) diff --git a/vendor/istio.io/api/security/v1beta1/authorization_policy.gen.json b/vendor/istio.io/api/security/v1beta1/authorization_policy.gen.json index 266d808b9..3932c6586 100644 --- a/vendor/istio.io/api/security/v1beta1/authorization_policy.gen.json +++ b/vendor/istio.io/api/security/v1beta1/authorization_policy.gen.json @@ -186,7 +186,7 @@ } }, "istio.security.v1beta1.Rule.From": { - "description": "From includes a list or sources.", + "description": "From includes a list of sources.", "type": "object", "properties": { "source": { @@ -195,7 +195,7 @@ } }, "istio.security.v1beta1.Rule.To": { - "description": "To includes a list or operations.", + "description": "To includes a list of operations.", "type": "object", "properties": { "operation": { @@ -250,7 +250,7 @@ } }, "ipBlocks": { - "description": "Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. \"1.2.3.4\") and CIDR (e.g. \"1.2.3.0/24\") are supported. This is the same as the `source.ip` attribute.", + "description": "Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. \"203.0.113.4\") and CIDR (e.g. \"203.0.113.0/24\") are supported. This is the same as the `source.ip` attribute.", "type": "array", "items": { "type": "string" @@ -264,7 +264,7 @@ } }, "remoteIpBlocks": { - "description": "Optional. A list of IP blocks, populated from X-Forwarded-For header or proxy protocol. To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig when you install Istio or using an annotation on the ingress gateway. See the documentation here: [Configuring Gateway Network Topology](https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/). Single IP (e.g. \"1.2.3.4\") and CIDR (e.g. \"1.2.3.0/24\") are supported. This is the same as the `remote.ip` attribute.", + "description": "Optional. A list of IP blocks, populated from X-Forwarded-For header or proxy protocol. To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig when you install Istio or using an annotation on the ingress gateway. See the documentation here: [Configuring Gateway Network Topology](https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/). Single IP (e.g. \"203.0.113.4\") and CIDR (e.g. \"203.0.113.0/24\") are supported. This is the same as the `remote.ip` attribute.", "type": "array", "items": { "type": "string" diff --git a/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.go b/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.go index df33c2cb2..7babd1a16 100644 --- a/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.go +++ b/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: security/v1beta1/authorization_policy.proto @@ -48,20 +48,20 @@ // // Here is an example of Istio Authorization Policy: // -// It sets the `action` to "ALLOW" to create an allow policy. The default action is "ALLOW" +// It sets the `action` to `ALLOW` to create an allow policy. The default action is `ALLOW` // but it is useful to be explicit in the policy. // // It allows requests from: // -// - service account "cluster.local/ns/default/sa/sleep" or -// - namespace "test" +// - service account `cluster.local/ns/default/sa/sleep` or +// - namespace `test` // // to access the workload with: // -// - "GET" method at paths of prefix "/info" or, -// - "POST" method at path "/data". +// - `GET` method at paths of prefix `/info` or, +// - `POST` method at path `/data`. // -// when the request has a valid JWT token issued by "https://accounts.google.com". +// when the request has a valid JWT token issued by `https://accounts.google.com`. // // Any other requests will be denied. // @@ -91,9 +91,9 @@ // values: ["https://accounts.google.com"] // ``` // -// The following is another example that sets `action` to "DENY" to create a deny policy. -// It denies requests from the "dev" namespace to the "POST" method on all workloads -// in the "foo" namespace. +// The following is another example that sets `action` to `DENY` to create a deny policy. +// It denies requests from the `dev` namespace to the `POST` method on all workloads +// in the `foo` namespace. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -112,8 +112,32 @@ // methods: ["POST"] // ``` // -// The following authorization policy sets the `action` to "AUDIT". It will audit any GET requests to the path with the -// prefix "/user/profile". +// The following is another example that sets `action` to `DENY` to create a deny policy. +// It denies all the requests with `POST` method on port `8080` on all workloads +// in the `foo` namespace. +// +// ```yaml +// apiVersion: security.istio.io/v1beta1 +// kind: AuthorizaionPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// action: DENY +// rules: +// - to: +// - operation: +// methods: ["POST"] +// ports: ["8080"] +// ``` +// +// When this rule is applied to TCP traffic, the `method` field (as will all HTTP based attributes) cannot be processed. +// For a `DENY` rule, missing attributes are treated as matches. This means all TCP traffic on port `8080` would be denied in the example above. +// If we were to remove the `ports` match, all TCP traffic would be denied. As a result, it is recommended to always scope `DENY` policies to a specific port, +// especially when using HTTP attributes [Authorization Policy for TCP Ports](https://istio.io/latest/docs/tasks/security/authorization/authz-tcp/). +// +// The following authorization policy sets the `action` to `AUDIT`. It will audit any `GET` requests to the path with the +// prefix `/user/profile`. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -134,16 +158,14 @@ // ``` // // Authorization Policy scope (target) is determined by "metadata/namespace" and -// an optional "selector". +// an optional `selector`. // // - "metadata/namespace" tells which namespace the policy applies. If set to root // namespace, the policy applies to all namespaces in a mesh. -// - workload "selector" can be used to further restrict where a policy applies. +// - workload `selector` can be used to further restrict where a policy applies. // -// For example, -// -// The following authorization policy applies to all workloads in namespace foo. It allows nothing and effectively denies -// all requests to workloads in namespace foo. +// For example, the following authorization policy applies to all workloads in namespace `foo`. It allows nothing and effectively denies +// all requests to workloads in namespace `foo`. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -155,7 +177,7 @@ // {} // ``` // -// The following authorization policy allows all requests to workloads in namespace foo. +// The following authorization policy allows all requests to workloads in namespace `foo`. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -168,7 +190,7 @@ // - {} // ``` // -// The following authorization policy applies to workloads containing label "app: httpbin" in namespace bar. It allows +// The following authorization policy applies to workloads containing label `app: httpbin` in namespace `bar`. It allows // nothing and effectively denies all requests to the selected workloads. // // ```yaml @@ -183,8 +205,8 @@ // app: httpbin // ``` // -// The following authorization policy applies to workloads containing label "version: v1" in all namespaces in the mesh. -// (Assuming the root namespace is configured to "istio-system"). +// The following authorization policy applies to workloads containing label `version: v1` in all namespaces in the mesh. +// (Assuming the root namespace is configured to `istio-system`). // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -197,6 +219,31 @@ // matchLabels: // version: v1 // ``` +// +// The following example shows you how to set up an authorization policy using an [experimental annotation](https://istio.io/latest/docs/reference/config/annotations/) +// `istio.io/dry-run` to dry-run the policy without actually enforcing it. +// +// The dry-run annotation allows you to better understand the effect of an authorization policy before applying it to the production traffic. +// This helps to reduce the risk of breaking the production traffic caused by an incorrect authorization policy. +// For more information, see [dry-run tasks](https://istio.io/latest/docs/tasks/security/authorization/authz-dry-run/). +// +// ```yaml +// apiVersion: security.istio.io/v1beta1 +// kind: AuthorizationPolicy +// metadata: +// name: dry-run-example +// annotations: +// "istio.io/dry-run": "true" +// spec: +// selector: +// matchLabels: +// app: httpbin +// action: DENY +// rules: +// - to: +// - operation: +// paths: ["/headers"] +// ``` package v1beta1 @@ -244,19 +291,23 @@ const ( // apiVersion: security.istio.io/v1beta1 // kind: AuthorizationPolicy // metadata: - // name: ext-authz - // namespace: istio-system + // + // name: ext-authz + // namespace: istio-system + // // spec: - // selector: - // matchLabels: - // app: istio-ingressgateway - // action: CUSTOM - // provider: - // name: "my-custom-authz" - // rules: - // - to: - // - operation: - // paths: ["/admin/*"] + // + // selector: + // matchLabels: + // app: istio-ingressgateway + // action: CUSTOM + // provider: + // name: "my-custom-authz" + // rules: + // - to: + // - operation: + // paths: ["/admin/*"] + // // ``` AuthorizationPolicy_CUSTOM AuthorizationPolicy_Action = 3 ) @@ -324,6 +375,9 @@ func (AuthorizationPolicy_Action) EnumDescriptor() ([]byte, []int) { // +genclient // +k8s:deepcopy-gen=true // --> +// type AuthorizationPolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -343,6 +397,7 @@ type AuthorizationPolicy struct { // Optional. The action to take if the request is matched with the rules. Default is ALLOW if not specified. Action AuthorizationPolicy_Action `protobuf:"varint,3,opt,name=action,proto3,enum=istio.security.v1beta1.AuthorizationPolicy_Action" json:"action,omitempty"` // Types that are assignable to ActionDetail: + // // *AuthorizationPolicy_Provider ActionDetail isAuthorizationPolicy_ActionDetail `protobuf_oneof:"action_detail"` } @@ -511,12 +566,12 @@ func (x *Rule) GetWhen() []*Condition { // ANDed together. // // For example, the following source matches if the principal is "admin" or "dev" -// and the namespace is "prod" or "test" and the ip is not "1.2.3.4". +// and the namespace is "prod" or "test" and the ip is not "203.0.113.4". // // ```yaml // principals: ["admin", "dev"] // namespaces: ["prod", "test"] -// notIpBlocks: ["1.2.3.4"] +// notIpBlocks: ["203.0.113.4"] // ``` type Source struct { state protoimpl.MessageState @@ -546,8 +601,8 @@ type Source struct { Namespaces []string `protobuf:"bytes,3,rep,name=namespaces,proto3" json:"namespaces,omitempty"` // Optional. A list of negative match of namespaces. NotNamespaces []string `protobuf:"bytes,7,rep,name=not_namespaces,json=notNamespaces,proto3" json:"not_namespaces,omitempty"` - // Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. "1.2.3.4") and - // CIDR (e.g. "1.2.3.0/24") are supported. This is the same as the `source.ip` attribute. + // Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. "203.0.113.4") and + // CIDR (e.g. "203.0.113.0/24") are supported. This is the same as the `source.ip` attribute. // // If not set, any IP is allowed. IpBlocks []string `protobuf:"bytes,4,rep,name=ip_blocks,json=ipBlocks,proto3" json:"ip_blocks,omitempty"` @@ -557,7 +612,7 @@ type Source struct { // To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig // when you install Istio or using an annotation on the ingress gateway. See the documentation here: // [Configuring Gateway Network Topology](https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/). - // Single IP (e.g. "1.2.3.4") and CIDR (e.g. "1.2.3.0/24") are supported. + // Single IP (e.g. "203.0.113.4") and CIDR (e.g. "203.0.113.0/24") are supported. // This is the same as the `remote.ip` attribute. // // If not set, any IP is allowed. @@ -922,7 +977,7 @@ func (x *AuthorizationPolicy_ExtensionProvider) GetName() string { return "" } -// From includes a list or sources. +// From includes a list of sources. type Rule_From struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -971,7 +1026,7 @@ func (x *Rule_From) GetSource() *Source { return nil } -// To includes a list or operations. +// To includes a list of operations. type Rule_To struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1116,15 +1171,15 @@ var file_security_v1beta1_authorization_policy_proto_rawDesc = []byte{ 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x74, - 0x50, 0x61, 0x74, 0x68, 0x73, 0x22, 0x5a, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x73, 0x42, 0x1f, 0x5a, 0x1d, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x61, 0x74, 0x68, 0x73, 0x22, 0x59, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x15, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x03, 0xe0, 0x41, 0x02, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x6e, 0x6f, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x6f, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x42, 0x1f, 0x5a, 0x1d, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.html b/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.html index e7e76b421..9595fe409 100644 --- a/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.html +++ b/vendor/istio.io/api/security/v1beta1/authorization_policy.pb.html @@ -10,11 +10,9 @@ number_of_entries: 9 ---

Istio Authorization Policy enables access control on workloads in the mesh.

-

Authorization policy supports CUSTOM, DENY and ALLOW actions for access control. When CUSTOM, DENY and ALLOW actions are used for a workload at the same time, the CUSTOM action is evaluated first, then the DENY action, and finally the ALLOW action. The evaluation is determined by the following rules:

-
  1. If there are any CUSTOM policies that match the request, evaluate and deny the request if the evaluation result is deny.
  2. If there are any DENY policies that match the request, deny the request.
  3. @@ -22,39 +20,28 @@
  4. If any of the ALLOW policies match the request, allow the request.
  5. Deny the request.
-

Istio Authorization Policy also supports the AUDIT action to decide whether to log requests. AUDIT policies do not affect whether requests are allowed or denied to the workload. Requests will be allowed or denied based solely on CUSTOM, DENY and ALLOW actions.

-

A request will be internally marked that it should be audited if there is an AUDIT policy on the workload that matches the request. A separate plugin must be configured and enabled to actually fulfill the audit decision and complete the audit behavior. The request will not be audited if there are no such supporting plugins enabled. Currently, the only supported plugin is the Stackdriver plugin.

-

Here is an example of Istio Authorization Policy:

- -

It sets the action to “ALLOW” to create an allow policy. The default action is “ALLOW” +

It sets the action to ALLOW to create an allow policy. The default action is ALLOW but it is useful to be explicit in the policy.

-

It allows requests from:

-
    -
  • service account “cluster.local/ns/default/sa/sleep” or
  • -
  • namespace “test”
  • +
  • service account cluster.local/ns/default/sa/sleep or
  • +
  • namespace test
-

to access the workload with:

-
    -
  • “GET” method at paths of prefix “/info” or,
  • -
  • “POST” method at path “/data”.
  • +
  • GET method at paths of prefix /info or,
  • +
  • POST method at path /data.
- -

when the request has a valid JWT token issued by “https://accounts.google.com”.

- +

when the request has a valid JWT token issued by https://accounts.google.com.

Any other requests will be denied.

-
apiVersion: security.istio.io/v1beta1
 kind: AuthorizationPolicy
 metadata:
@@ -79,11 +66,9 @@
     - key: request.auth.claims[iss]
       values: ["https://accounts.google.com"]
 
- -

The following is another example that sets action to “DENY” to create a deny policy. -It denies requests from the “dev” namespace to the “POST” method on all workloads -in the “foo” namespace.

- +

The following is another example that sets action to DENY to create a deny policy. +It denies requests from the dev namespace to the POST method on all workloads +in the foo namespace.

apiVersion: security.istio.io/v1beta1
 kind: AuthorizationPolicy
 metadata:
@@ -99,10 +84,28 @@
     - operation:
         methods: ["POST"]
 
- -

The following authorization policy sets the action to “AUDIT”. It will audit any GET requests to the path with the -prefix “/user/profile”.

- +

The following is another example that sets action to DENY to create a deny policy. +It denies all the requests with POST method on port 8080 on all workloads +in the foo namespace.

+
apiVersion: security.istio.io/v1beta1
+kind: AuthorizaionPolicy
+metadata:
+  name: httpbin
+  namespace: foo
+spec:
+  action: DENY
+  rules:
+  - to:
+    - operation:
+        methods: ["POST"]
+        ports: ["8080"]
+
+

When this rule is applied to TCP traffic, the method field (as will all HTTP based attributes) cannot be processed. +For a DENY rule, missing attributes are treated as matches. This means all TCP traffic on port 8080 would be denied in the example above. +If we were to remove the ports match, all TCP traffic would be denied. As a result, it is recommended to always scope DENY policies to a specific port, +especially when using HTTP attributes Authorization Policy for TCP Ports.

+

The following authorization policy sets the action to AUDIT. It will audit any GET requests to the path with the +prefix /user/profile.

apiVersion: security.istio.io/v1beta1
 kind: AuthorizationPolicy
 metadata:
@@ -119,21 +122,15 @@
         methods: ["GET"]
         paths: ["/user/profile/*"]
 
-

Authorization Policy scope (target) is determined by “metadata/namespace” and -an optional “selector”.

- +an optional selector.

  • “metadata/namespace” tells which namespace the policy applies. If set to root namespace, the policy applies to all namespaces in a mesh.
  • -
  • workload “selector” can be used to further restrict where a policy applies.
  • +
  • workload selector can be used to further restrict where a policy applies.
- -

For example,

- -

The following authorization policy applies to all workloads in namespace foo. It allows nothing and effectively denies -all requests to workloads in namespace foo.

- +

For example, the following authorization policy applies to all workloads in namespace foo. It allows nothing and effectively denies +all requests to workloads in namespace foo.

apiVersion: security.istio.io/v1beta1
 kind: AuthorizationPolicy
 metadata:
@@ -142,9 +139,7 @@
 spec:
   {}
 
- -

The following authorization policy allows all requests to workloads in namespace foo.

- +

The following authorization policy allows all requests to workloads in namespace foo.

apiVersion: security.istio.io/v1beta1
 kind: AuthorizationPolicy
 metadata:
@@ -154,10 +149,8 @@
  rules:
  - {}
 
- -

The following authorization policy applies to workloads containing label “app: httpbin” in namespace bar. It allows +

The following authorization policy applies to workloads containing label app: httpbin in namespace bar. It allows nothing and effectively denies all requests to the selected workloads.

-
apiVersion: security.istio.io/v1beta1
 kind: AuthorizationPolicy
 metadata:
@@ -168,10 +161,8 @@
     matchLabels:
       app: httpbin
 
- -

The following authorization policy applies to workloads containing label “version: v1” in all namespaces in the mesh. -(Assuming the root namespace is configured to “istio-system”).

- +

The following authorization policy applies to workloads containing label version: v1 in all namespaces in the mesh. +(Assuming the root namespace is configured to istio-system).

apiVersion: security.istio.io/v1beta1
 kind: AuthorizationPolicy
 metadata:
@@ -182,6 +173,27 @@
    matchLabels:
      version: v1
 
+

The following example shows you how to set up an authorization policy using an experimental annotation +istio.io/dry-run to dry-run the policy without actually enforcing it.

+

The dry-run annotation allows you to better understand the effect of an authorization policy before applying it to the production traffic. +This helps to reduce the risk of breaking the production traffic caused by an incorrect authorization policy. +For more information, see dry-run tasks.

+
apiVersion: security.istio.io/v1beta1
+kind: AuthorizationPolicy
+metadata:
+  name: dry-run-example
+  annotations:
+    "istio.io/dry-run": "true"
+spec:
+  selector:
+    matchLabels:
+      app: httpbin
+  action: DENY
+  rules:
+  - to:
+    - operation:
+        paths: ["/headers"]
+

AuthorizationPolicy

@@ -204,7 +216,6 @@

AuthorizationPolicy

Optional. The selector decides where to apply the authorization policy. The selector will match with workloads in the same namespace as the authorization policy. If the authorization policy is in the root namespace, the selector will additionally match with workloads in all namespaces.

-

If not set, the selector will match all workloads.

@@ -217,7 +228,6 @@

AuthorizationPolicy

Rule[]

Optional. A list of rules to match the request. A match occurs when at least one rule matches the request.

-

If not set, the match will never occur. This is equivalent to setting a default of deny for the target workloads if the action is ALLOW.

@@ -256,9 +266,7 @@

Rule

Rule matches requests from a list of sources that perform a list of operations subject to a list of conditions. A match occurs when at least one source, one operation and all conditions matches the request. An empty rule is always matched.

-

Any string field in the rule supports Exact, Prefix, Suffix and Presence match:

-
  • Exact match: “abc” will match on value “abc”.
  • Prefix match: “abc*” will match on value “abc” and “abcd”.
  • @@ -281,7 +289,6 @@

    Rule

    From[]

    Optional. from specifies the source of a request.

    -

    If not set, any source is allowed.

    @@ -294,7 +301,6 @@

    Rule

    To[]

    Optional. to specifies the operation of a request.

    -

    If not set, any operation is allowed.

    @@ -307,7 +313,6 @@

    Rule

    Condition[]

    Optional. when specifies a list of additional conditions of a request.

    -

    If not set, any condition is allowed.

    @@ -322,13 +327,11 @@

    Source

    Source specifies the source identities of a request. Fields in the source are ANDed together.

    -

    For example, the following source matches if the principal is “admin” or “dev” -and the namespace is “prod” or “test” and the ip is not “1.2.3.4”.

    - +and the namespace is “prod” or “test” and the ip is not “203.0.113.4”.

    principals: ["admin", "dev"]
     namespaces: ["prod", "test"]
    -notIpBlocks: ["1.2.3.4"]
    +notIpBlocks: ["203.0.113.4"]
     
    @@ -348,7 +351,6 @@

    Source

    Optional. A list of peer identities derived from the peer certificate. The peer identity is in the format of "<TRUST_DOMAIN>/ns/<NAMESPACE>/sa/<SERVICE_ACCOUNT>", for example, "cluster.local/ns/default/sa/productpage". This field requires mTLS enabled and is the same as the source.principal attribute.

    -

    If not set, any principal is allowed.

    @@ -374,7 +376,6 @@

    Source

    Optional. A list of request identities derived from the JWT. The request identity is in the format of "<ISS>/<SUB>", for example, "example.com/sub-1". This field requires request authentication enabled and is the same as the request.auth.principal attribute.

    -

    If not set, any request principal is allowed.

    @@ -399,7 +400,6 @@

    Source

    @@ -422,9 +422,8 @@

    Source

    @@ -451,9 +450,8 @@

    Source

    To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig when you install Istio or using an annotation on the ingress gateway. See the documentation here: Configuring Gateway Network Topology. -Single IP (e.g. “1.2.3.4”) and CIDR (e.g. “1.2.3.0/24”) are supported. +Single IP (e.g. “203.0.113.4”) and CIDR (e.g. “203.0.113.0/24”) are supported. This is the same as the remote.ip attribute.

    -

    If not set, any IP is allowed.

    @@ -479,10 +477,8 @@

    Operation

    Operation specifies the operations of a request. Fields in the operation are ANDed together.

    -

    For example, the following operation matches if the host has suffix “.example.com” and the method is “GET” or “HEAD” and the path doesn’t have prefix “/admin”.

    -
    hosts: ["*.example.com"]
     methods: ["GET", "HEAD"]
     notPaths: ["/admin*"]
    @@ -505,7 +501,6 @@ 

    Operation

    Optional. A list of hosts as specified in the HTTP request. The match is case-insensitive. See the security best practices for recommended usage of this field.

    -

    If not set, any host is allowed. Must be used only with HTTP.

    @@ -529,7 +524,6 @@

    Operation

    @@ -554,7 +548,6 @@

    Operation

    @@ -580,7 +573,6 @@

    Operation

    Optional. A list of paths as specified in the HTTP request. See the Authorization Policy Normalization for details of the path normalization. For gRPC service, this will be the fully-qualified name in the form of “/package.service/method”.

    -

    If not set, any path is allowed. Must be used only with HTTP.

    @@ -684,7 +676,7 @@

    AuthorizationPolicy.ExtensionProv

    Rule.From

    -

    From includes a list or sources.

    +

    From includes a list of sources.

    Optional. A list of namespaces derived from the peer certificate. This field requires mTLS enabled and is the same as the source.namespace attribute.

    -

    If not set, any namespace is allowed.

    ipBlocks string[] -

    Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. “1.2.3.4”) and -CIDR (e.g. “1.2.3.0/24”) are supported. This is the same as the source.ip attribute.

    - +

    Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. “203.0.113.4”) and +CIDR (e.g. “203.0.113.0/24”) are supported. This is the same as the source.ip attribute.

    If not set, any IP is allowed.

    string[]

    Optional. A list of ports as specified in the connection.

    -

    If not set, any port is allowed.

    Optional. A list of methods as specified in the HTTP request. For gRPC service, this will always be “POST”.

    -

    If not set, any method is allowed. Must be used only with HTTP.

    @@ -712,7 +704,7 @@

    Rule.From

    Rule.To

    -

    To includes a list or operations.

    +

    To includes a list of operations.

    @@ -782,28 +774,25 @@

    AuthorizationPolicy.Action

    the extension by specifying the name of the provider. One example use case of the extension is to integrate with a custom external authorization system to delegate the authorization decision to it.

    -

    Note: The CUSTOM action is currently an alpha feature and is subject to breaking changes in later versions.

    -

    The following authorization policy applies to an ingress gateway and delegates the authorization check to a named extension “my-custom-authz” if the request path has prefix “/admin/”.

    -
    apiVersion: security.istio.io/v1beta1
     kind: AuthorizationPolicy
     metadata:
    - name: ext-authz
    - namespace: istio-system
    +  name: ext-authz
    +  namespace: istio-system
     spec:
    - selector:
    -   matchLabels:
    -     app: istio-ingressgateway
    - action: CUSTOM
    - provider:
    -   name: "my-custom-authz"
    - rules:
    - - to:
    -   - operation:
    -       paths: ["/admin/*"]
    +  selector:
    +    matchLabels:
    +      app: istio-ingressgateway
    +  action: CUSTOM
    +  provider:
    +    name: "my-custom-authz"
    +  rules:
    +  - to:
    +    - operation:
    +        paths: ["/admin/*"]
     
    diff --git a/vendor/istio.io/api/security/v1beta1/authorization_policy.proto b/vendor/istio.io/api/security/v1beta1/authorization_policy.proto index a90d715c7..993eae8c2 100644 --- a/vendor/istio.io/api/security/v1beta1/authorization_policy.proto +++ b/vendor/istio.io/api/security/v1beta1/authorization_policy.proto @@ -46,20 +46,20 @@ import "type/v1beta1/selector.proto"; // // Here is an example of Istio Authorization Policy: // -// It sets the `action` to "ALLOW" to create an allow policy. The default action is "ALLOW" +// It sets the `action` to `ALLOW` to create an allow policy. The default action is `ALLOW` // but it is useful to be explicit in the policy. // // It allows requests from: // -// - service account "cluster.local/ns/default/sa/sleep" or -// - namespace "test" +// - service account `cluster.local/ns/default/sa/sleep` or +// - namespace `test` // // to access the workload with: // -// - "GET" method at paths of prefix "/info" or, -// - "POST" method at path "/data". +// - `GET` method at paths of prefix `/info` or, +// - `POST` method at path `/data`. // -// when the request has a valid JWT token issued by "https://accounts.google.com". +// when the request has a valid JWT token issued by `https://accounts.google.com`. // // Any other requests will be denied. // @@ -89,9 +89,9 @@ import "type/v1beta1/selector.proto"; // values: ["https://accounts.google.com"] // ``` // -// The following is another example that sets `action` to "DENY" to create a deny policy. -// It denies requests from the "dev" namespace to the "POST" method on all workloads -// in the "foo" namespace. +// The following is another example that sets `action` to `DENY` to create a deny policy. +// It denies requests from the `dev` namespace to the `POST` method on all workloads +// in the `foo` namespace. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -110,8 +110,32 @@ import "type/v1beta1/selector.proto"; // methods: ["POST"] // ``` // -// The following authorization policy sets the `action` to "AUDIT". It will audit any GET requests to the path with the -// prefix "/user/profile". +// The following is another example that sets `action` to `DENY` to create a deny policy. +// It denies all the requests with `POST` method on port `8080` on all workloads +// in the `foo` namespace. +// +// ```yaml +// apiVersion: security.istio.io/v1beta1 +// kind: AuthorizaionPolicy +// metadata: +// name: httpbin +// namespace: foo +// spec: +// action: DENY +// rules: +// - to: +// - operation: +// methods: ["POST"] +// ports: ["8080"] +// ``` +// +// When this rule is applied to TCP traffic, the `method` field (as will all HTTP based attributes) cannot be processed. +// For a `DENY` rule, missing attributes are treated as matches. This means all TCP traffic on port `8080` would be denied in the example above. +// If we were to remove the `ports` match, all TCP traffic would be denied. As a result, it is recommended to always scope `DENY` policies to a specific port, +// especially when using HTTP attributes [Authorization Policy for TCP Ports](https://istio.io/latest/docs/tasks/security/authorization/authz-tcp/). +// +// The following authorization policy sets the `action` to `AUDIT`. It will audit any `GET` requests to the path with the +// prefix `/user/profile`. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -132,16 +156,14 @@ import "type/v1beta1/selector.proto"; // ``` // // Authorization Policy scope (target) is determined by "metadata/namespace" and -// an optional "selector". +// an optional `selector`. // // - "metadata/namespace" tells which namespace the policy applies. If set to root // namespace, the policy applies to all namespaces in a mesh. -// - workload "selector" can be used to further restrict where a policy applies. +// - workload `selector` can be used to further restrict where a policy applies. // -// For example, -// -// The following authorization policy applies to all workloads in namespace foo. It allows nothing and effectively denies -// all requests to workloads in namespace foo. +// For example, the following authorization policy applies to all workloads in namespace `foo`. It allows nothing and effectively denies +// all requests to workloads in namespace `foo`. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -153,7 +175,7 @@ import "type/v1beta1/selector.proto"; // {} // ``` // -// The following authorization policy allows all requests to workloads in namespace foo. +// The following authorization policy allows all requests to workloads in namespace `foo`. // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -166,7 +188,7 @@ import "type/v1beta1/selector.proto"; // - {} // ``` // -// The following authorization policy applies to workloads containing label "app: httpbin" in namespace bar. It allows +// The following authorization policy applies to workloads containing label `app: httpbin` in namespace `bar`. It allows // nothing and effectively denies all requests to the selected workloads. // // ```yaml @@ -181,8 +203,8 @@ import "type/v1beta1/selector.proto"; // app: httpbin // ``` // -// The following authorization policy applies to workloads containing label "version: v1" in all namespaces in the mesh. -// (Assuming the root namespace is configured to "istio-system"). +// The following authorization policy applies to workloads containing label `version: v1` in all namespaces in the mesh. +// (Assuming the root namespace is configured to `istio-system`). // // ```yaml // apiVersion: security.istio.io/v1beta1 @@ -195,6 +217,31 @@ import "type/v1beta1/selector.proto"; // matchLabels: // version: v1 // ``` +// +// The following example shows you how to set up an authorization policy using an [experimental annotation](https://istio.io/latest/docs/reference/config/annotations/) +// `istio.io/dry-run` to dry-run the policy without actually enforcing it. +// +// The dry-run annotation allows you to better understand the effect of an authorization policy before applying it to the production traffic. +// This helps to reduce the risk of breaking the production traffic caused by an incorrect authorization policy. +// For more information, see [dry-run tasks](https://istio.io/latest/docs/tasks/security/authorization/authz-dry-run/). +// +// ```yaml +// apiVersion: security.istio.io/v1beta1 +// kind: AuthorizationPolicy +// metadata: +// name: dry-run-example +// annotations: +// "istio.io/dry-run": "true" +// spec: +// selector: +// matchLabels: +// app: httpbin +// action: DENY +// rules: +// - to: +// - operation: +// paths: ["/headers"] +// ``` package istio.security.v1beta1; option go_package="istio.io/api/security/v1beta1"; @@ -219,6 +266,9 @@ option go_package="istio.io/api/security/v1beta1"; // +genclient // +k8s:deepcopy-gen=true // --> +// message AuthorizationPolicy { // Optional. The selector decides where to apply the authorization policy. The selector will match with workloads // in the same namespace as the authorization policy. If the authorization policy is in the root namespace, the selector @@ -266,19 +316,19 @@ message AuthorizationPolicy { // apiVersion: security.istio.io/v1beta1 // kind: AuthorizationPolicy // metadata: - // name: ext-authz - // namespace: istio-system + // name: ext-authz + // namespace: istio-system // spec: - // selector: - // matchLabels: - // app: istio-ingressgateway - // action: CUSTOM - // provider: - // name: "my-custom-authz" - // rules: - // - to: - // - operation: - // paths: ["/admin/*"] + // selector: + // matchLabels: + // app: istio-ingressgateway + // action: CUSTOM + // provider: + // name: "my-custom-authz" + // rules: + // - to: + // - operation: + // paths: ["/admin/*"] // ``` CUSTOM = 3; } @@ -309,7 +359,7 @@ message AuthorizationPolicy { // - Suffix match: "*abc" will match on value "abc" and "xabc". // - Presence match: "*" will match when value is not empty. message Rule { - // From includes a list or sources. + // From includes a list of sources. message From { // Source specifies the source of a request. Source source = 1; @@ -320,7 +370,7 @@ message Rule { // If not set, any source is allowed. repeated From from = 1; - // To includes a list or operations. + // To includes a list of operations. message To { // Operation specifies the operation of a request. Operation operation = 1; @@ -341,12 +391,12 @@ message Rule { // ANDed together. // // For example, the following source matches if the principal is "admin" or "dev" -// and the namespace is "prod" or "test" and the ip is not "1.2.3.4". +// and the namespace is "prod" or "test" and the ip is not "203.0.113.4". // // ```yaml // principals: ["admin", "dev"] // namespaces: ["prod", "test"] -// notIpBlocks: ["1.2.3.4"] +// notIpBlocks: ["203.0.113.4"] // ``` message Source { // Optional. A list of peer identities derived from the peer certificate. The peer identity is in the format of @@ -378,8 +428,8 @@ message Source { // Optional. A list of negative match of namespaces. repeated string not_namespaces = 7; - // Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. "1.2.3.4") and - // CIDR (e.g. "1.2.3.0/24") are supported. This is the same as the `source.ip` attribute. + // Optional. A list of IP blocks, populated from the source address of the IP packet. Single IP (e.g. "203.0.113.4") and + // CIDR (e.g. "203.0.113.0/24") are supported. This is the same as the `source.ip` attribute. // // If not set, any IP is allowed. repeated string ip_blocks = 4; @@ -388,10 +438,10 @@ message Source { repeated string not_ip_blocks = 8; // Optional. A list of IP blocks, populated from X-Forwarded-For header or proxy protocol. - // To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig + // To make use of this field, you must configure the numTrustedProxies field of the gatewayTopology under the meshConfig // when you install Istio or using an annotation on the ingress gateway. See the documentation here: // [Configuring Gateway Network Topology](https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/). - // Single IP (e.g. "1.2.3.4") and CIDR (e.g. "1.2.3.0/24") are supported. + // Single IP (e.g. "203.0.113.4") and CIDR (e.g. "203.0.113.0/24") are supported. // This is the same as the `remote.ip` attribute. // // If not set, any IP is allowed. diff --git a/vendor/istio.io/api/security/v1beta1/authorization_policy_deepcopy.gen.go b/vendor/istio.io/api/security/v1beta1/authorization_policy_deepcopy.gen.go index 4df03f74a..7be28bc1f 100644 --- a/vendor/istio.io/api/security/v1beta1/authorization_policy_deepcopy.gen.go +++ b/vendor/istio.io/api/security/v1beta1/authorization_policy_deepcopy.gen.go @@ -2,7 +2,7 @@ package v1beta1 import ( - proto "github.com/golang/protobuf/proto" + proto "google.golang.org/protobuf/proto" ) // DeepCopyInto supports using AuthorizationPolicy within kubernetes types, where deepcopy-gen is used. diff --git a/vendor/istio.io/api/security/v1beta1/jwt.gen.json b/vendor/istio.io/api/security/v1beta1/jwt.gen.json index a7fbbc746..92cf1f8ba 100644 --- a/vendor/istio.io/api/security/v1beta1/jwt.gen.json +++ b/vendor/istio.io/api/security/v1beta1/jwt.gen.json @@ -6,6 +6,20 @@ }, "components": { "schemas": { + "istio.security.v1beta1.ClaimToHeader": { + "description": "This message specifies the detail for copying claim to header.", + "type": "object", + "properties": { + "header": { + "description": "The name of the header to be created. The header will be overridden if it already exists in the request.", + "type": "string" + }, + "claim": { + "description": "The name of the claim to be copied from. Only claim of type string/int/bool is supported. The header will not be there if the claim does not exist or the type of the claim is not supported.", + "type": "string" + } + } + }, "istio.security.v1beta1.JWTHeader": { "description": "This message specifies a header location to extract JWT token.", "type": "object", @@ -15,13 +29,13 @@ "type": "string" }, "prefix": { - "description": "The prefix that should be stripped before decoding the token. For example, for \"Authorization: Bearer \u003ctoken\u003e\", prefix=\"Bearer \" with a space at the end. If the header doesn't have this exact prefix, it is considered invalid.", + "description": "The prefix that should be stripped before decoding the token. For example, for `Authorization: Bearer \u003ctoken\u003e`, prefix=`Bearer` with a space at the end. If the header doesn't have this exact prefix, it is considered invalid.", "type": "string" } } }, "istio.security.v1beta1.JWTRule": { - "description": "JSON Web Token (JWT) token format for authentication as defined by [RFC 7519](https://tools.ietf.org/html/rfc7519). See [OAuth 2.0](https://tools.ietf.org/html/rfc6749) and [OIDC 1.0](http://openid.net/connect) for how this is used in the whole authentication flow.", + "description": "\u003c!-- istio code generation tags +istio.io/sync-start --\u003e JSON Web Token (JWT) token format for authentication as defined by [RFC 7519](https://tools.ietf.org/html/rfc7519). See [OAuth 2.0](https://tools.ietf.org/html/rfc6749) and [OIDC 1.0](http://openid.net/connect) for how this is used in the whole authentication flow.", "type": "object", "properties": { "issuer": { @@ -29,7 +43,7 @@ "type": "string" }, "audiences": { - "description": "The list of JWT [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted.", + "description": "The list of JWT [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3) that are allowed to access. A JWT containing any of these audiences will be accepted.", "type": "array", "items": { "type": "string" @@ -44,14 +58,14 @@ "type": "string" }, "fromHeaders": { - "description": "List of header locations from which JWT is expected. For example, below is the location spec if JWT is expected to be found in `x-jwt-assertion` header, and have \"Bearer \" prefix: ```yaml fromHeaders: - name: x-jwt-assertion prefix: \"Bearer \" ```", + "description": "List of header locations from which JWT is expected. For example, below is the location spec if JWT is expected to be found in `x-jwt-assertion` header, and have `Bearer` prefix: ```yaml fromHeaders: - name: x-jwt-assertion prefix: \"Bearer \" ```", "type": "array", "items": { "$ref": "#/components/schemas/istio.security.v1beta1.JWTHeader" } }, "fromParams": { - "description": "List of query parameters from which JWT is expected. For example, if JWT is provided via query parameter `my_token` (e.g /path?my_token=\u003cJWT\u003e), the config is: ```yaml fromParams: - \"my_token\" ```", + "description": "List of query parameters from which JWT is expected. For example, if JWT is provided via query parameter `my_token` (e.g `/path?my_token=\u003cJWT\u003e`), the config is: ```yaml fromParams: - \"my_token\" ```", "type": "array", "items": { "type": "string" @@ -64,6 +78,13 @@ "forwardOriginalToken": { "description": "If set to true, the original token will be kept for the upstream request. Default is false.", "type": "boolean" + }, + "outputClaimToHeaders": { + "description": "This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. This differs from the `output_payload_to_header` by allowing outputting individual claims instead of the whole payload. The header specified in each operation in the list must be unique. Nested claims of type string/int/bool is supported as well. ``` outputClaimToHeaders: - header: x-my-company-jwt-group claim: my-group - header: x-test-environment-flag claim: test-flag - header: x-jwt-claim-group claim: nested.key.group ``` [Experimental] This feature is a experimental feature.", + "type": "array", + "items": { + "$ref": "#/components/schemas/istio.security.v1beta1.ClaimToHeader" + } } } } diff --git a/vendor/istio.io/api/security/v1beta1/jwt.pb.go b/vendor/istio.io/api/security/v1beta1/jwt.pb.go index 3d83414c2..5c23ac4c2 100644 --- a/vendor/istio.io/api/security/v1beta1/jwt.pb.go +++ b/vendor/istio.io/api/security/v1beta1/jwt.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: security/v1beta1/jwt.proto @@ -41,6 +41,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// // JSON Web Token (JWT) token format for authentication as defined by // [RFC 7519](https://tools.ietf.org/html/rfc7519). See [OAuth 2.0](https://tools.ietf.org/html/rfc6749) and // [OIDC 1.0](http://openid.net/connect) for how this is used in the whole @@ -56,8 +59,9 @@ const ( // ```yaml // issuer: https://example.com // audiences: -// - bookstore_android.apps.example.com -// bookstore_web.apps.example.com +// - bookstore_android.apps.example.com +// bookstore_web.apps.example.com +// // ``` // // This example specifies a token in a non-default location (`x-goog-iap-jwt-assertion` header). It also @@ -78,11 +82,11 @@ type JWTRule struct { // [issuer](https://tools.ietf.org/html/rfc7519#section-4.1.1) // A JWT with different `iss` claim will be rejected. // - // Example: https://foobar.auth0.com - // Example: 1234567-compute@developer.gserviceaccount.com + // Example: `https://foobar.auth0.com` + // Example: `1234567-compute@developer.gserviceaccount.com` Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` // The list of JWT - // [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3). + // [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3) // that are allowed to access. A JWT containing any of these // audiences will be accepted. // @@ -92,8 +96,9 @@ type JWTRule struct { // // ```yaml // audiences: - // - bookstore_android.apps.example.com - // bookstore_web.apps.example.com + // - bookstore_android.apps.example.com + // bookstore_web.apps.example.com + // // ``` Audiences []string `protobuf:"bytes,2,rep,name=audiences,proto3" json:"audiences,omitempty"` // URL of the provider's public key set to validate signature of the @@ -115,23 +120,27 @@ type JWTRule struct { // Note: Only one of `jwksUri` and `jwks` should be used. Jwks string `protobuf:"bytes,10,opt,name=jwks,proto3" json:"jwks,omitempty"` // List of header locations from which JWT is expected. For example, below is the location spec - // if JWT is expected to be found in `x-jwt-assertion` header, and have "Bearer " prefix: + // if JWT is expected to be found in `x-jwt-assertion` header, and have `Bearer` prefix: // // ```yaml - // fromHeaders: - // - name: x-jwt-assertion - // prefix: "Bearer " + // + // fromHeaders: + // - name: x-jwt-assertion + // prefix: "Bearer " + // // ``` // // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of // such requests is undefined. FromHeaders []*JWTHeader `protobuf:"bytes,6,rep,name=from_headers,json=fromHeaders,proto3" json:"from_headers,omitempty"` // List of query parameters from which JWT is expected. For example, if JWT is provided via query - // parameter `my_token` (e.g /path?my_token=), the config is: + // parameter `my_token` (e.g `/path?my_token=`), the config is: // // ```yaml - // fromParams: - // - "my_token" + // + // fromParams: + // - "my_token" + // // ``` // // Note: Requests with multiple tokens (at different locations) are not supported, the output principal of @@ -143,6 +152,22 @@ type JWTRule struct { OutputPayloadToHeader string `protobuf:"bytes,8,opt,name=output_payload_to_header,json=outputPayloadToHeader,proto3" json:"output_payload_to_header,omitempty"` // If set to true, the original token will be kept for the upstream request. Default is false. ForwardOriginalToken bool `protobuf:"varint,9,opt,name=forward_original_token,json=forwardOriginalToken,proto3" json:"forward_original_token,omitempty"` + // This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. + // This differs from the `output_payload_to_header` by allowing outputting individual claims instead of the whole payload. + // The header specified in each operation in the list must be unique. Nested claims of type string/int/bool is supported as well. + // ``` + // + // outputClaimToHeaders: + // - header: x-my-company-jwt-group + // claim: my-group + // - header: x-test-environment-flag + // claim: test-flag + // - header: x-jwt-claim-group + // claim: nested.key.group + // + // ``` + // [Experimental] This feature is a experimental feature. + OutputClaimToHeaders []*ClaimToHeader `protobuf:"bytes,11,rep,name=output_claim_to_headers,json=outputClaimToHeaders,proto3" json:"output_claim_to_headers,omitempty"` // [TODO:Update the status whenever this feature is promoted.] } func (x *JWTRule) Reset() { @@ -233,6 +258,13 @@ func (x *JWTRule) GetForwardOriginalToken() bool { return false } +func (x *JWTRule) GetOutputClaimToHeaders() []*ClaimToHeader { + if x != nil { + return x.OutputClaimToHeaders + } + return nil +} + // This message specifies a header location to extract JWT token. type JWTHeader struct { state protoimpl.MessageState @@ -242,7 +274,7 @@ type JWTHeader struct { // The HTTP header name. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // The prefix that should be stripped before decoding the token. - // For example, for "Authorization: Bearer ", prefix="Bearer " with a space at the end. + // For example, for `Authorization: Bearer `, prefix=`Bearer` with a space at the end. // If the header doesn't have this exact prefix, it is considered invalid. Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3" json:"prefix,omitempty"` } @@ -293,6 +325,65 @@ func (x *JWTHeader) GetPrefix() string { return "" } +// This message specifies the detail for copying claim to header. +type ClaimToHeader struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The name of the header to be created. The header will be overridden if it already exists in the request. + Header string `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` + // The name of the claim to be copied from. Only claim of type string/int/bool is supported. + // The header will not be there if the claim does not exist or the type of the claim is not supported. + Claim string `protobuf:"bytes,2,opt,name=claim,proto3" json:"claim,omitempty"` +} + +func (x *ClaimToHeader) Reset() { + *x = ClaimToHeader{} + if protoimpl.UnsafeEnabled { + mi := &file_security_v1beta1_jwt_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClaimToHeader) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClaimToHeader) ProtoMessage() {} + +func (x *ClaimToHeader) ProtoReflect() protoreflect.Message { + mi := &file_security_v1beta1_jwt_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClaimToHeader.ProtoReflect.Descriptor instead. +func (*ClaimToHeader) Descriptor() ([]byte, []int) { + return file_security_v1beta1_jwt_proto_rawDescGZIP(), []int{2} +} + +func (x *ClaimToHeader) GetHeader() string { + if x != nil { + return x.Header + } + return "" +} + +func (x *ClaimToHeader) GetClaim() string { + if x != nil { + return x.Claim + } + return "" +} + var File_security_v1beta1_jwt_proto protoreflect.FileDescriptor var file_security_v1beta1_jwt_proto_rawDesc = []byte{ @@ -301,34 +392,44 @@ var file_security_v1beta1_jwt_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xca, 0x02, 0x0a, 0x07, 0x4a, 0x57, 0x54, 0x52, 0x75, 0x6c, - 0x65, 0x12, 0x1c, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, - 0x08, 0x6a, 0x77, 0x6b, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6a, 0x77, 0x6b, 0x73, 0x55, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x77, 0x6b, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x12, 0x44, 0x0a, 0x0c, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x57, 0x54, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, - 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x66, 0x6f, - 0x72, 0x77, 0x61, 0x72, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x3d, 0x0a, 0x09, 0x4a, 0x57, 0x54, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, - 0x18, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, - 0x41, 0x01, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, - 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, - 0x78, 0x42, 0x1f, 0x5a, 0x1d, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x03, 0x0a, 0x07, 0x4a, 0x57, 0x54, 0x52, 0x75, 0x6c, + 0x65, 0x12, 0x1b, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1c, + 0x0a, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, + 0x6a, 0x77, 0x6b, 0x73, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6a, 0x77, 0x6b, 0x73, 0x55, 0x72, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x18, + 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x12, 0x44, 0x0a, 0x0c, 0x66, + 0x72, 0x6f, 0x6d, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, + 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x57, 0x54, 0x48, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x52, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x16, 0x66, + 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x66, 0x6f, 0x72, + 0x77, 0x61, 0x72, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x5c, 0x0a, 0x17, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x63, 0x6c, 0x61, 0x69, + 0x6d, 0x5f, 0x74, 0x6f, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6c, 0x61, 0x69, + 0x6d, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x14, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x22, + 0x3c, 0x0a, 0x09, 0x4a, 0x57, 0x54, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x3d, 0x0a, + 0x0d, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x6f, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x42, 0x1f, 0x5a, 0x1d, + 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x65, 0x63, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -343,18 +444,20 @@ func file_security_v1beta1_jwt_proto_rawDescGZIP() []byte { return file_security_v1beta1_jwt_proto_rawDescData } -var file_security_v1beta1_jwt_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_security_v1beta1_jwt_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_security_v1beta1_jwt_proto_goTypes = []interface{}{ - (*JWTRule)(nil), // 0: istio.security.v1beta1.JWTRule - (*JWTHeader)(nil), // 1: istio.security.v1beta1.JWTHeader + (*JWTRule)(nil), // 0: istio.security.v1beta1.JWTRule + (*JWTHeader)(nil), // 1: istio.security.v1beta1.JWTHeader + (*ClaimToHeader)(nil), // 2: istio.security.v1beta1.ClaimToHeader } var file_security_v1beta1_jwt_proto_depIdxs = []int32{ 1, // 0: istio.security.v1beta1.JWTRule.from_headers:type_name -> istio.security.v1beta1.JWTHeader - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 2, // 1: istio.security.v1beta1.JWTRule.output_claim_to_headers:type_name -> istio.security.v1beta1.ClaimToHeader + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_security_v1beta1_jwt_proto_init() } @@ -387,6 +490,18 @@ func file_security_v1beta1_jwt_proto_init() { return nil } } + file_security_v1beta1_jwt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClaimToHeader); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -394,7 +509,7 @@ func file_security_v1beta1_jwt_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_security_v1beta1_jwt_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, diff --git a/vendor/istio.io/api/security/v1beta1/jwt.pb.html b/vendor/istio.io/api/security/v1beta1/jwt.pb.html index efb5da0eb..2e9b6c8d2 100644 --- a/vendor/istio.io/api/security/v1beta1/jwt.pb.html +++ b/vendor/istio.io/api/security/v1beta1/jwt.pb.html @@ -6,7 +6,7 @@ generator: protoc-gen-docs schema: istio.security.v1beta1.JWTRule aliases: [/docs/reference/config/security/v1beta1/jwt] -number_of_entries: 2 +number_of_entries: 3 ---

    JWTRule

    @@ -14,23 +14,18 @@

    JWTRule

    RFC 7519. See OAuth 2.0 and OIDC 1.0 for how this is used in the whole authentication flow.

    -

    Examples:

    -

    Spec for a JWT that is issued by https://example.com, with the audience claims must be either bookstore_android.apps.example.com or bookstore_web.apps.example.com. The token should be presented at the Authorization header (default). The JSON Web Key Set (JWKS) will be discovered following OpenID Connect protocol.

    -
    issuer: https://example.com
     audiences:
     - bookstore_android.apps.example.com
       bookstore_web.apps.example.com
     
    -

    This example specifies a token in a non-default location (x-goog-iap-jwt-assertion header). It also defines the URI to fetch JWKS explicitly.

    -
    issuer: https://example.com
     jwksUri: https://example.com/.secret/jwks.json
     fromHeaders:
    @@ -54,9 +49,8 @@ 

    JWTRule

    Identifies the issuer that issued the JWT. See issuer A JWT with different iss claim will be rejected.

    - -

    Example: https://foobar.auth0.com -Example: 1234567-compute@developer.gserviceaccount.com

    +

    Example: https://foobar.auth0.com +Example: 1234567-compute@developer.gserviceaccount.com

    @@ -113,8 +101,7 @@

    JWTRule

    @@ -127,13 +114,11 @@

    JWTRule

    + + + + + + @@ -229,3 +234,43 @@

    JWTHeader

    @@ -68,14 +62,11 @@

    JWTRule

    string[]

    The list of JWT -audiences. +audiences that are allowed to access. A JWT containing any of these audiences will be accepted.

    -

    The service name will be accepted if audiences is empty.

    -

    Example:

    -
    audiences:
     - bookstore_android.apps.example.com
       bookstore_web.apps.example.com
    @@ -92,15 +83,12 @@ 

    JWTRule

    URL of the provider’s public key set to validate signature of the JWT. See OpenID Discovery.

    -

    Optional if the key set document can either (a) be retrieved from OpenID Discovery of the issuer or (b) inferred from the email domain of the issuer (e.g. a Google service account).

    -

    Example: https://www.googleapis.com/oauth2/v1/certs

    -

    Note: Only one of jwksUri and jwks should be used.

    string

    JSON Web Key Set of public keys to validate signature of the JWT. -See https://auth0.com/docs/jwks.

    - +See https://auth0.com/docs/jwks.

    Note: Only one of jwksUri and jwks should be used.

    JWTHeader[]

    List of header locations from which JWT is expected. For example, below is the location spec -if JWT is expected to be found in x-jwt-assertion header, and have “Bearer ” prefix:

    - +if JWT is expected to be found in x-jwt-assertion header, and have Bearer prefix:

      fromHeaders:
       - name: x-jwt-assertion
         prefix: "Bearer "
     
    -

    Note: Requests with multiple tokens (at different locations) are not supported, the output principal of such requests is undefined.

    @@ -147,12 +132,10 @@

    JWTRule

    string[]

    List of query parameters from which JWT is expected. For example, if JWT is provided via query -parameter my_token (e.g /path?my_token=), the config is:

    - +parameter my_token (e.g /path?my_token=<JWT>), the config is:

      fromParams:
       - "my_token"
     
    -

    Note: Requests with multiple tokens (at different locations) are not supported, the output principal of such requests is undefined.

    @@ -180,6 +163,28 @@

    JWTRule

    If set to true, the original token will be kept for the upstream request. Default is false.

    +
    +No +
    outputClaimToHeadersClaimToHeader[] +

    This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. +This differs from the output_payload_to_header by allowing outputting individual claims instead of the whole payload. +The header specified in each operation in the list must be unique. Nested claims of type string/int/bool is supported as well.

    +
      outputClaimToHeaders:
    +  - header: x-my-company-jwt-group
    +    claim: my-group
    +  - header: x-test-environment-flag
    +    claim: test-flag
    +  - header: x-jwt-claim-group
    +    claim: nested.key.group
    +
    +

    [Experimental] This feature is a experimental feature.

    +
    No @@ -218,7 +223,7 @@

    JWTHeader

    string

    The prefix that should be stripped before decoding the token. -For example, for “Authorization: Bearer ”, prefix=“Bearer ” with a space at the end. +For example, for Authorization: Bearer <token>, prefix=Bearer with a space at the end. If the header doesn’t have this exact prefix, it is considered invalid.

    +

    ClaimToHeader

    +
    +

    This message specifies the detail for copying claim to header.

    + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeDescriptionRequired
    headerstring +

    The name of the header to be created. The header will be overridden if it already exists in the request.

    + +
    +No +
    claimstring +

    The name of the claim to be copied from. Only claim of type string/int/bool is supported. +The header will not be there if the claim does not exist or the type of the claim is not supported.

    + +
    +No +
    +
    diff --git a/vendor/istio.io/api/security/v1beta1/jwt.proto b/vendor/istio.io/api/security/v1beta1/jwt.proto index 858b7f283..fbd8d5a79 100644 --- a/vendor/istio.io/api/security/v1beta1/jwt.proto +++ b/vendor/istio.io/api/security/v1beta1/jwt.proto @@ -25,6 +25,9 @@ package istio.security.v1beta1; option go_package="istio.io/api/security/v1beta1"; +// // JSON Web Token (JWT) token format for authentication as defined by // [RFC 7519](https://tools.ietf.org/html/rfc7519). See [OAuth 2.0](https://tools.ietf.org/html/rfc6749) and // [OIDC 1.0](http://openid.net/connect) for how this is used in the whole @@ -58,12 +61,12 @@ message JWTRule { // [issuer](https://tools.ietf.org/html/rfc7519#section-4.1.1) // A JWT with different `iss` claim will be rejected. // - // Example: https://foobar.auth0.com - // Example: 1234567-compute@developer.gserviceaccount.com + // Example: `https://foobar.auth0.com` + // Example: `1234567-compute@developer.gserviceaccount.com` string issuer = 1 [(google.api.field_behavior) = REQUIRED]; // The list of JWT - // [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3). + // [audiences](https://tools.ietf.org/html/rfc7519#section-4.1.3) // that are allowed to access. A JWT containing any of these // audiences will be accepted. // @@ -112,7 +115,7 @@ message JWTRule { // [URI Query Parameter](https://tools.ietf.org/html/rfc6750#section-2.3)) // List of header locations from which JWT is expected. For example, below is the location spec - // if JWT is expected to be found in `x-jwt-assertion` header, and have "Bearer " prefix: + // if JWT is expected to be found in `x-jwt-assertion` header, and have `Bearer` prefix: // // ```yaml // fromHeaders: @@ -125,7 +128,7 @@ message JWTRule { repeated JWTHeader from_headers = 6; // List of query parameters from which JWT is expected. For example, if JWT is provided via query - // parameter `my_token` (e.g /path?my_token=), the config is: + // parameter `my_token` (e.g `/path?my_token=`), the config is: // // ```yaml // fromParams: @@ -143,6 +146,22 @@ message JWTRule { // If set to true, the original token will be kept for the upstream request. Default is false. bool forward_original_token = 9; + + + // This field specifies a list of operations to copy the claim to HTTP headers on a successfully verified token. + // This differs from the `output_payload_to_header` by allowing outputting individual claims instead of the whole payload. + // The header specified in each operation in the list must be unique. Nested claims of type string/int/bool is supported as well. + // ``` + // outputClaimToHeaders: + // - header: x-my-company-jwt-group + // claim: my-group + // - header: x-test-environment-flag + // claim: test-flag + // - header: x-jwt-claim-group + // claim: nested.key.group + // ``` + // [Experimental] This feature is a experimental feature. + repeated ClaimToHeader output_claim_to_headers = 11; // [TODO:Update the status whenever this feature is promoted.] } // This message specifies a header location to extract JWT token. @@ -151,7 +170,17 @@ message JWTHeader { string name = 1 [(google.api.field_behavior) = REQUIRED]; // The prefix that should be stripped before decoding the token. - // For example, for "Authorization: Bearer ", prefix="Bearer " with a space at the end. + // For example, for `Authorization: Bearer `, prefix=`Bearer` with a space at the end. // If the header doesn't have this exact prefix, it is considered invalid. string prefix = 2; } + +// This message specifies the detail for copying claim to header. +message ClaimToHeader { + // The name of the header to be created. The header will be overridden if it already exists in the request. + string header = 1; + + // The name of the claim to be copied from. Only claim of type string/int/bool is supported. + // The header will not be there if the claim does not exist or the type of the claim is not supported. + string claim = 2; +} diff --git a/vendor/istio.io/api/security/v1beta1/jwt_deepcopy.gen.go b/vendor/istio.io/api/security/v1beta1/jwt_deepcopy.gen.go index af5a302bf..54f52f017 100644 --- a/vendor/istio.io/api/security/v1beta1/jwt_deepcopy.gen.go +++ b/vendor/istio.io/api/security/v1beta1/jwt_deepcopy.gen.go @@ -2,7 +2,7 @@ package v1beta1 import ( - proto "github.com/golang/protobuf/proto" + proto "google.golang.org/protobuf/proto" ) // DeepCopyInto supports using JWTRule within kubernetes types, where deepcopy-gen is used. @@ -46,3 +46,24 @@ func (in *JWTHeader) DeepCopy() *JWTHeader { func (in *JWTHeader) DeepCopyInterface() interface{} { return in.DeepCopy() } + +// DeepCopyInto supports using ClaimToHeader within kubernetes types, where deepcopy-gen is used. +func (in *ClaimToHeader) DeepCopyInto(out *ClaimToHeader) { + p := proto.Clone(in).(*ClaimToHeader) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClaimToHeader. Required by controller-gen. +func (in *ClaimToHeader) DeepCopy() *ClaimToHeader { + if in == nil { + return nil + } + out := new(ClaimToHeader) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new ClaimToHeader. Required by controller-gen. +func (in *ClaimToHeader) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/vendor/istio.io/api/security/v1beta1/jwt_json.gen.go b/vendor/istio.io/api/security/v1beta1/jwt_json.gen.go index 0f688cb2d..2612d3a32 100644 --- a/vendor/istio.io/api/security/v1beta1/jwt_json.gen.go +++ b/vendor/istio.io/api/security/v1beta1/jwt_json.gen.go @@ -28,6 +28,17 @@ func (this *JWTHeader) UnmarshalJSON(b []byte) error { return JwtUnmarshaler.Unmarshal(bytes.NewReader(b), this) } +// MarshalJSON is a custom marshaler for ClaimToHeader +func (this *ClaimToHeader) MarshalJSON() ([]byte, error) { + str, err := JwtMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for ClaimToHeader +func (this *ClaimToHeader) UnmarshalJSON(b []byte) error { + return JwtUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + var ( JwtMarshaler = &jsonpb.Marshaler{} JwtUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true} diff --git a/vendor/istio.io/api/security/v1beta1/peer_authentication.pb.go b/vendor/istio.io/api/security/v1beta1/peer_authentication.pb.go index 79c812669..f31944c78 100644 --- a/vendor/istio.io/api/security/v1beta1/peer_authentication.pb.go +++ b/vendor/istio.io/api/security/v1beta1/peer_authentication.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: security/v1beta1/peer_authentication.proto @@ -106,11 +106,15 @@ func (PeerAuthentication_MutualTLS_Mode) EnumDescriptor() ([]byte, []int) { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// mtls: -// mode: STRICT +// +// mtls: +// mode: STRICT +// // ``` // For mesh level, put the policy in root-namespace according to your Istio installation. // @@ -120,23 +124,31 @@ func (PeerAuthentication_MutualTLS_Mode) EnumDescriptor() ([]byte, []int) { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// mtls: -// mode: PERMISSIVE +// +// mtls: +// mode: PERMISSIVE +// // --- // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: finance +// namespace: foo +// // spec: -// selector: -// matchLabels: -// app: finance -// mtls: -// mode: STRICT +// +// selector: +// matchLabels: +// app: finance +// mtls: +// mode: STRICT +// // ``` // Policy to allow mTLS strict for all workloads, but leave port 8080 to // plaintext: @@ -144,17 +156,21 @@ func (PeerAuthentication_MutualTLS_Mode) EnumDescriptor() ([]byte, []int) { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// selector: -// matchLabels: -// app: finance -// mtls: -// mode: STRICT -// portLevelMtls: -// 8080: -// mode: DISABLE +// +// selector: +// matchLabels: +// app: finance +// mtls: +// mode: STRICT +// portLevelMtls: +// 8080: +// mode: DISABLE +// // ``` // Policy to inherit mTLS mode from namespace (or mesh) settings, and overwrite // settings for port 8080 @@ -162,17 +178,21 @@ func (PeerAuthentication_MutualTLS_Mode) EnumDescriptor() ([]byte, []int) { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// selector: -// matchLabels: -// app: finance -// mtls: -// mode: UNSET -// portLevelMtls: -// 8080: -// mode: DISABLE +// +// selector: +// matchLabels: +// app: finance +// mtls: +// mode: UNSET +// portLevelMtls: +// 8080: +// mode: DISABLE +// // ``` // // +// type RequestAuthentication struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/vendor/istio.io/api/security/v1beta1/request_authentication.pb.html b/vendor/istio.io/api/security/v1beta1/request_authentication.pb.html index 8e9adf780..dad687324 100644 --- a/vendor/istio.io/api/security/v1beta1/request_authentication.pb.html +++ b/vendor/istio.io/api/security/v1beta1/request_authentication.pb.html @@ -16,11 +16,9 @@

    RequestAuthentication

    will be accepted but will not have any authenticated identity. To restrict access to authenticated requests only, this should be accompanied by an authorization rule. Examples:

    -
    • Require JWT for all request for workloads that have label app:httpbin
    -
    apiVersion: security.istio.io/v1beta1
     kind: RequestAuthentication
     metadata:
    @@ -48,13 +46,11 @@ 

    RequestAuthentication

    - source: requestPrincipals: ["*"]
    -
    • A policy in the root namespace (“istio-system” by default) applies to workloads in all namespaces in a mesh. The following policy makes all workloads only accept requests that contain a valid JWT token.
    -
    apiVersion: security.istio.io/v1beta1
     kind: RequestAuthentication
     metadata:
    @@ -76,13 +72,11 @@ 

    RequestAuthentication

    - source: requestPrincipals: ["*"]
    -
    • The next example shows how to set a different JWT requirement for a different host. The RequestAuthentication declares it can accept JWTs issued by either issuer-foo or issuer-bar (the public key set is implicitly set from the OpenID Connect spec).
    -
    apiVersion: security.istio.io/v1beta1
     kind: RequestAuthentication
     metadata:
    @@ -119,13 +113,11 @@ 

    RequestAuthentication

    - operation: hosts: ["another-host.com"]
    -
    • You can fine tune the authorization policy to set different requirement per path. For example, to require JWT on all paths, except /healthz, the same RequestAuthentication can be used, but the authorization policy could be:
    -
    apiVersion: security.istio.io/v1beta1
     kind: AuthorizationPolicy
     metadata:
    @@ -143,33 +135,28 @@ 

    RequestAuthentication

    - operation: paths: ["/healthz"]
    -

    [Experimental] Routing based on derived metadata is now supported. A prefix ‘@’ is used to denote a match against internal metadata instead of the headers in the request. Currently this feature is only supported for the following metadata:

    -
    • request.auth.claims.{claim-name}[.{sub-claim}]* which are extracted from validated JWT tokens. The claim name currently does not support the . character. Examples: request.auth.claims.sub and request.auth.claims.name.givenName.
    -

    The use of matches against JWT claim metadata is only supported in Gateways. The following example shows:

    -
    • RequestAuthentication to decode and validate a JWT. This also makes the @request.auth.claims available for use in the VirtualService.
    • AuthorizationPolicy to check for valid principals in the request. This makes the JWT required for the request.
    • VirtualService to route the request based on the “sub” claim.
    -
    apiVersion: security.istio.io/v1beta1
     kind: RequestAuthentication
     metadata:
       name: jwt-on-ingress
       namespace: istio-system
     spec:
    - selector:
    -   matchLabels:
    -     app: istio-ingressgateway
    +  selector:
    +    matchLabels:
    +      app: istio-ingressgateway
       jwtRules:
       - issuer: "example.com"
         jwksUri: https://example.com/.well-known/jwks.json
    @@ -180,9 +167,9 @@ 

    RequestAuthentication

    name: require-jwt namespace: istio-system spec: - selector: - matchLabels: - app: istio-ingressgateway + selector: + matchLabels: + app: istio-ingressgateway rules: - from: - source: @@ -231,7 +218,6 @@

    RequestAuthentication

    Optional. The selector decides where to apply the request authentication policy. The selector will match with workloads in the same namespace as the request authentication policy. If the request authentication policy is in the root namespace, the selector will additionally match with workloads in all namespaces.

    -

    If not set, the selector will match all workloads.

    diff --git a/vendor/istio.io/api/security/v1beta1/request_authentication.proto b/vendor/istio.io/api/security/v1beta1/request_authentication.proto index 0bfb0bc40..f8cdd5f1a 100644 --- a/vendor/istio.io/api/security/v1beta1/request_authentication.proto +++ b/vendor/istio.io/api/security/v1beta1/request_authentication.proto @@ -176,9 +176,9 @@ option go_package="istio.io/api/security/v1beta1"; // name: jwt-on-ingress // namespace: istio-system // spec: -// selector: -// matchLabels: -// app: istio-ingressgateway +// selector: +// matchLabels: +// app: istio-ingressgateway // jwtRules: // - issuer: "example.com" // jwksUri: https://example.com/.well-known/jwks.json @@ -189,9 +189,9 @@ option go_package="istio.io/api/security/v1beta1"; // name: require-jwt // namespace: istio-system // spec: -// selector: -// matchLabels: -// app: istio-ingressgateway +// selector: +// matchLabels: +// app: istio-ingressgateway // rules: // - from: // - source: @@ -241,6 +241,9 @@ option go_package="istio.io/api/security/v1beta1"; // +genclient // +k8s:deepcopy-gen=true // --> +// message RequestAuthentication { // Optional. The selector decides where to apply the request authentication policy. The selector will match with workloads // in the same namespace as the request authentication policy. If the request authentication policy is in the root namespace, diff --git a/vendor/istio.io/api/security/v1beta1/request_authentication_deepcopy.gen.go b/vendor/istio.io/api/security/v1beta1/request_authentication_deepcopy.gen.go index 9b63f44dc..a6c645b84 100644 --- a/vendor/istio.io/api/security/v1beta1/request_authentication_deepcopy.gen.go +++ b/vendor/istio.io/api/security/v1beta1/request_authentication_deepcopy.gen.go @@ -2,7 +2,7 @@ package v1beta1 import ( - proto "github.com/golang/protobuf/proto" + proto "google.golang.org/protobuf/proto" ) // DeepCopyInto supports using RequestAuthentication within kubernetes types, where deepcopy-gen is used. diff --git a/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.go b/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.go index 6f074230e..a785194ac 100644 --- a/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.go +++ b/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: telemetry/v1alpha1/telemetry.proto @@ -173,12 +173,12 @@ // response_code: // operation: REMOVE // - match: -// metric: REQUEST_BYTES +// metric: REQUEST_SIZE // tagOverrides: // response_code: // operation: REMOVE // - match: -// metric: RESPONSE_BYTES +// metric: RESPONSE_SIZE // tagOverrides: // response_code: // operation: REMOVE @@ -196,11 +196,10 @@ // accessLogging: // - providers: // - name: envoy -// # By default, this turns on access logging (no need to set `disabled: -// false`). # Unspecified `disabled` will be treated as `disabled: false`, -// except in # cases where a parent configuration has marked as `disabled: -// true`. In # those cases, `disabled: false` must be set explicitly to -// override. +// # By default, this turns on access logging (no need to set `disabled: false`). +// # Unspecified `disabled` will be treated as `disabled: false`, except in +// # cases where a parent configuration has marked as `disabled: true`. In +// # those cases, `disabled: false` must be set explicitly to override. // ``` // // Policy to disable access logging for the `foo` namespace: @@ -220,7 +219,9 @@ package v1alpha1 import ( + duration "github.com/golang/protobuf/ptypes/duration" wrappers "github.com/golang/protobuf/ptypes/wrappers" + _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" v1beta1 "istio.io/api/type/v1beta1" @@ -627,7 +628,7 @@ type Tracing struct { Match *Tracing_TracingSelector `protobuf:"bytes,7,opt,name=match,proto3" json:"match,omitempty"` // Optional. Name of provider(s) to use for span reporting. If a provider is // not specified, the [default tracing - // provider][istio.mesh.v1alpha1.MeshConfig.default_providers.tracing] will be + // provider](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-DefaultProviders) will be // used. NOTE: At the moment, only a single provider can be specified in a // given Tracing rule. Providers []*ProviderRef `protobuf:"bytes,2,rep,name=providers,proto3" json:"providers,omitempty"` @@ -795,7 +796,7 @@ type Metrics struct { // Optional. Name of providers to which this configuration should apply. // If a provider is not specified, the [default metrics - // provider][istio.mesh.v1alpha1.MeshConfig.default_providers.metrics] will be + // provider](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-DefaultProviders) will be // used. Providers []*ProviderRef `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers,omitempty"` // Optional. Ordered list of overrides to metrics generation behavior. @@ -812,6 +813,10 @@ type Metrics struct { // a best practice to list any universal overrides first, with tailored // overrides following them. Overrides []*MetricsOverrides `protobuf:"bytes,2,rep,name=overrides,proto3" json:"overrides,omitempty"` + // Optional. Reporting interval allows configuration of the time between calls out to for metrics reporting. + // This currently only supports TCP metrics but we may use this for long duration HTTP streams in the future. + // The default duration is `5s`. + ReportingInterval *duration.Duration `protobuf:"bytes,3,opt,name=reporting_interval,json=reportingInterval,proto3" json:"reporting_interval,omitempty"` } func (x *Metrics) Reset() { @@ -860,6 +865,13 @@ func (x *Metrics) GetOverrides() []*MetricsOverrides { return nil } +func (x *Metrics) GetReportingInterval() *duration.Duration { + if x != nil { + return x.ReportingInterval + } + return nil +} + // Provides a mechanism for matching metrics for the application of override // behaviors. type MetricSelector struct { @@ -870,6 +882,7 @@ type MetricSelector struct { // Controls which metric(s) are selected by the selector. // // Types that are assignable to MetricMatch: + // // *MetricSelector_Metric // *MetricSelector_CustomMetric MetricMatch isMetricSelector_MetricMatch `protobuf_oneof:"metric_match"` @@ -1050,7 +1063,7 @@ type AccessLogging struct { Match *AccessLogging_LogSelector `protobuf:"bytes,4,opt,name=match,proto3" json:"match,omitempty"` // Optional. Name of providers to which this configuration should apply. // If a provider is not specified, the [default logging - // provider][istio.mesh.v1alpha1.MeshConfig.default_providers.] will be used. + // provider](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-DefaultProviders) will be used. Providers []*ProviderRef `protobuf:"bytes,1,rep,name=providers,proto3" json:"providers,omitempty"` // Controls logging. If set to true, no access logs will be generated for // impacted workloads (for the specified providers). @@ -1187,6 +1200,7 @@ type Tracing_CustomTag struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Type: + // // *Tracing_CustomTag_Literal // *Tracing_CustomTag_Environment // *Tracing_CustomTag_Header @@ -1627,109 +1641,118 @@ var file_telemetry_v1alpha1_telemetry_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x18, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1b, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x02, 0x0a, 0x09, - 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x08, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x69, 0x73, - 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x07, 0x74, - 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, - 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x52, - 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72, - 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x73, 0x74, 0x69, - 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x07, 0x6d, 0x65, - 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, - 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, - 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, - 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x67, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xe7, 0x08, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x12, 0x47, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x31, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, - 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, - 0x69, 0x6e, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, - 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, - 0x72, 0x52, 0x65, 0x66, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, - 0x5a, 0x0a, 0x1a, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x18, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, - 0x67, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x16, 0x64, - 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, - 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x52, 0x0a, - 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, - 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, - 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, - 0x73, 0x12, 0x63, 0x0a, 0x21, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x61, - 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, - 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1c, 0x75, 0x73, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x61, - 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x1a, 0x4d, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, - 0x67, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x6f, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, - 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x52, - 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x1a, 0xf8, 0x01, 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x54, 0x61, 0x67, 0x12, 0x45, 0x0a, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, - 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, - 0x00, 0x52, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x51, 0x0a, 0x0b, 0x65, 0x6e, - 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2d, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, - 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, - 0x6e, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00, - 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, 0x0a, - 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, + 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, + 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, + 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x97, 0x02, 0x0a, + 0x09, 0x54, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x12, 0x40, 0x0a, 0x08, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x69, + 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3b, 0x0a, 0x07, + 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, - 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, 0x00, - 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x1a, 0x1f, 0x0a, 0x07, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x1a, 0x46, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x48, 0x0a, 0x0d, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, - 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x1a, 0x6a, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, + 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x3b, 0x0a, 0x07, 0x6d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x69, 0x73, 0x74, + 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x07, 0x6d, + 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x4e, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, + 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, + 0x6f, 0x67, 0x67, 0x69, 0x6e, 0x67, 0x22, 0xe7, 0x08, 0x0a, 0x07, 0x54, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x12, 0x47, 0x0a, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x31, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, + 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, + 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x6c, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x09, 0x70, + 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, + 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x72, 0x52, 0x65, 0x66, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x5a, 0x0a, 0x1a, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, + 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x18, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, + 0x6e, 0x67, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x16, + 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x72, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, + 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x14, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, + 0x65, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x52, + 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, + 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, + 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, + 0x67, 0x73, 0x12, 0x63, 0x0a, 0x21, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x73, + 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1c, 0x75, 0x73, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x46, 0x6f, 0x72, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, + 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x1a, 0x4d, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x63, 0x69, + 0x6e, 0x67, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x04, 0x6d, 0x6f, + 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, + 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x65, + 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x1a, 0xf8, 0x01, 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, + 0x6d, 0x54, 0x61, 0x67, 0x12, 0x45, 0x0a, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, + 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, + 0x48, 0x00, 0x52, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x51, 0x0a, 0x0b, 0x65, + 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2d, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, + 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, + 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x48, + 0x00, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x49, + 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, + 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, + 0x67, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x48, + 0x00, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x1a, 0x1f, 0x0a, 0x07, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x1a, 0x46, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, + 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x48, 0x0a, 0x0d, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x6a, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, + 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x41, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, + 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x26, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x12, + 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, + 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xe2, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x74, + 0x72, 0x69, 0x63, 0x73, 0x12, 0x43, 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x54, 0x61, 0x67, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, - 0x21, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x98, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x43, - 0x0a, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, - 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x52, 0x09, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, - 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, - 0x65, 0x73, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x22, 0xdd, 0x03, + 0x61, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x66, 0x52, 0x09, + 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x48, 0x0a, 0x09, 0x6f, 0x76, 0x65, + 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x69, + 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, 0x72, 0x79, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x4f, + 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x73, 0x52, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, + 0x64, 0x65, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0xdd, 0x03, 0x0a, 0x0e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x4e, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x34, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x74, @@ -1866,6 +1889,7 @@ var file_telemetry_v1alpha1_telemetry_proto_goTypes = []interface{}{ (*v1beta1.WorkloadSelector)(nil), // 20: istio.type.v1beta1.WorkloadSelector (*wrappers.DoubleValue)(nil), // 21: google.protobuf.DoubleValue (*wrappers.BoolValue)(nil), // 22: google.protobuf.BoolValue + (*duration.Duration)(nil), // 23: google.protobuf.Duration } var file_telemetry_v1alpha1_telemetry_proto_depIdxs = []int32{ 20, // 0: istio.telemetry.v1alpha1.Telemetry.selector:type_name -> istio.type.v1beta1.WorkloadSelector @@ -1880,28 +1904,29 @@ var file_telemetry_v1alpha1_telemetry_proto_depIdxs = []int32{ 22, // 9: istio.telemetry.v1alpha1.Tracing.use_request_id_for_trace_sampling:type_name -> google.protobuf.BoolValue 5, // 10: istio.telemetry.v1alpha1.Metrics.providers:type_name -> istio.telemetry.v1alpha1.ProviderRef 8, // 11: istio.telemetry.v1alpha1.Metrics.overrides:type_name -> istio.telemetry.v1alpha1.MetricsOverrides - 1, // 12: istio.telemetry.v1alpha1.MetricSelector.metric:type_name -> istio.telemetry.v1alpha1.MetricSelector.IstioMetric - 0, // 13: istio.telemetry.v1alpha1.MetricSelector.mode:type_name -> istio.telemetry.v1alpha1.WorkloadMode - 7, // 14: istio.telemetry.v1alpha1.MetricsOverrides.match:type_name -> istio.telemetry.v1alpha1.MetricSelector - 22, // 15: istio.telemetry.v1alpha1.MetricsOverrides.disabled:type_name -> google.protobuf.BoolValue - 17, // 16: istio.telemetry.v1alpha1.MetricsOverrides.tag_overrides:type_name -> istio.telemetry.v1alpha1.MetricsOverrides.TagOverridesEntry - 18, // 17: istio.telemetry.v1alpha1.AccessLogging.match:type_name -> istio.telemetry.v1alpha1.AccessLogging.LogSelector - 5, // 18: istio.telemetry.v1alpha1.AccessLogging.providers:type_name -> istio.telemetry.v1alpha1.ProviderRef - 22, // 19: istio.telemetry.v1alpha1.AccessLogging.disabled:type_name -> google.protobuf.BoolValue - 19, // 20: istio.telemetry.v1alpha1.AccessLogging.filter:type_name -> istio.telemetry.v1alpha1.AccessLogging.Filter - 0, // 21: istio.telemetry.v1alpha1.Tracing.TracingSelector.mode:type_name -> istio.telemetry.v1alpha1.WorkloadMode - 12, // 22: istio.telemetry.v1alpha1.Tracing.CustomTag.literal:type_name -> istio.telemetry.v1alpha1.Tracing.Literal - 13, // 23: istio.telemetry.v1alpha1.Tracing.CustomTag.environment:type_name -> istio.telemetry.v1alpha1.Tracing.Environment - 14, // 24: istio.telemetry.v1alpha1.Tracing.CustomTag.header:type_name -> istio.telemetry.v1alpha1.Tracing.RequestHeader - 11, // 25: istio.telemetry.v1alpha1.Tracing.CustomTagsEntry.value:type_name -> istio.telemetry.v1alpha1.Tracing.CustomTag - 2, // 26: istio.telemetry.v1alpha1.MetricsOverrides.TagOverride.operation:type_name -> istio.telemetry.v1alpha1.MetricsOverrides.TagOverride.Operation - 16, // 27: istio.telemetry.v1alpha1.MetricsOverrides.TagOverridesEntry.value:type_name -> istio.telemetry.v1alpha1.MetricsOverrides.TagOverride - 0, // 28: istio.telemetry.v1alpha1.AccessLogging.LogSelector.mode:type_name -> istio.telemetry.v1alpha1.WorkloadMode - 29, // [29:29] is the sub-list for method output_type - 29, // [29:29] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 23, // 12: istio.telemetry.v1alpha1.Metrics.reporting_interval:type_name -> google.protobuf.Duration + 1, // 13: istio.telemetry.v1alpha1.MetricSelector.metric:type_name -> istio.telemetry.v1alpha1.MetricSelector.IstioMetric + 0, // 14: istio.telemetry.v1alpha1.MetricSelector.mode:type_name -> istio.telemetry.v1alpha1.WorkloadMode + 7, // 15: istio.telemetry.v1alpha1.MetricsOverrides.match:type_name -> istio.telemetry.v1alpha1.MetricSelector + 22, // 16: istio.telemetry.v1alpha1.MetricsOverrides.disabled:type_name -> google.protobuf.BoolValue + 17, // 17: istio.telemetry.v1alpha1.MetricsOverrides.tag_overrides:type_name -> istio.telemetry.v1alpha1.MetricsOverrides.TagOverridesEntry + 18, // 18: istio.telemetry.v1alpha1.AccessLogging.match:type_name -> istio.telemetry.v1alpha1.AccessLogging.LogSelector + 5, // 19: istio.telemetry.v1alpha1.AccessLogging.providers:type_name -> istio.telemetry.v1alpha1.ProviderRef + 22, // 20: istio.telemetry.v1alpha1.AccessLogging.disabled:type_name -> google.protobuf.BoolValue + 19, // 21: istio.telemetry.v1alpha1.AccessLogging.filter:type_name -> istio.telemetry.v1alpha1.AccessLogging.Filter + 0, // 22: istio.telemetry.v1alpha1.Tracing.TracingSelector.mode:type_name -> istio.telemetry.v1alpha1.WorkloadMode + 12, // 23: istio.telemetry.v1alpha1.Tracing.CustomTag.literal:type_name -> istio.telemetry.v1alpha1.Tracing.Literal + 13, // 24: istio.telemetry.v1alpha1.Tracing.CustomTag.environment:type_name -> istio.telemetry.v1alpha1.Tracing.Environment + 14, // 25: istio.telemetry.v1alpha1.Tracing.CustomTag.header:type_name -> istio.telemetry.v1alpha1.Tracing.RequestHeader + 11, // 26: istio.telemetry.v1alpha1.Tracing.CustomTagsEntry.value:type_name -> istio.telemetry.v1alpha1.Tracing.CustomTag + 2, // 27: istio.telemetry.v1alpha1.MetricsOverrides.TagOverride.operation:type_name -> istio.telemetry.v1alpha1.MetricsOverrides.TagOverride.Operation + 16, // 28: istio.telemetry.v1alpha1.MetricsOverrides.TagOverridesEntry.value:type_name -> istio.telemetry.v1alpha1.MetricsOverrides.TagOverride + 0, // 29: istio.telemetry.v1alpha1.AccessLogging.LogSelector.mode:type_name -> istio.telemetry.v1alpha1.WorkloadMode + 30, // [30:30] is the sub-list for method output_type + 30, // [30:30] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name } func init() { file_telemetry_v1alpha1_telemetry_proto_init() } diff --git a/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.html b/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.html index 4ae877f81..2eb17822c 100644 --- a/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.html +++ b/vendor/istio.io/api/telemetry/v1alpha1/telemetry.pb.html @@ -9,28 +9,20 @@ number_of_entries: 18 ---

    Telemetry defines how the telemetry is generated for workloads within a mesh.

    -

    For mesh level configuration, put the resource in root configuration namespace for your Istio installation without a workload selector.

    -

    For any namespace, including the root configuration namespace, it is only valid to have a single workload selector-less Telemetry resource.

    -

    For resources with a workload selector, it is only valid to have one resource selecting any given workload.

    -

    The hierarchy of Telemetry configuration is as follows:

    -
    1. Workload-specific configuration
    2. Namespace-specific configuration
    3. Root namespace configuration
    -

    Examples:

    -

    Policy to enable random sampling for 10% of traffic:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -41,10 +33,8 @@
       tracing:
       - randomSamplingPercentage: 10.00
     
    -

    Policy to disable trace reporting for the “foo” workload (note: tracing context will still be propagated):

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -57,9 +47,7 @@
       tracing:
       - disableSpanReporting: true
     
    -

    Policy to select the alternate zipkin provider for trace reporting:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -74,9 +62,7 @@
         - name: "zipkin-alternate"
         randomSamplingPercentage: 10.00
     
    -

    Policy to add a custom tag from a literal value:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -91,9 +77,7 @@
             literal:
               value: "foo"
     
    -

    Policy to disable server-side metrics for Stackdriver for an entire mesh:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -110,9 +94,7 @@
             mode: SERVER
           disabled: true
     
    -

    Policy to add dimensions to all Prometheus metrics for the foo namespace:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -131,10 +113,8 @@
             request_host:
               value: "request.host"
     
    -

    Policy to remove the response_code dimension on some Prometheus metrics for the bar.foo workload:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -159,19 +139,17 @@
             response_code:
               operation: REMOVE
         - match:
    -        metric: REQUEST_BYTES
    +        metric: REQUEST_SIZE
           tagOverrides:
             response_code:
               operation: REMOVE
         - match:
    -        metric: RESPONSE_BYTES
    +        metric: RESPONSE_SIZE
           tagOverrides:
             response_code:
               operation: REMOVE
     
    -

    Policy to enable access logging for the entire mesh:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -182,15 +160,12 @@
       accessLogging:
       - providers:
         - name: envoy
    -    # By default, this turns on access logging (no need to set `disabled:
    -    false`). # Unspecified `disabled` will be treated as `disabled: false`,
    -    except in # cases where a parent configuration has marked as `disabled:
    -    true`. In # those cases, `disabled: false` must be set explicitly to
    -    override.
    +    # By default, this turns on access logging (no need to set `disabled: false`).
    +    # Unspecified `disabled` will be treated as `disabled: false`, except in
    +    # cases where a parent configuration has marked as `disabled: true`. In
    +    # those cases, `disabled: false` must be set explicitly to override.
     
    -

    Policy to disable access logging for the foo namespace:

    -
    apiVersion: telemetry.istio.io/v1alpha1
     kind: Telemetry
     metadata:
    @@ -272,7 +247,6 @@ 

    Tracing

    Tracing configures tracing behavior for workloads within a mesh. It can be used to enable/disable tracing, as well as to set sampling rates and custom tag extraction.

    -

    Tracing configuration support overrides of the fields providers, random_sampling_percentage, disable_span_reporting, and custom_tags at each level in the configuration hierarchy, with missing values filled in @@ -305,8 +279,8 @@

    Tracing

    ProviderRef[]

    Optional. Name of provider(s) to use for span reporting. If a provider is -not specified, the [default tracing -provider][istio.mesh.v1alpha1.MeshConfig.default_providers.tracing] will be +not specified, the default tracing +provider will be used. NOTE: At the moment, only a single provider can be specified in a given Tracing rule.

    @@ -325,7 +299,6 @@

    Tracing

    decision has been made (example: no x-b3-sampled tracing header was present in the requests), the traffic will be selected for telemetry generation at the percentage specified.

    -

    Defaults to 0%. Valid values [0.00-100.00]. Can be specified in 0.01% increments.

    @@ -384,7 +357,7 @@

    ProviderRef

    -No +Yes @@ -411,8 +384,8 @@

    Metrics

    ProviderRef[]

    Optional. Name of providers to which this configuration should apply. -If a provider is not specified, the [default metrics -provider][istio.mesh.v1alpha1.MeshConfig.default_providers.metrics] will be +If a provider is not specified, the default metrics +provider will be used.

    @@ -425,19 +398,32 @@

    Metrics

    MetricsOverrides[]

    Optional. Ordered list of overrides to metrics generation behavior.

    -

    Specified overrides will be applied in order. They will be applied on top of inherited overrides from other resources in the hierarchy in the -following order: -1. Mesh-scoped overrides -2. Namespace-scoped overrides -3. Workload-scoped overrides

    - +following order:

    +
      +
    1. Mesh-scoped overrides
    2. +
    3. Namespace-scoped overrides
    4. +
    5. Workload-scoped overrides
    6. +

    Because overrides are applied in order, users are advised to order their overrides from least specific to most specific matches. That is, it is a best practice to list any universal overrides first, with tailored overrides following them.

    + + +No + + + +reportingInterval +Duration + +

    Optional. Reporting interval allows configuration of the time between calls out to for metrics reporting. +This currently only supports TCP metrics but we may use this for long duration HTTP streams in the future. +The default duration is 5s.

    + No @@ -521,7 +507,6 @@

    MetricsOverrides

    Match allows provides the scope of the override. It can be used to select individual metrics, as well as the workload modes (server and/or client) in which the metrics will be generated.

    -

    If match is not specified, the overrides will apply to all metrics for both modes of operation (client and server).

    @@ -553,7 +538,7 @@

    MetricsOverrides

    The key in the map is the name of the tag. The value in the map is the operation to perform on the the tag. WARNING: some providers may not support adding/removing tags. -See also: https://istio.io/latest/docs/reference/config/metrics/#labels

    +See also: https://istio.io/latest/docs/reference/config/metrics/#labels

    @@ -595,8 +580,8 @@

    AccessLogging

    ProviderRef[]

    Optional. Name of providers to which this configuration should apply. -If a provider is not specified, the [default logging -provider][istio.mesh.v1alpha1.MeshConfig.default_providers.] will be used.

    +If a provider is not specified, the default logging +provider will be used.

    @@ -669,7 +654,6 @@

    Tracing.CustomTag

    an operator-supplied value. This value can either be a hard-coded value, a value taken from an environment variable known to the sidecar proxy, or from a request header.

    -

    NOTE: when specified, custom_tags will fully replace any values provided by parent configuration.

    @@ -923,9 +907,7 @@

    AccessLogging.Filter

    string

    CEL expression for selecting when requests/connections should be logged.

    -

    Examples:

    -
    • response.code >= 400
    • connection.mtls && request.url_path.contains('v1beta3')
    • @@ -943,7 +925,7 @@

      MetricSelector.IstioMetric

      Curated list of known metric types that is supported by Istio metric providers. See also: -https://istio.io/latest/docs/reference/config/metrics/#metrics

      +https://istio.io/latest/docs/reference/config/metrics/#metrics

      @@ -966,11 +948,8 @@

      MetricSelector.IstioMetric

      Counter of requests to/from an application, generated for HTTP, HTTP/2, and GRPC traffic.

      -

      The Prometheus provider exports this metric as: istio_requests_total.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/request_count (SERVER mode)
      • istio.io/service/client/request_count (CLIENT mode)
      • @@ -983,12 +962,9 @@

        MetricSelector.IstioMetric

      Histogram of request durations, generated for HTTP, HTTP/2, and GRPC traffic.

      -

      The Prometheus provider exports this metric as: istio_request_duration_milliseconds.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/response_latencies (SERVER mode)
      • istio.io/service/client/roundtrip_latencies (CLIENT mode)
      • @@ -1001,11 +977,8 @@

        MetricSelector.IstioMetric

      Histogram of request body sizes, generated for HTTP, HTTP/2, and GRPC traffic.

      -

      The Prometheus provider exports this metric as: istio_request_bytes.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/request_bytes (SERVER mode)
      • istio.io/service/client/request_bytes (CLIENT mode)
      • @@ -1018,11 +991,8 @@

        MetricSelector.IstioMetric

      Histogram of response body sizes, generated for HTTP, HTTP/2, and GRPC traffic.

      -

      The Prometheus provider exports this metric as: istio_response_bytes.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/response_bytes (SERVER mode)
      • istio.io/service/client/response_bytes (CLIENT mode)
      • @@ -1034,12 +1004,9 @@

        MetricSelector.IstioMetric

      TCP_OPENED_CONNECTIONS

      Counter of TCP connections opened over lifetime of workload.

      -

      The Prometheus provider exports this metric as: istio_tcp_connections_opened_total.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/connection_open_count (SERVER mode)
      • istio.io/service/client/connection_open_count (CLIENT mode)
      • @@ -1051,12 +1018,9 @@

        MetricSelector.IstioMetric

      TCP_CLOSED_CONNECTIONS

      Counter of TCP connections closed over lifetime of workload.

      -

      The Prometheus provider exports this metric as: istio_tcp_connections_closed_total.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/connection_close_count (SERVER mode)
      • istio.io/service/client/connection_close_count (CLIENT mode)
      • @@ -1068,12 +1032,9 @@

        MetricSelector.IstioMetric

      TCP_SENT_BYTES

      Counter of bytes sent during a response over a TCP connection.

      -

      The Prometheus provider exports this metric as: istio_tcp_sent_bytes_total.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/sent_bytes_count (SERVER mode)
      • istio.io/service/client/sent_bytes_count (CLIENT mode)
      • @@ -1085,12 +1046,9 @@

        MetricSelector.IstioMetric

      TCP_RECEIVED_BYTES

      Counter of bytes received during a request over a TCP connection.

      -

      The Prometheus provider exports this metric as: istio_tcp_received_bytes_total.

      -

      The Stackdriver provider exports this metric as:

      -
      • istio.io/service/server/received_bytes_count (SERVER mode)
      • istio.io/service/client/received_bytes_count (CLIENT mode)
      • @@ -1102,7 +1060,6 @@

        MetricSelector.IstioMetric

      GRPC_REQUEST_MESSAGES

      Counter incremented for every gRPC messages sent from a client.

      -

      The Prometheus provider exports this metric as: istio_request_messages_total

      @@ -1112,7 +1069,6 @@

      MetricSelector.IstioMetric

      GRPC_RESPONSE_MESSAGES

      Counter incremented for every gRPC messages sent from a server.

      -

      The Prometheus provider exports this metric as: istio_response_messages_total

      diff --git a/vendor/istio.io/api/telemetry/v1alpha1/telemetry.proto b/vendor/istio.io/api/telemetry/v1alpha1/telemetry.proto index 06554e6d0..e34803c31 100644 --- a/vendor/istio.io/api/telemetry/v1alpha1/telemetry.proto +++ b/vendor/istio.io/api/telemetry/v1alpha1/telemetry.proto @@ -15,6 +15,8 @@ syntax = "proto3"; import "type/v1beta1/selector.proto"; +import "google/api/field_behavior.proto"; +import "google/protobuf/duration.proto"; import "google/protobuf/wrappers.proto"; // $schema: istio.telemetry.v1alpha1.Telemetry @@ -172,12 +174,12 @@ import "google/protobuf/wrappers.proto"; // response_code: // operation: REMOVE // - match: -// metric: REQUEST_BYTES +// metric: REQUEST_SIZE // tagOverrides: // response_code: // operation: REMOVE // - match: -// metric: RESPONSE_BYTES +// metric: RESPONSE_SIZE // tagOverrides: // response_code: // operation: REMOVE @@ -195,11 +197,10 @@ import "google/protobuf/wrappers.proto"; // accessLogging: // - providers: // - name: envoy -// # By default, this turns on access logging (no need to set `disabled: -// false`). # Unspecified `disabled` will be treated as `disabled: false`, -// except in # cases where a parent configuration has marked as `disabled: -// true`. In # those cases, `disabled: false` must be set explicitly to -// override. +// # By default, this turns on access logging (no need to set `disabled: false`). +// # Unspecified `disabled` will be treated as `disabled: false`, except in +// # cases where a parent configuration has marked as `disabled: true`. In +// # those cases, `disabled: false` must be set explicitly to override. // ``` // // Policy to disable access logging for the `foo` namespace: @@ -286,7 +287,7 @@ message Tracing { // Optional. Name of provider(s) to use for span reporting. If a provider is // not specified, the [default tracing - // provider][istio.mesh.v1alpha1.MeshConfig.default_providers.tracing] will be + // provider](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-DefaultProviders) will be // used. NOTE: At the moment, only a single provider can be specified in a // given Tracing rule. repeated ProviderRef providers = 2; @@ -369,7 +370,7 @@ message Tracing { // targeted customization. message ProviderRef { // Required. Name of Telemetry provider in MeshConfig. - string name = 1; + string name = 1 [(google.api.field_behavior) = REQUIRED]; } // Metrics defines the workload-level overrides for metrics generation behavior @@ -378,7 +379,7 @@ message ProviderRef { message Metrics { // Optional. Name of providers to which this configuration should apply. // If a provider is not specified, the [default metrics - // provider][istio.mesh.v1alpha1.MeshConfig.default_providers.metrics] will be + // provider](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-DefaultProviders) will be // used. repeated ProviderRef providers = 1; @@ -396,6 +397,11 @@ message Metrics { // a best practice to list any universal overrides first, with tailored // overrides following them. repeated MetricsOverrides overrides = 2; + + // Optional. Reporting interval allows configuration of the time between calls out to for metrics reporting. + // This currently only supports TCP metrics but we may use this for long duration HTTP streams in the future. + // The default duration is `5s`. + google.protobuf.Duration reporting_interval = 3; } // WorkloadMode allows selection of the role of the underlying workload in @@ -623,7 +629,7 @@ message AccessLogging { // Optional. Name of providers to which this configuration should apply. // If a provider is not specified, the [default logging - // provider][istio.mesh.v1alpha1.MeshConfig.default_providers.] will be used. + // provider](https://istio.io/docs/reference/config/istio.mesh.v1alpha1/#MeshConfig-DefaultProviders) will be used. repeated ProviderRef providers = 1; // Controls logging. If set to true, no access logs will be generated for diff --git a/vendor/istio.io/api/telemetry/v1alpha1/telemetry_deepcopy.gen.go b/vendor/istio.io/api/telemetry/v1alpha1/telemetry_deepcopy.gen.go index 3db925aa6..b961bdfd2 100644 --- a/vendor/istio.io/api/telemetry/v1alpha1/telemetry_deepcopy.gen.go +++ b/vendor/istio.io/api/telemetry/v1alpha1/telemetry_deepcopy.gen.go @@ -2,7 +2,7 @@ package v1alpha1 import ( - proto "github.com/golang/protobuf/proto" + proto "google.golang.org/protobuf/proto" ) // DeepCopyInto supports using Telemetry within kubernetes types, where deepcopy-gen is used. diff --git a/vendor/istio.io/api/type/v1beta1/selector.gen.json b/vendor/istio.io/api/type/v1beta1/selector.gen.json index 31b767210..28a4c060a 100644 --- a/vendor/istio.io/api/type/v1beta1/selector.gen.json +++ b/vendor/istio.io/api/type/v1beta1/selector.gen.json @@ -6,6 +6,26 @@ }, "components": { "schemas": { + "istio.type.v1beta1.PortSelector": { + "description": "PortSelector is the criteria for specifying if a policy can be applied to a listener having a specific port.", + "type": "object", + "properties": { + "number": { + "description": "Port number", + "type": "integer" + } + } + }, + "istio.type.v1beta1.WorkloadMode": { + "description": "WorkloadMode allows selection of the role of the underlying workload in network traffic. A workload is considered as acting as a SERVER if it is the destination of the traffic (that is, traffic direction, from the perspective of the workload is *inbound*). If the workload is the source of the network traffic, it is considered to be in CLIENT mode (traffic is *outbound* from the workload).", + "type": "string", + "enum": [ + "UNDEFINED", + "CLIENT", + "SERVER", + "CLIENT_AND_SERVER" + ] + }, "istio.type.v1beta1.WorkloadSelector": { "description": "WorkloadSelector specifies the criteria used to determine if a policy can be applied to a proxy. The matching criteria includes the metadata associated with a proxy, workload instance info such as labels attached to the pod/VM, or any other info that the proxy provides to Istio during the initial handshake. If multiple conditions are specified, all conditions need to match in order for the workload instance to be selected. Currently, only label based selection mechanism is supported.", "type": "object", diff --git a/vendor/istio.io/api/type/v1beta1/selector.pb.go b/vendor/istio.io/api/type/v1beta1/selector.pb.go index a719ff714..57f7779fe 100644 --- a/vendor/istio.io/api/type/v1beta1/selector.pb.go +++ b/vendor/istio.io/api/type/v1beta1/selector.pb.go @@ -14,7 +14,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.30.0 // protoc (unknown) // source: type/v1beta1/selector.proto @@ -39,6 +39,72 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// WorkloadMode allows selection of the role of the underlying workload in +// network traffic. A workload is considered as acting as a SERVER if it is +// the destination of the traffic (that is, traffic direction, from the +// perspective of the workload is *inbound*). If the workload is the source of +// the network traffic, it is considered to be in CLIENT mode (traffic is +// *outbound* from the workload). +type WorkloadMode int32 + +const ( + // Default value, which will be interpreted by its own usage. + WorkloadMode_UNDEFINED WorkloadMode = 0 + // Selects for scenarios when the workload is the + // source of the network traffic. In addition, + // if the workload is a gateway, selects this. + WorkloadMode_CLIENT WorkloadMode = 1 + // Selects for scenarios when the workload is the + // destination of the network traffic. + WorkloadMode_SERVER WorkloadMode = 2 + // Selects for scenarios when the workload is either the + // source or destination of the network traffic. + WorkloadMode_CLIENT_AND_SERVER WorkloadMode = 3 +) + +// Enum value maps for WorkloadMode. +var ( + WorkloadMode_name = map[int32]string{ + 0: "UNDEFINED", + 1: "CLIENT", + 2: "SERVER", + 3: "CLIENT_AND_SERVER", + } + WorkloadMode_value = map[string]int32{ + "UNDEFINED": 0, + "CLIENT": 1, + "SERVER": 2, + "CLIENT_AND_SERVER": 3, + } +) + +func (x WorkloadMode) Enum() *WorkloadMode { + p := new(WorkloadMode) + *p = x + return p +} + +func (x WorkloadMode) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (WorkloadMode) Descriptor() protoreflect.EnumDescriptor { + return file_type_v1beta1_selector_proto_enumTypes[0].Descriptor() +} + +func (WorkloadMode) Type() protoreflect.EnumType { + return &file_type_v1beta1_selector_proto_enumTypes[0] +} + +func (x WorkloadMode) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use WorkloadMode.Descriptor instead. +func (WorkloadMode) EnumDescriptor() ([]byte, []int) { + return file_type_v1beta1_selector_proto_rawDescGZIP(), []int{0} +} + // WorkloadSelector specifies the criteria used to determine if a policy can be applied // to a proxy. The matching criteria includes the metadata associated with a proxy, // workload instance info such as labels attached to the pod/VM, or any other info @@ -95,6 +161,56 @@ func (x *WorkloadSelector) GetMatchLabels() map[string]string { return nil } +// PortSelector is the criteria for specifying if a policy can be applied to +// a listener having a specific port. +type PortSelector struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Port number + Number uint32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"` +} + +func (x *PortSelector) Reset() { + *x = PortSelector{} + if protoimpl.UnsafeEnabled { + mi := &file_type_v1beta1_selector_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PortSelector) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PortSelector) ProtoMessage() {} + +func (x *PortSelector) ProtoReflect() protoreflect.Message { + mi := &file_type_v1beta1_selector_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PortSelector.ProtoReflect.Descriptor instead. +func (*PortSelector) Descriptor() ([]byte, []int) { + return file_type_v1beta1_selector_proto_rawDescGZIP(), []int{1} +} + +func (x *PortSelector) GetNumber() uint32 { + if x != nil { + return x.Number + } + return 0 +} + var File_type_v1beta1_selector_proto protoreflect.FileDescriptor var file_type_v1beta1_selector_proto_rawDesc = []byte{ @@ -103,20 +219,28 @@ var file_type_v1beta1_selector_proto_rawDesc = []byte{ 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x22, 0xb2, 0x01, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5e, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x74, 0x6f, 0x22, 0xb1, 0x01, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x5d, 0x0a, 0x0c, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, - 0x68, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x1b, 0x5a, 0x19, 0x69, 0x73, 0x74, 0x69, 0x6f, - 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x74, 0x72, 0x79, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x63, 0x68, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x26, 0x0a, 0x0c, 0x50, 0x6f, 0x72, 0x74, 0x53, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2a, 0x4c, + 0x0a, 0x0c, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0d, + 0x0a, 0x09, 0x55, 0x4e, 0x44, 0x45, 0x46, 0x49, 0x4e, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, + 0x06, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x52, + 0x56, 0x45, 0x52, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x41, 0x4e, 0x44, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x03, 0x42, 0x1b, 0x5a, 0x19, + 0x69, 0x73, 0x74, 0x69, 0x6f, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -131,13 +255,16 @@ func file_type_v1beta1_selector_proto_rawDescGZIP() []byte { return file_type_v1beta1_selector_proto_rawDescData } -var file_type_v1beta1_selector_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_type_v1beta1_selector_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_type_v1beta1_selector_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_type_v1beta1_selector_proto_goTypes = []interface{}{ - (*WorkloadSelector)(nil), // 0: istio.type.v1beta1.WorkloadSelector - nil, // 1: istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry + (WorkloadMode)(0), // 0: istio.type.v1beta1.WorkloadMode + (*WorkloadSelector)(nil), // 1: istio.type.v1beta1.WorkloadSelector + (*PortSelector)(nil), // 2: istio.type.v1beta1.PortSelector + nil, // 3: istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry } var file_type_v1beta1_selector_proto_depIdxs = []int32{ - 1, // 0: istio.type.v1beta1.WorkloadSelector.match_labels:type_name -> istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry + 3, // 0: istio.type.v1beta1.WorkloadSelector.match_labels:type_name -> istio.type.v1beta1.WorkloadSelector.MatchLabelsEntry 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -163,19 +290,32 @@ func file_type_v1beta1_selector_proto_init() { return nil } } + file_type_v1beta1_selector_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PortSelector); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_type_v1beta1_selector_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, + NumEnums: 1, + NumMessages: 3, NumExtensions: 0, NumServices: 0, }, GoTypes: file_type_v1beta1_selector_proto_goTypes, DependencyIndexes: file_type_v1beta1_selector_proto_depIdxs, + EnumInfos: file_type_v1beta1_selector_proto_enumTypes, MessageInfos: file_type_v1beta1_selector_proto_msgTypes, }.Build() File_type_v1beta1_selector_proto = out.File diff --git a/vendor/istio.io/api/type/v1beta1/selector.pb.html b/vendor/istio.io/api/type/v1beta1/selector.pb.html index a960cb242..0fccbb7fd 100644 --- a/vendor/istio.io/api/type/v1beta1/selector.pb.html +++ b/vendor/istio.io/api/type/v1beta1/selector.pb.html @@ -4,7 +4,7 @@ location: https://istio.io/docs/reference/config/type/workload-selector.html layout: protoc-gen-docs generator: protoc-gen-docs -number_of_entries: 1 +number_of_entries: 3 ---

      WorkloadSelector

      @@ -41,3 +41,84 @@

      WorkloadSelector

      +

      PortSelector

      +
      +

      PortSelector is the criteria for specifying if a policy can be applied to +a listener having a specific port.

      + + + + + + + + + + + + + + + + + + +
      FieldTypeDescriptionRequired
      numberuint32 +

      Port number

      + +
      +No +
      +
      +

      WorkloadMode

      +
      +

      WorkloadMode allows selection of the role of the underlying workload in +network traffic. A workload is considered as acting as a SERVER if it is +the destination of the traffic (that is, traffic direction, from the +perspective of the workload is inbound). If the workload is the source of +the network traffic, it is considered to be in CLIENT mode (traffic is +outbound from the workload).

      + + + + + + + + + + + + + + + + + + + + + + + + + + +
      NameDescription
      UNDEFINED +

      Default value, which will be interpreted by its own usage.

      + +
      CLIENT +

      Selects for scenarios when the workload is the +source of the network traffic. In addition, +if the workload is a gateway, selects this.

      + +
      SERVER +

      Selects for scenarios when the workload is the +destination of the network traffic.

      + +
      CLIENT_AND_SERVER +

      Selects for scenarios when the workload is either the +source or destination of the network traffic.

      + +
      +
      diff --git a/vendor/istio.io/api/type/v1beta1/selector.proto b/vendor/istio.io/api/type/v1beta1/selector.proto index ec1889972..30cbd6275 100644 --- a/vendor/istio.io/api/type/v1beta1/selector.proto +++ b/vendor/istio.io/api/type/v1beta1/selector.proto @@ -35,3 +35,34 @@ message WorkloadSelector { // the configuration namespace in which the resource is present. map match_labels = 1 [(google.api.field_behavior) = REQUIRED]; } + +// PortSelector is the criteria for specifying if a policy can be applied to +// a listener having a specific port. +message PortSelector { + // Port number + uint32 number = 1; +} + +// WorkloadMode allows selection of the role of the underlying workload in +// network traffic. A workload is considered as acting as a SERVER if it is +// the destination of the traffic (that is, traffic direction, from the +// perspective of the workload is *inbound*). If the workload is the source of +// the network traffic, it is considered to be in CLIENT mode (traffic is +// *outbound* from the workload). +enum WorkloadMode { + // Default value, which will be interpreted by its own usage. + UNDEFINED = 0; + + // Selects for scenarios when the workload is the + // source of the network traffic. In addition, + // if the workload is a gateway, selects this. + CLIENT = 1; + + // Selects for scenarios when the workload is the + // destination of the network traffic. + SERVER = 2; + + // Selects for scenarios when the workload is either the + // source or destination of the network traffic. + CLIENT_AND_SERVER = 3; +} diff --git a/vendor/istio.io/api/type/v1beta1/selector_deepcopy.gen.go b/vendor/istio.io/api/type/v1beta1/selector_deepcopy.gen.go index eb11c7cd3..1d34b0b81 100644 --- a/vendor/istio.io/api/type/v1beta1/selector_deepcopy.gen.go +++ b/vendor/istio.io/api/type/v1beta1/selector_deepcopy.gen.go @@ -2,7 +2,7 @@ package v1beta1 import ( - proto "github.com/golang/protobuf/proto" + proto "google.golang.org/protobuf/proto" ) // DeepCopyInto supports using WorkloadSelector within kubernetes types, where deepcopy-gen is used. @@ -25,3 +25,24 @@ func (in *WorkloadSelector) DeepCopy() *WorkloadSelector { func (in *WorkloadSelector) DeepCopyInterface() interface{} { return in.DeepCopy() } + +// DeepCopyInto supports using PortSelector within kubernetes types, where deepcopy-gen is used. +func (in *PortSelector) DeepCopyInto(out *PortSelector) { + p := proto.Clone(in).(*PortSelector) + *out = *p +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortSelector. Required by controller-gen. +func (in *PortSelector) DeepCopy() *PortSelector { + if in == nil { + return nil + } + out := new(PortSelector) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new PortSelector. Required by controller-gen. +func (in *PortSelector) DeepCopyInterface() interface{} { + return in.DeepCopy() +} diff --git a/vendor/istio.io/api/type/v1beta1/selector_json.gen.go b/vendor/istio.io/api/type/v1beta1/selector_json.gen.go index c9d08dd7c..a42c97751 100644 --- a/vendor/istio.io/api/type/v1beta1/selector_json.gen.go +++ b/vendor/istio.io/api/type/v1beta1/selector_json.gen.go @@ -17,6 +17,17 @@ func (this *WorkloadSelector) UnmarshalJSON(b []byte) error { return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this) } +// MarshalJSON is a custom marshaler for PortSelector +func (this *PortSelector) MarshalJSON() ([]byte, error) { + str, err := SelectorMarshaler.MarshalToString(this) + return []byte(str), err +} + +// UnmarshalJSON is a custom unmarshaler for PortSelector +func (this *PortSelector) UnmarshalJSON(b []byte) error { + return SelectorUnmarshaler.Unmarshal(bytes.NewReader(b), this) +} + var ( SelectorMarshaler = &jsonpb.Marshaler{} SelectorUnmarshaler = &jsonpb.Unmarshaler{AllowUnknownFields: true} diff --git a/vendor/istio.io/client-go/LICENSE b/vendor/istio.io/client-go/LICENSE index 56e48aa37..bb7b19dec 100644 --- a/vendor/istio.io/client-go/LICENSE +++ b/vendor/istio.io/client-go/LICENSE @@ -187,7 +187,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2016-2020 Istio Authors + Copyright 2016-2022 Istio Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/types.gen.go b/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/types.gen.go index e6a2e5f2d..61ffb2598 100644 --- a/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/types.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/types.gen.go @@ -69,5 +69,5 @@ type WasmPluginList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []WasmPlugin `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*WasmPlugin `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.gen.go b/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.gen.go index aa6be4c64..e67d0ec60 100644 --- a/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/extensions/v1alpha1/zz_generated.deepcopy.gen.go @@ -58,9 +58,13 @@ func (in *WasmPluginList) DeepCopyInto(out *WasmPluginList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]WasmPlugin, len(*in)) + *out = make([]*WasmPlugin, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(WasmPlugin) + (*in).DeepCopyInto(*out) + } } } return diff --git a/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/types.gen.go b/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/types.gen.go index 210b625c3..05ce790dd 100644 --- a/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/types.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/types.gen.go @@ -73,7 +73,7 @@ type DestinationRuleList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []DestinationRule `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*DestinationRule `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -119,7 +119,7 @@ type EnvoyFilterList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []EnvoyFilter `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*EnvoyFilter `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -168,7 +168,7 @@ type GatewayList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []Gateway `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*Gateway `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -189,7 +189,7 @@ type GatewayList struct { // +cue-gen:ServiceEntry:printerColumn:name=Hosts,type=string,JSONPath=.spec.hosts,description="The hosts associated with the ServiceEntry" // +cue-gen:ServiceEntry:printerColumn:name=Location,type=string,JSONPath=.spec.location,description="Whether the service is external to the // mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL)" -// +cue-gen:ServiceEntry:printerColumn:name=Resolution,type=string,JSONPath=.spec.resolution,description="Service discovery mode for the hosts +// +cue-gen:ServiceEntry:printerColumn:name=Resolution,type=string,JSONPath=.spec.resolution,description="Service resolution mode for the hosts // (NONE, STATIC, or DNS)" // +cue-gen:ServiceEntry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp // representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. @@ -226,7 +226,7 @@ type ServiceEntryList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []ServiceEntry `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*ServiceEntry `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -276,7 +276,7 @@ type SidecarList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []Sidecar `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*Sidecar `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -331,10 +331,10 @@ type VirtualServiceList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []VirtualService `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*VirtualService `json:"items" protobuf:"bytes,2,rep,name=items"` } -// please upgrade the proto package +// // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // WorkloadEntry enables specifying the properties of a single non-Kubernetes workload such a VM or a bare metal services that can be referred to by service entries. @@ -384,10 +384,10 @@ type WorkloadEntryList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []WorkloadEntry `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*WorkloadEntry `json:"items" protobuf:"bytes,2,rep,name=items"` } -// please upgrade the proto package +// // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // `WorkloadGroup` enables specifying the properties of a single workload for bootstrap and @@ -439,5 +439,5 @@ type WorkloadGroupList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []WorkloadGroup `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*WorkloadGroup `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/zz_generated.deepcopy.gen.go b/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/zz_generated.deepcopy.gen.go index b95f8fc59..e0de4e28c 100644 --- a/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/zz_generated.deepcopy.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/networking/v1alpha3/zz_generated.deepcopy.gen.go @@ -58,9 +58,13 @@ func (in *DestinationRuleList) DeepCopyInto(out *DestinationRuleList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DestinationRule, len(*in)) + *out = make([]*DestinationRule, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(DestinationRule) + (*in).DeepCopyInto(*out) + } } } return @@ -119,9 +123,13 @@ func (in *EnvoyFilterList) DeepCopyInto(out *EnvoyFilterList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]EnvoyFilter, len(*in)) + *out = make([]*EnvoyFilter, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(EnvoyFilter) + (*in).DeepCopyInto(*out) + } } } return @@ -180,9 +188,13 @@ func (in *GatewayList) DeepCopyInto(out *GatewayList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Gateway, len(*in)) + *out = make([]*Gateway, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Gateway) + (*in).DeepCopyInto(*out) + } } } return @@ -241,9 +253,13 @@ func (in *ServiceEntryList) DeepCopyInto(out *ServiceEntryList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ServiceEntry, len(*in)) + *out = make([]*ServiceEntry, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ServiceEntry) + (*in).DeepCopyInto(*out) + } } } return @@ -302,9 +318,13 @@ func (in *SidecarList) DeepCopyInto(out *SidecarList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Sidecar, len(*in)) + *out = make([]*Sidecar, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Sidecar) + (*in).DeepCopyInto(*out) + } } } return @@ -363,9 +383,13 @@ func (in *VirtualServiceList) DeepCopyInto(out *VirtualServiceList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]VirtualService, len(*in)) + *out = make([]*VirtualService, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(VirtualService) + (*in).DeepCopyInto(*out) + } } } return @@ -424,9 +448,13 @@ func (in *WorkloadEntryList) DeepCopyInto(out *WorkloadEntryList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]WorkloadEntry, len(*in)) + *out = make([]*WorkloadEntry, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(WorkloadEntry) + (*in).DeepCopyInto(*out) + } } } return @@ -485,9 +513,13 @@ func (in *WorkloadGroupList) DeepCopyInto(out *WorkloadGroupList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]WorkloadGroup, len(*in)) + *out = make([]*WorkloadGroup, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(WorkloadGroup) + (*in).DeepCopyInto(*out) + } } } return diff --git a/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/types.gen.go b/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/types.gen.go index 677aad410..cc678b53c 100644 --- a/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/types.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/types.gen.go @@ -72,7 +72,7 @@ type DestinationRuleList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []DestinationRule `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*DestinationRule `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -120,10 +120,10 @@ type GatewayList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []Gateway `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*Gateway `json:"items" protobuf:"bytes,2,rep,name=items"` } -// please upgrade the proto package +// // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // `ProxyConfig` exposes proxy level configuration options. @@ -165,7 +165,7 @@ type ProxyConfigList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []ProxyConfig `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*ProxyConfig `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -185,7 +185,7 @@ type ProxyConfigList struct { // +cue-gen:ServiceEntry:printerColumn:name=Hosts,type=string,JSONPath=.spec.hosts,description="The hosts associated with the ServiceEntry" // +cue-gen:ServiceEntry:printerColumn:name=Location,type=string,JSONPath=.spec.location,description="Whether the service is external to the // mesh or part of the mesh (MESH_EXTERNAL or MESH_INTERNAL)" -// +cue-gen:ServiceEntry:printerColumn:name=Resolution,type=string,JSONPath=.spec.resolution,description="Service discovery mode for the hosts +// +cue-gen:ServiceEntry:printerColumn:name=Resolution,type=string,JSONPath=.spec.resolution,description="Service resolution mode for the hosts // (NONE, STATIC, or DNS)" // +cue-gen:ServiceEntry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp // representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. @@ -222,7 +222,7 @@ type ServiceEntryList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []ServiceEntry `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*ServiceEntry `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -271,7 +271,7 @@ type SidecarList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []Sidecar `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*Sidecar `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -325,10 +325,10 @@ type VirtualServiceList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []VirtualService `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*VirtualService `json:"items" protobuf:"bytes,2,rep,name=items"` } -// please upgrade the proto package +// // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // WorkloadEntry enables specifying the properties of a single non-Kubernetes workload such a VM or a bare metal services that can be referred to by service entries. @@ -377,10 +377,10 @@ type WorkloadEntryList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []WorkloadEntry `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*WorkloadEntry `json:"items" protobuf:"bytes,2,rep,name=items"` } -// please upgrade the proto package +// // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // `WorkloadGroup` enables specifying the properties of a single workload for bootstrap and @@ -431,5 +431,5 @@ type WorkloadGroupList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []WorkloadGroup `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*WorkloadGroup `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/zz_generated.deepcopy.gen.go b/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/zz_generated.deepcopy.gen.go index 54fb39f60..e3a645732 100644 --- a/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/zz_generated.deepcopy.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/networking/v1beta1/zz_generated.deepcopy.gen.go @@ -58,9 +58,13 @@ func (in *DestinationRuleList) DeepCopyInto(out *DestinationRuleList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]DestinationRule, len(*in)) + *out = make([]*DestinationRule, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(DestinationRule) + (*in).DeepCopyInto(*out) + } } } return @@ -119,9 +123,13 @@ func (in *GatewayList) DeepCopyInto(out *GatewayList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Gateway, len(*in)) + *out = make([]*Gateway, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Gateway) + (*in).DeepCopyInto(*out) + } } } return @@ -180,9 +188,13 @@ func (in *ProxyConfigList) DeepCopyInto(out *ProxyConfigList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ProxyConfig, len(*in)) + *out = make([]*ProxyConfig, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ProxyConfig) + (*in).DeepCopyInto(*out) + } } } return @@ -241,9 +253,13 @@ func (in *ServiceEntryList) DeepCopyInto(out *ServiceEntryList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]ServiceEntry, len(*in)) + *out = make([]*ServiceEntry, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(ServiceEntry) + (*in).DeepCopyInto(*out) + } } } return @@ -302,9 +318,13 @@ func (in *SidecarList) DeepCopyInto(out *SidecarList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]Sidecar, len(*in)) + *out = make([]*Sidecar, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Sidecar) + (*in).DeepCopyInto(*out) + } } } return @@ -363,9 +383,13 @@ func (in *VirtualServiceList) DeepCopyInto(out *VirtualServiceList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]VirtualService, len(*in)) + *out = make([]*VirtualService, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(VirtualService) + (*in).DeepCopyInto(*out) + } } } return @@ -424,9 +448,13 @@ func (in *WorkloadEntryList) DeepCopyInto(out *WorkloadEntryList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]WorkloadEntry, len(*in)) + *out = make([]*WorkloadEntry, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(WorkloadEntry) + (*in).DeepCopyInto(*out) + } } } return @@ -485,9 +513,13 @@ func (in *WorkloadGroupList) DeepCopyInto(out *WorkloadGroupList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]WorkloadGroup, len(*in)) + *out = make([]*WorkloadGroup, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(WorkloadGroup) + (*in).DeepCopyInto(*out) + } } } return diff --git a/vendor/istio.io/client-go/pkg/apis/security/v1/doc.go b/vendor/istio.io/client-go/pkg/apis/security/v1/doc.go new file mode 100644 index 000000000..c0a8cd9ba --- /dev/null +++ b/vendor/istio.io/client-go/pkg/apis/security/v1/doc.go @@ -0,0 +1,21 @@ +// Copyright Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by kubetype-gen. DO NOT EDIT. + +// Package has auto-generated kube type wrappers for raw types. +// +k8s:openapi-gen=true +// +k8s:deepcopy-gen=package +// +groupName=security.istio.io +package v1 diff --git a/vendor/istio.io/client-go/pkg/apis/security/v1/register.gen.go b/vendor/istio.io/client-go/pkg/apis/security/v1/register.gen.go new file mode 100644 index 000000000..d179b988c --- /dev/null +++ b/vendor/istio.io/client-go/pkg/apis/security/v1/register.gen.go @@ -0,0 +1,51 @@ +// Copyright Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by kubetype-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + schema "k8s.io/apimachinery/pkg/runtime/schema" +) + +var ( + // Package-wide variables from generator "register". + SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} + SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) + localSchemeBuilder = &SchemeBuilder + AddToScheme = localSchemeBuilder.AddToScheme +) + +const ( + // Package-wide consts from generator "register". + GroupName = "security.istio.io" +) + +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} + +func addKnownTypes(scheme *runtime.Scheme) error { + scheme.AddKnownTypes(SchemeGroupVersion, + &AuthorizationPolicy{}, + &AuthorizationPolicyList{}, + &RequestAuthentication{}, + &RequestAuthenticationList{}, + ) + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil +} diff --git a/vendor/istio.io/client-go/pkg/apis/security/v1/types.gen.go b/vendor/istio.io/client-go/pkg/apis/security/v1/types.gen.go new file mode 100644 index 000000000..da1bdd160 --- /dev/null +++ b/vendor/istio.io/client-go/pkg/apis/security/v1/types.gen.go @@ -0,0 +1,352 @@ +// Copyright Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by kubetype-gen. DO NOT EDIT. + +package v1 + +import ( + v1alpha1 "istio.io/api/meta/v1alpha1" + securityv1 "istio.io/api/security/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AuthorizationPolicy enables access control on workloads. +// +// +// +// +// +type AuthorizationPolicy struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines the implementation of this definition. + // +optional + Spec securityv1.AuthorizationPolicy `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + Status v1alpha1.IstioStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// AuthorizationPolicyList is a collection of AuthorizationPolicies. +type AuthorizationPolicyList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []*AuthorizationPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` +} + +// +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RequestAuthentication defines what request authentication methods are supported by a workload. +// It will reject a request if the request contains invalid authentication information, based on the +// configured authentication rules. A request that does not contain any authentication credentials +// will be accepted but will not have any authenticated identity. To restrict access to authenticated +// requests only, this should be accompanied by an authorization rule. +// Examples: +// +// - Require JWT for all request for workloads that have label `app:httpbin` +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// jwtRules: +// - issuer: "issuer-foo" +// jwksUri: https://example.com/.well-known/jwks.json +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// +// ``` +// +// - A policy in the root namespace ("istio-system" by default) applies to workloads in all namespaces +// in a mesh. The following policy makes all workloads only accept requests that contain a +// valid JWT token. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: req-authn-for-all +// namespace: istio-system +// +// spec: +// +// jwtRules: +// - issuer: "issuer-foo" +// jwksUri: https://example.com/.well-known/jwks.json +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: require-jwt-for-all +// namespace: istio-system +// +// spec: +// +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// +// ``` +// +// - The next example shows how to set a different JWT requirement for a different `host`. The `RequestAuthentication` +// declares it can accept JWTs issued by either `issuer-foo` or `issuer-bar` (the public key set is implicitly +// set from the OpenID Connect spec). +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// jwtRules: +// - issuer: "issuer-foo" +// - issuer: "issuer-bar" +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["issuer-foo/*"] +// to: +// - operation: +// hosts: ["example.com"] +// - from: +// - source: +// requestPrincipals: ["issuer-bar/*"] +// to: +// - operation: +// hosts: ["another-host.com"] +// +// ``` +// +// - You can fine tune the authorization policy to set different requirement per path. For example, +// to require JWT on all paths, except /healthz, the same `RequestAuthentication` can be used, but the +// authorization policy could be: +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: httpbin +// namespace: foo +// +// spec: +// +// selector: +// matchLabels: +// app: httpbin +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// - to: +// - operation: +// paths: ["/healthz"] +// +// ``` +// +// [Experimental] Routing based on derived [metadata](https://istio.io/latest/docs/reference/config/security/conditions/) +// is now supported. A prefix '@' is used to denote a match against internal metadata instead of the headers in the request. +// Currently this feature is only supported for the following metadata: +// +// - `request.auth.claims.{claim-name}[.{sub-claim}]*` which are extracted from validated JWT tokens. The claim name +// currently does not support the `.` character. Examples: `request.auth.claims.sub` and `request.auth.claims.name.givenName`. +// +// The use of matches against JWT claim metadata is only supported in Gateways. The following example shows: +// +// - RequestAuthentication to decode and validate a JWT. This also makes the `@request.auth.claims` available for use in the VirtualService. +// - AuthorizationPolicy to check for valid principals in the request. This makes the JWT required for the request. +// - VirtualService to route the request based on the "sub" claim. +// +// ```yaml +// apiVersion: security.istio.io/v1 +// kind: RequestAuthentication +// metadata: +// +// name: jwt-on-ingress +// namespace: istio-system +// +// spec: +// +// selector: +// matchLabels: +// app: istio-ingressgateway +// jwtRules: +// - issuer: "example.com" +// jwksUri: https://example.com/.well-known/jwks.json +// +// --- +// apiVersion: security.istio.io/v1 +// kind: AuthorizationPolicy +// metadata: +// +// name: require-jwt +// namespace: istio-system +// +// spec: +// +// selector: +// matchLabels: +// app: istio-ingressgateway +// rules: +// - from: +// - source: +// requestPrincipals: ["*"] +// +// --- +// apiVersion: networking.istio.io/v1alpha3 +// kind: VirtualService +// metadata: +// +// name: route-jwt +// +// spec: +// +// hosts: +// - foo.prod.svc.cluster.local +// gateways: +// - istio-ingressgateway +// http: +// - name: "v2" +// match: +// - headers: +// "@request.auth.claims.sub": +// exact: "dev" +// route: +// - destination: +// host: foo.prod.svc.cluster.local +// subset: v2 +// - name: "default" +// route: +// - destination: +// host: foo.prod.svc.cluster.local +// subset: v1 +// +// ``` +// +// +// +// +// +type RequestAuthentication struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + + // Spec defines the implementation of this definition. + // +optional + Spec securityv1.RequestAuthentication `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` + + Status v1alpha1.IstioStatus `json:"status"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// RequestAuthenticationList is a collection of RequestAuthentications. +type RequestAuthenticationList struct { + metav1.TypeMeta `json:",inline"` + // +optional + metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` + Items []*RequestAuthentication `json:"items" protobuf:"bytes,2,rep,name=items"` +} diff --git a/vendor/istio.io/client-go/pkg/apis/security/v1/zz_generated.deepcopy.gen.go b/vendor/istio.io/client-go/pkg/apis/security/v1/zz_generated.deepcopy.gen.go new file mode 100644 index 000000000..e914bf57c --- /dev/null +++ b/vendor/istio.io/client-go/pkg/apis/security/v1/zz_generated.deepcopy.gen.go @@ -0,0 +1,154 @@ +//go:build !ignore_autogenerated +// +build !ignore_autogenerated + +// Copyright Istio Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by deepcopy-gen. DO NOT EDIT. + +package v1 + +import ( + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthorizationPolicy) DeepCopyInto(out *AuthorizationPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicy. +func (in *AuthorizationPolicy) DeepCopy() *AuthorizationPolicy { + if in == nil { + return nil + } + out := new(AuthorizationPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AuthorizationPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AuthorizationPolicyList) DeepCopyInto(out *AuthorizationPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]*AuthorizationPolicy, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(AuthorizationPolicy) + (*in).DeepCopyInto(*out) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationPolicyList. +func (in *AuthorizationPolicyList) DeepCopy() *AuthorizationPolicyList { + if in == nil { + return nil + } + out := new(AuthorizationPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *AuthorizationPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequestAuthentication) DeepCopyInto(out *RequestAuthentication) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestAuthentication. +func (in *RequestAuthentication) DeepCopy() *RequestAuthentication { + if in == nil { + return nil + } + out := new(RequestAuthentication) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RequestAuthentication) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequestAuthenticationList) DeepCopyInto(out *RequestAuthenticationList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]*RequestAuthentication, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(RequestAuthentication) + (*in).DeepCopyInto(*out) + } + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestAuthenticationList. +func (in *RequestAuthenticationList) DeepCopy() *RequestAuthenticationList { + if in == nil { + return nil + } + out := new(RequestAuthenticationList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RequestAuthenticationList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} diff --git a/vendor/istio.io/client-go/pkg/apis/security/v1beta1/types.gen.go b/vendor/istio.io/client-go/pkg/apis/security/v1beta1/types.gen.go index 8a10df61a..1f5093645 100644 --- a/vendor/istio.io/client-go/pkg/apis/security/v1beta1/types.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/security/v1beta1/types.gen.go @@ -45,6 +45,9 @@ import ( // +genclient // +k8s:deepcopy-gen=true // --> +// type AuthorizationPolicy struct { v1.TypeMeta `json:",inline"` // +optional @@ -64,7 +67,7 @@ type AuthorizationPolicyList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []AuthorizationPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*AuthorizationPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` } // @@ -79,11 +82,15 @@ type AuthorizationPolicyList struct { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// mtls: -// mode: STRICT +// +// mtls: +// mode: STRICT +// // ``` // For mesh level, put the policy in root-namespace according to your Istio installation. // @@ -93,23 +100,31 @@ type AuthorizationPolicyList struct { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// mtls: -// mode: PERMISSIVE +// +// mtls: +// mode: PERMISSIVE +// // --- // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: finance +// namespace: foo +// // spec: -// selector: -// matchLabels: -// app: finance -// mtls: -// mode: STRICT +// +// selector: +// matchLabels: +// app: finance +// mtls: +// mode: STRICT +// // ``` // Policy to allow mTLS strict for all workloads, but leave port 8080 to // plaintext: @@ -117,17 +132,21 @@ type AuthorizationPolicyList struct { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// selector: -// matchLabels: -// app: finance -// mtls: -// mode: STRICT -// portLevelMtls: -// 8080: -// mode: DISABLE +// +// selector: +// matchLabels: +// app: finance +// mtls: +// mode: STRICT +// portLevelMtls: +// 8080: +// mode: DISABLE +// // ``` // Policy to inherit mTLS mode from namespace (or mesh) settings, and overwrite // settings for port 8080 @@ -135,17 +154,21 @@ type AuthorizationPolicyList struct { // apiVersion: security.istio.io/v1beta1 // kind: PeerAuthentication // metadata: -// name: default -// namespace: foo +// +// name: default +// namespace: foo +// // spec: -// selector: -// matchLabels: -// app: finance -// mtls: -// mode: UNSET -// portLevelMtls: -// 8080: -// mode: DISABLE +// +// selector: +// matchLabels: +// app: finance +// mtls: +// mode: UNSET +// portLevelMtls: +// 8080: +// mode: DISABLE +// // ``` // // +// type RequestAuthentication struct { v1.TypeMeta `json:",inline"` // +optional @@ -430,5 +496,5 @@ type RequestAuthenticationList struct { v1.TypeMeta `json:",inline"` // +optional v1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - Items []RequestAuthentication `json:"items" protobuf:"bytes,2,rep,name=items"` + Items []*RequestAuthentication `json:"items" protobuf:"bytes,2,rep,name=items"` } diff --git a/vendor/istio.io/client-go/pkg/apis/security/v1beta1/zz_generated.deepcopy.gen.go b/vendor/istio.io/client-go/pkg/apis/security/v1beta1/zz_generated.deepcopy.gen.go index f5b073bf1..d1b699b48 100644 --- a/vendor/istio.io/client-go/pkg/apis/security/v1beta1/zz_generated.deepcopy.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/security/v1beta1/zz_generated.deepcopy.gen.go @@ -58,9 +58,13 @@ func (in *AuthorizationPolicyList) DeepCopyInto(out *AuthorizationPolicyList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]AuthorizationPolicy, len(*in)) + *out = make([]*AuthorizationPolicy, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(AuthorizationPolicy) + (*in).DeepCopyInto(*out) + } } } return @@ -119,9 +123,13 @@ func (in *PeerAuthenticationList) DeepCopyInto(out *PeerAuthenticationList) { in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]PeerAuthentication, len(*in)) + *out = make([]*PeerAuthentication, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(PeerAuthentication) + (*in).DeepCopyInto(*out) + } } } return @@ -180,9 +188,13 @@ func (in *RequestAuthenticationList) DeepCopyInto(out *RequestAuthenticationList in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]RequestAuthentication, len(*in)) + *out = make([]*RequestAuthentication, len(*in)) for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(RequestAuthentication) + (*in).DeepCopyInto(*out) + } } } return diff --git a/vendor/istio.io/client-go/pkg/apis/telemetry/v1alpha1/types.gen.go b/vendor/istio.io/client-go/pkg/apis/telemetry/v1alpha1/types.gen.go index 0c00c080b..621b23d6d 100644 --- a/vendor/istio.io/client-go/pkg/apis/telemetry/v1alpha1/types.gen.go +++ b/vendor/istio.io/client-go/pkg/apis/telemetry/v1alpha1/types.gen.go @@ -35,10 +35,12 @@ import ( // +cue-gen:Telemetry:scope:Namespaced // +cue-gen:Telemetry:resource:categories=istio-io,telemetry-istio-io,shortNames=telemetry,plural=telemetries // +cue-gen:Telemetry:preserveUnknownFields:false -// +cue-gen:Telemetry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp is a timestamp -// representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. -// Clients may not set this value. It is represented in RFC3339 form and is in UTC. -// Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata" +// +cue-gen:Telemetry:printerColumn:name=Age,type=date,JSONPath=.metadata.creationTimestamp,description="CreationTimestamp +// is a timestamp representing the server time when this object was created. It +// is not guaranteed to be set in happens-before order across separate +// operations. Clients may not set this value. It is represented in RFC3339 form +// and is in UTC. Populated by the system. Read-only. Null for lists. More info: +// https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata" // --> // //