diff --git a/.bin/go.mod b/.bin/go.mod index 9292965e7..86933b95a 100644 --- a/.bin/go.mod +++ b/.bin/go.mod @@ -32,7 +32,7 @@ require ( github.com/bufbuild/connect-go v1.0.0 // indirect github.com/bufbuild/protocompile v0.1.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect - github.com/containerd/containerd v1.6.8 // indirect + github.com/containerd/containerd v1.6.12 // indirect github.com/containerd/typeurl v1.0.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/dgraph-io/ristretto v0.0.2 // indirect @@ -85,7 +85,6 @@ require ( github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mdempsky/go114-fuzz-build v0.0.0-20200813011514-561a369ae6e1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -137,7 +136,6 @@ require ( golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a // indirect google.golang.org/grpc v1.50.1 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/op/go-logging.v1 v1.0.0-20160211212156-b2cb9fa56473 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/.bin/go.sum b/.bin/go.sum index 48b67aebd..a4244cba7 100644 --- a/.bin/go.sum +++ b/.bin/go.sum @@ -17,13 +17,14 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb 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.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.94.1 h1:DwuSvDZ1pTYGbXo8yOJevCTr3BoBlE+OVkHAKiYQUXc= +cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= @@ -89,8 +90,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk 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/containerd/containerd v1.6.8 h1:h4dOFDwzHmqFEP754PgfgTeVXFnLiRc6kiqC7tplDJs= -github.com/containerd/containerd v1.6.8/go.mod h1:By6p5KqPK0/7/CgO/A6t/Gz+CUYUu2zf1hUaaymVXB0= +github.com/containerd/containerd v1.6.12 h1:kJ9b3mOFKf8yqo05Ob+tMoxvt1pbVWhnB0re9Y+k+8c= +github.com/containerd/containerd v1.6.12/go.mod h1:K4Bw7gjgh4TnkmQY+py/PYQGp4e7xgnHAeg87VeWb3A= github.com/containerd/typeurl v1.0.2 h1:Chlt8zIieDbzQFzXzAeBEF92KhExuE4p9p92/QmY7aY= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= @@ -191,7 +192,6 @@ github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtK github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= @@ -206,6 +206,7 @@ github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/me github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-swagger/go-swagger v0.30.3 h1:HuzvdMRed/9Q8vmzVcfNBQByZVtT79DNZxZ18OprdoI= github.com/go-swagger/go-swagger v0.30.3/go.mod h1:neDPes8r8PCz2JPvHRDj8BTULLh4VJUt7n6MpQqxhHM= +github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 h1:l9rI6sNaZgNC0LnF3MiE+qTmyBA/tZAg1rtyrGbUMK0= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -310,7 +311,6 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/googleapis/gax-go/v2 v2.1.1 h1:dp3bWCh+PPO1zjRRiCSczJav13sBvG4UhNyVTa1KqdU= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= @@ -372,7 +372,6 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -402,8 +401,6 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/goveralls v0.0.11 h1:eJXea6R6IFlL1QMKNMzDvvHv/hwGrnvyig4N+0+XiMM= github.com/mattn/goveralls v0.0.11/go.mod h1:gU8SyhNswsJKchEV93xRQxX6X3Ei4PJdQk/6ZHvrvRk= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mdempsky/go114-fuzz-build v0.0.0-20200813011514-561a369ae6e1 h1:WSodFp1I5x4qhGwwmH8YL/SgcPRfQ1U2P/tsEGR2xmw= -github.com/mdempsky/go114-fuzz-build v0.0.0-20200813011514-561a369ae6e1/go.mod h1:+ERgsn0pkpyL8DyKWxte5VjCQb+aNJbIQU18YeTp+NQ= github.com/mikefarah/yq/v4 v4.27.2 h1:+I32ystA1lUmSLvVUjEkUvZTgEJ194KCRO6btirqlpU= github.com/mikefarah/yq/v4 v4.27.2/go.mod h1:14pnJPIOQoguuykAa8Knn2yswgoeS0goeSyRVd6UgrE= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= @@ -455,7 +452,6 @@ github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZO github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -485,8 +481,6 @@ github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= -github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= @@ -546,6 +540,7 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ= @@ -613,8 +608,6 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -707,7 +700,7 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/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-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094 h1:2o1E+E8TpNLklK9nHiPiK1uzIYrIHt+cQx3ynCwq9V8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -851,7 +844,6 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200812231640-9176cd30088c/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -889,7 +881,6 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 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.58.0 h1:MDkAbYIB1JpSgCTOCYYoIec/coMlKK4oVbpnBLLcyT0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -980,7 +971,6 @@ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= diff --git a/.docker/Dockerfile b/.docker/Dockerfile index c5bae406b..ced759c71 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.16.2 +FROM alpine:3.17.2 RUN addgroup -S ory; \ adduser -S ory -G ory -D -h /home/ory -s /bin/nologin; \ diff --git a/.docker/Dockerfile-alpine b/.docker/Dockerfile-alpine index 2ede26b15..861c15192 100644 --- a/.docker/Dockerfile-alpine +++ b/.docker/Dockerfile-alpine @@ -1,4 +1,4 @@ -FROM alpine:3.16.2 +FROM alpine:3.17.2 RUN addgroup -S ory; \ adduser -S ory -G ory -D -H -s /bin/nologin diff --git a/.docker/Dockerfile-build b/.docker/Dockerfile-build index af2f6bd19..02c49f537 100644 --- a/.docker/Dockerfile-build +++ b/.docker/Dockerfile-build @@ -1,4 +1,4 @@ -FROM golang:1.19.3-alpine3.16 AS builder +FROM golang:1.20.1-alpine3.16 AS builder RUN apk -U --no-cache add build-base git gcc bash @@ -18,7 +18,7 @@ ADD . . RUN go build -buildvcs=false -tags sqlite -o /usr/bin/keto . -FROM alpine:3.16.2 +FROM alpine:3.17.2 RUN addgroup -S ory; \ adduser -S ory -G ory -D -h /home/ory -s /bin/nologin; \ diff --git a/.docker/Dockerfile-sqlite b/.docker/Dockerfile-sqlite index a39d08d25..0b2684333 100644 --- a/.docker/Dockerfile-sqlite +++ b/.docker/Dockerfile-sqlite @@ -1,4 +1,4 @@ -FROM alpine:3.16.2 +FROM alpine:3.17.2 # Because this image is built for SQLite, we create /home/ory and /home/ory/sqlite which is owned by the ory user # and declare /home/ory/sqlite a volume. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 17cc6e07c..277ffbf00 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,6 +6,7 @@ on: tags: - "*" pull_request: + merge_group: # Cancel in-progress runs in current workflow. concurrency: @@ -25,7 +26,9 @@ jobs: run: make buf-lint - run: go list -json > go.list - name: Run nancy - uses: sonatype-nexus-community/nancy-github-action@v1.0.2 + uses: zepatrik/nancy-github-action@3b0a989791377b50913568102c0ed5539e4eb29c + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} - name: Run golangci-lint uses: golangci/golangci-lint-action@v3 env: @@ -246,9 +249,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: "15" - - uses: arduino/setup-protoc@v1 - with: - version: "3.19.x" - name: Lint and Build run: | make buf diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e610d2377..8ff2ccf3a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -17,6 +17,7 @@ on: pull_request: # The branches below must be a subset of the branches above branches: [master] + merge_group: schedule: - cron: "39 6 * * 0" diff --git a/.github/workflows/cve-scan.yaml b/.github/workflows/cve-scan.yaml index dd836f06b..a9e214645 100644 --- a/.github/workflows/cve-scan.yaml +++ b/.github/workflows/cve-scan.yaml @@ -8,6 +8,7 @@ on: pull_request: branches: - "master" + merge_group: jobs: scanners: diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index a7a720ebc..1f6f836a6 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -3,6 +3,7 @@ name: Format on: pull_request: push: + merge_group: jobs: format: diff --git a/.github/workflows/licenses.yml b/.github/workflows/licenses.yml index a4592c63c..b6310057d 100644 --- a/.github/workflows/licenses.yml +++ b/.github/workflows/licenses.yml @@ -6,6 +6,7 @@ on: branches: - main - master + merge_group: jobs: check: diff --git a/.schema/README.md b/.schema/README.md index 2de087297..57d689bec 100644 --- a/.schema/README.md +++ b/.schema/README.md @@ -1,5 +1,5 @@ The schemas in this directory are meant for external and public use. The config schema is generated from the internal one at -`internal/driver/config/config.schema.json`, so in case of changes to the config -schema, please edit that internal schema instead. +`embedx/config.schema.json`, so in case of changes to the config schema, please +edit that internal schema instead. diff --git a/CHANGELOG.md b/CHANGELOG.md index 62a338a16..4457feb50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,13 @@ **Table of Contents** -- [0.0.0 (2022-11-28)](#000-2022-11-28) +- [0.0.0 (2023-02-16)](#000-2023-02-16) - [Bug Fixes](#bug-fixes) - [Code Refactoring](#code-refactoring) - [Documentation](#documentation) - [Features](#features) + - [Tests](#tests) + - [Unclassified](#unclassified) - [0.10.0-alpha.0 (2022-09-27)](#0100-alpha0-2022-09-27) - [Bug Fixes](#bug-fixes-1) - [Build System](#build-system) @@ -17,7 +19,7 @@ - [Code Refactoring](#code-refactoring-1) - [Documentation](#documentation-1) - [Features](#features-1) - - [Tests](#tests) + - [Tests](#tests-1) - [0.9.0-alpha.0 (2022-08-01)](#090-alpha0-2022-08-01) - [Breaking Changes](#breaking-changes) - [Bug Fixes](#bug-fixes-2) @@ -25,7 +27,7 @@ - [Code Refactoring](#code-refactoring-2) - [Documentation](#documentation-2) - [Features](#features-2) - - [Tests](#tests-1) + - [Tests](#tests-2) - [0.8.0-alpha.2 (2022-03-04)](#080-alpha2-2022-03-04) - [Bug Fixes](#bug-fixes-3) - [Code Generation](#code-generation-2) @@ -33,7 +35,7 @@ - [0.8.0-alpha.1 (2022-02-22)](#080-alpha1-2022-02-22) - [Bug Fixes](#bug-fixes-4) - [Code Generation](#code-generation-3) - - [Tests](#tests-2) + - [Tests](#tests-3) - [0.8.0-alpha.0 (2022-02-10)](#080-alpha0-2022-02-10) - [Bug Fixes](#bug-fixes-5) - [Code Generation](#code-generation-4) @@ -51,7 +53,7 @@ - [Code Refactoring](#code-refactoring-4) - [Documentation](#documentation-6) - [Features](#features-4) - - [Tests](#tests-3) + - [Tests](#tests-4) - [0.6.0-alpha.3 (2021-04-29)](#060-alpha3-2021-04-29) - [Code Generation](#code-generation-7) - [0.6.0-alpha.2 (2021-04-29)](#060-alpha2-2021-04-29) @@ -66,7 +68,7 @@ - [Code Refactoring](#code-refactoring-5) - [Documentation](#documentation-8) - [Features](#features-6) - - [Tests](#tests-4) + - [Tests](#tests-5) - [0.5.6-alpha.1 (2020-05-28)](#056-alpha1-2020-05-28) - [Bug Fixes](#bug-fixes-9) - [Chores](#chores-1) @@ -94,53 +96,53 @@ - [Bug Fixes](#bug-fixes-14) - [Documentation](#documentation-14) - [Features](#features-7) - - [Unclassified](#unclassified) -- [0.4.3-alpha.2 (2020-01-31)](#043-alpha2-2020-01-31) - [Unclassified](#unclassified-1) -- [0.4.3-alpha.1 (2020-01-23)](#043-alpha1-2020-01-23) +- [0.4.3-alpha.2 (2020-01-31)](#043-alpha2-2020-01-31) - [Unclassified](#unclassified-2) -- [0.4.2-alpha.1 (2020-01-14)](#042-alpha1-2020-01-14) +- [0.4.3-alpha.1 (2020-01-23)](#043-alpha1-2020-01-23) - [Unclassified](#unclassified-3) -- [0.4.1-beta.1 (2020-01-13)](#041-beta1-2020-01-13) +- [0.4.2-alpha.1 (2020-01-14)](#042-alpha1-2020-01-14) - [Unclassified](#unclassified-4) -- [0.4.0-alpha.1 (2020-01-13)](#040-alpha1-2020-01-13) +- [0.4.1-beta.1 (2020-01-13)](#041-beta1-2020-01-13) - [Unclassified](#unclassified-5) -- [0.3.9-sandbox (2019-12-16)](#039-sandbox-2019-12-16) +- [0.4.0-alpha.1 (2020-01-13)](#040-alpha1-2020-01-13) - [Unclassified](#unclassified-6) -- [0.3.7-sandbox (2019-12-11)](#037-sandbox-2019-12-11) +- [0.3.9-sandbox (2019-12-16)](#039-sandbox-2019-12-16) - [Unclassified](#unclassified-7) -- [0.3.6-sandbox (2019-10-16)](#036-sandbox-2019-10-16) +- [0.3.7-sandbox (2019-12-11)](#037-sandbox-2019-12-11) - [Unclassified](#unclassified-8) +- [0.3.6-sandbox (2019-10-16)](#036-sandbox-2019-10-16) + - [Unclassified](#unclassified-9) - [0.3.5-sandbox (2019-08-21)](#035-sandbox-2019-08-21) - [Documentation](#documentation-15) - - [Unclassified](#unclassified-9) + - [Unclassified](#unclassified-10) - [0.3.3-sandbox (2019-05-18)](#033-sandbox-2019-05-18) - [Continuous Integration](#continuous-integration) - [Documentation](#documentation-16) - [0.3.1-sandbox (2019-04-29)](#031-sandbox-2019-04-29) - [Continuous Integration](#continuous-integration-1) - [Documentation](#documentation-17) - - [Unclassified](#unclassified-10) + - [Unclassified](#unclassified-11) - [0.3.0-sandbox (2019-04-29)](#030-sandbox-2019-04-29) - [Documentation](#documentation-18) - - [Unclassified](#unclassified-11) + - [Unclassified](#unclassified-12) - [0.2.3-sandbox+oryOS.10 (2019-02-05)](#023-sandboxoryos10-2019-02-05) - [Documentation](#documentation-19) - - [Unclassified](#unclassified-12) + - [Unclassified](#unclassified-13) - [0.2.2-sandbox+oryOS.10 (2018-12-13)](#022-sandboxoryos10-2018-12-13) - [Continuous Integration](#continuous-integration-2) - [0.2.1-sandbox+oryOS.10 (2018-12-13)](#021-sandboxoryos10-2018-12-13) - [Continuous Integration](#continuous-integration-3) - [0.2.0-sandbox+oryOS.10 (2018-12-13)](#020-sandboxoryos10-2018-12-13) - [Documentation](#documentation-20) - - [Unclassified](#unclassified-13) + - [Unclassified](#unclassified-14) - [0.0.1 (2018-05-20)](#001-2018-05-20) - [Documentation](#documentation-21) - - [Unclassified](#unclassified-14) + - [Unclassified](#unclassified-15) -# [0.0.0](https://github.com/ory/keto/compare/v0.10.0-alpha.0...v0.0.0) (2022-11-28) +# [0.0.0](https://github.com/ory/keto/compare/v0.10.0-alpha.0...v0.0.0) (2023-02-16) ### Bug Fixes @@ -148,8 +150,18 @@ ([#1117](https://github.com/ory/keto/issues/1117)) ([5f89fcf](https://github.com/ory/keto/commit/5f89fcf6730810b36014fec825e77f0011dc2462)), closes [#1116](https://github.com/ory/keto/issues/1116) +- Do not insert UUID mappings on readonly APIs + ([#1190](https://github.com/ory/keto/issues/1190)) + ([a86db70](https://github.com/ory/keto/commit/a86db70dba4720562b31bfec33d09cc799d9ae53)): + + Endpoints that do not mutate the database (such as list or check) now use a + read-only version of the UUID mapper that does not write the mapping to the + database (as all relevant mapping information is already mapped). + - More robust parser ([d38e006](https://github.com/ory/keto/commit/d38e006f13477f7b67ab88f03ff64ced65da7cbd)) +- More robust query counting ([#1218](https://github.com/ory/keto/issues/1218)) + ([4503a74](https://github.com/ory/keto/commit/4503a74b52a03385e807b63c293ad643c68b5f46)) - Only type-check if there are no parser errors ([b4bef07](https://github.com/ory/keto/commit/b4bef07ca91b7585a52d536ee8c0c38ec1d66b9d)): @@ -160,6 +172,8 @@ ([1f3c568](https://github.com/ory/keto/commit/1f3c5687e726213dba84280f6457867c469b8321)) - Properly lex imports in OPL ([#1041](https://github.com/ory/keto/issues/1041)) ([26944e9](https://github.com/ory/keto/commit/26944e9e2f5d851aec63e46b3777d2d1ebaca3f8)) +- Race condition + ([05ec2da](https://github.com/ory/keto/commit/05ec2da017265b4fbbd860c54272acfa82893503)) - Race condition in setup ([#1107](https://github.com/ory/keto/issues/1107)) ([07dfce7](https://github.com/ory/keto/commit/07dfce7e964425e0fbe37b340c38c4404dd3fd2d)) - Recover from panics in gRPC server @@ -177,6 +191,16 @@ - Allow semicolons in more places - Allow commas in more places +- Tiny stuff ([#1211](https://github.com/ory/keto/issues/1211)) + ([719a7d5](https://github.com/ory/keto/commit/719a7d5d1bfd77c594528df821f20a061dc2b848)): + + - fix: tracing in persistence.sql.TraverseSubjectSetRewrite + + - fix: incorrect HTTP return code + +- Trace SQL in TraverseSubjectSetExpansion + ([#1242](https://github.com/ory/keto/issues/1242)) + ([8968451](https://github.com/ory/keto/commit/89684517425b3267e0f1face49f5b9424c79154b)) - Tune error message ([b51d215](https://github.com/ory/keto/commit/b51d2151873ce247deb33d9b50924c8fdacdae47)) - Use resilient HTTP client @@ -203,6 +227,11 @@ ([333af27](https://github.com/ory/keto/commit/333af27a3cf3975f5c879433b4a3f44951691392)) - Fix invalid link ([#1072](https://github.com/ory/keto/issues/1072)) ([2686e98](https://github.com/ory/keto/commit/2686e982772507c9423373405cc406dd47ebaad2)) +- Fix quickstart up.sh ([#1158](https://github.com/ory/keto/issues/1158)) + ([30a74c6](https://github.com/ory/keto/commit/30a74c6b1e24a0a55c6ce3d33ff614d649991e7c)): + + Added `--insecure-disable-transport-security` flag to all client commands. + - Improve rewrites example ([d809c76](https://github.com/ory/keto/commit/d809c76c8359093bb9e73b1fc386b09da3e6b88e)) - Standardize license headers ([#1061](https://github.com/ory/keto/issues/1061)) @@ -217,6 +246,9 @@ ([a8d8767](https://github.com/ory/keto/commit/a8d8767f02695932ed63b5139dd52534e8c4922f)) - Add libfuzzer for parser ([05c9a01](https://github.com/ory/keto/commit/05c9a01785bd4ca6055fee655dfb26d16883b8db)) +- Add option to add custom health checks + ([#1225](https://github.com/ory/keto/issues/1225)) + ([3399f60](https://github.com/ory/keto/commit/3399f604257df32a9ecc906bc81ddeac1700b718)) - Allow loading OPL configs from base64 URLs ([640abc1](https://github.com/ory/keto/commit/640abc11acb9b24197bc77710e6b0e8a88719751)) - Allow permits referencing permits @@ -233,15 +265,31 @@ ([081d834](https://github.com/ory/keto/commit/081d83454f96a7050c3f451048fb07d5204f839f)) - Allow setting the authority header in the CLI ([17f10ef](https://github.com/ory/keto/commit/17f10effbcc5f45b82093d2c8ec7b2962a3659bf)) +- Emit events through tracing ([#1244](https://github.com/ory/keto/issues/1244)) + ([70dd8be](https://github.com/ory/keto/commit/70dd8bef88dee295600f295dfcee60118d1b705b)) - Expose function to generate OPL ([#1057](https://github.com/ory/keto/issues/1057)) ([b80a230](https://github.com/ory/keto/commit/b80a230493eabf5056111ce59959c7d0238465fd)) - Expose OPL syntax check API ([57ff639](https://github.com/ory/keto/commit/57ff639db7a783023e5c47074e485b09874e9aae)) +- Faster SQL queries for checks and strict check mode + ([#1171](https://github.com/ory/keto/issues/1171)) + ([8e07890](https://github.com/ory/keto/commit/8e078900043de695094667ab1bdb4e4b0a55a6ab)): + + With this change we introduce an experimental strict mode that drastically + reduces the number of SQL queries performed during checks. This is + experimental to allow adjusting its behavior in a breaking manner, but it is + ready for production usage. Also some of the non-strict queries are optimized. + - Handle HTTP config locations ([6571bae](https://github.com/ory/keto/commit/6571bae5d10f3218573de3e5a60877bec71a2029)) +- Improve tracing ([#1169](https://github.com/ory/keto/issues/1169)) + ([64dc85e](https://github.com/ory/keto/commit/64dc85ee93eaa7322e1c6ffcf766968360c0d527)) - Rename to Ory Network ([#1081](https://github.com/ory/keto/issues/1081)) ([3fe1d68](https://github.com/ory/keto/commit/3fe1d68bd1c363c9fee8490332477f68dac8b547)) +- Return bad request on DELETE body + ([#1219](https://github.com/ory/keto/issues/1219)) + ([195182c](https://github.com/ory/keto/commit/195182c37328cb7803b593cc73444c00cab76a7d)) - Support Array<> syntax in type decl ([#1152](https://github.com/ory/keto/issues/1152)) ([c4c456b](https://github.com/ory/keto/commit/c4c456bf6fd97c572f56d6b632853f555ded6451)): @@ -249,6 +297,22 @@ You can now use `Array` as an alternative to `T[]` when declaring types for relations in the Ory Permission Language. +- Support semicolons in types ([#1151](https://github.com/ory/keto/issues/1151)) + ([a06eda7](https://github.com/ory/keto/commit/a06eda71dd1b8364eb424d6e843dd772e2eada51)), + closes [#1135](https://github.com/ory/keto/issues/1135) + +### Tests + +- Add benchmark for UUID mapper + ([#1200](https://github.com/ory/keto/issues/1200)) + ([775b065](https://github.com/ory/keto/commit/775b065858436fc90db1e975bebcf337eb87af41)) + +### Unclassified + +- ci: authenticate nancy action (#1239) + ([137fe6b](https://github.com/ory/keto/commit/137fe6ba715f835f1ee47baea2c2790b67feec0e)), + closes [#1239](https://github.com/ory/keto/issues/1239) + # [0.10.0-alpha.0](https://github.com/ory/keto/compare/v0.9.0-alpha.0...v0.10.0-alpha.0) (2022-09-27) This release ships the long-awaited Ory Permission Language (a.k.a. @@ -343,6 +407,9 @@ changelog for all the other fixes and features we included. Bumps from v0.10.0-alpha.0.pre.0 +- Pin v0.10.0-alpha.0.pre.1 release commit + ([2a63481](https://github.com/ory/keto/commit/2a63481863b9d10d05744178a78042a44e9e3872)) + ### Code Refactoring - Generalize tree structure diff --git a/Makefile b/Makefile index 805bbd8e4..f58340193 100644 --- a/Makefile +++ b/Makefile @@ -103,6 +103,7 @@ build: .PHONY: buf-gen buf-gen: .bin/buf node_modules buf generate proto + make format @echo "All code was generated successfully!" # diff --git a/README.md b/README.md index 2db08a826..47cdfa653 100644 --- a/README.md +++ b/README.md @@ -539,6 +539,30 @@ that your company deserves a spot here, reach out to dyrector.io + + + Adopter * + Stackspin + + + + stackspin.net + + + stackspin.net + + + + Adopter * + Amplitude + + + + amplitude.com + + + amplitude.com + diff --git a/benchtest.new.txt b/benchtest.new.txt new file mode 100644 index 000000000..ce12ba92b --- /dev/null +++ b/benchtest.new.txt @@ -0,0 +1,7 @@ +goos: linux +goarch: amd64 +pkg: github.com/ory/keto/internal/check +cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz +BenchmarkComputedUsersets/Computed_userset-8 14576 81280 ns/op 1.000 queries/op 17675 B/op 364 allocs/op +PASS +ok github.com/ory/keto/internal/check 2.055s diff --git a/buf.gen.yaml b/buf.gen.yaml index 93d62f89f..68e3024d6 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -9,6 +9,19 @@ plugins: out: proto opt: paths=source_relative,require_unimplemented_servers=false + - plugin: buf.build/protocolbuffers/js + out: proto + opt: import_style=commonjs,binary + + - plugin: buf.build/grpc/node + out: proto + opt: grpc_js,binary,import_style=commonjs + + - name: ts + out: proto + opt: ts_out=proto + path: node_modules/.bin/protoc-gen-ts + - remote: buf.build/grpc-ecosystem/plugins/grpc-gateway:v2.14.0-1 out: proto opt: paths=source_relative @@ -24,19 +37,6 @@ plugins: - disable_default_responses=true out: proto/openapiv2 - - remote: buf.build/protocolbuffers/plugins/js:v3.20.1-1 - out: proto - opt: import_style=commonjs,binary - - - remote: buf.build/grpc/plugins/node:v1.11.3-1 - out: proto - opt: grpc_js,binary,import_style=commonjs - - - name: ts - out: proto - opt: ts_out=proto - path: node_modules/.bin/protoc-gen-ts - - remote: buf.build/sawadashota/plugins/protoc-gen-doc:v1.5.1 out: proto opt: markdown,proto/buf.md diff --git a/cmd/server/serve.go b/cmd/server/serve.go index 525442568..5ee39342f 100644 --- a/cmd/server/serve.go +++ b/cmd/server/serve.go @@ -23,7 +23,7 @@ ORY Keto can be configured using environment variables as well as a configuratio on configuration options, open the configuration documentation: >> https://www.ory.sh/keto/docs/reference/configuration <<`, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { reg, err := helpers.NewRegistry(cmd, opts) if err != nil { return err diff --git a/contrib/cat-videos-example/up.sh b/contrib/cat-videos-example/up.sh index 28f3cfd03..da58e214f 100755 --- a/contrib/cat-videos-example/up.sh +++ b/contrib/cat-videos-example/up.sh @@ -11,16 +11,16 @@ trap teardown EXIT export KETO_WRITE_REMOTE="127.0.0.1:4467" -keto relation-tuple create contrib/cat-videos-example/relation-tuples +keto relation-tuple create contrib/cat-videos-example/relation-tuples --insecure-disable-transport-security echo " Created all relationships. Now you can use the Keto CLI client to play around: export KETO_READ_REMOTE=\"127.0.0.1:4466\" -keto relation-tuple get videos -keto check \"*\" view videos /cats/1.mp4 -keto expand view videos /cats/2.mp4 +keto relation-tuple get --insecure-disable-transport-security +keto check \"*\" view videos /cats/1.mp4 --insecure-disable-transport-security +keto expand view videos /cats/2.mp4 --insecure-disable-transport-security " # sleep 10h; has to be defined like this because OSX does not know units https://www.unix.com/man-page/osx/1/sleep/ diff --git a/embedx/config.schema.json b/embedx/config.schema.json index 005afd051..a29f68789 100644 --- a/embedx/config.schema.json +++ b/embedx/config.schema.json @@ -347,8 +347,14 @@ "file:///etc/configs/keto_namespaces.ts", "ws://my.websocket.server/keto_namespaces.ts" ] + }, + "experimental_strict_mode": { + "type": "boolean", + "title": "Strict permission checking mode", + "description": "EXPERIMENTAL: If strict mode is enabled, then relation tuples for permits are not checked directly (but the rewrites are applied). Similarly, subject sets are only expanded if they were declared with SubjectSet<...>. These stricter rules result in much faster checks with fewer queries to the underlying database. The behavior of strict mode might change while it is experimental." } }, + "additionalProperties": false, "required": ["location"] } ] diff --git a/go.mod b/go.mod index c303d000c..4dd190674 100644 --- a/go.mod +++ b/go.mod @@ -1,20 +1,16 @@ +go 1.19 + module github.com/ory/keto -replace ( - github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 - github.com/mattn/go-sqlite3 => github.com/mattn/go-sqlite3 v1.14.10 - github.com/oleiade/reflections => github.com/oleiade/reflections v1.0.1 - github.com/ory/keto/proto => ./proto - github.com/soheilhy/cmux => github.com/soheilhy/cmux v0.1.5-0.20210114230657-cdd3331e3e7c -) +replace github.com/ory/keto/proto => ./proto require ( github.com/cenkalti/backoff/v3 v3.2.2 github.com/ghodss/yaml v1.0.0 - github.com/go-sql-driver/mysql v1.6.0 + github.com/go-sql-driver/mysql v1.7.0 github.com/gobuffalo/httptest v1.5.2 - github.com/gobuffalo/pop/v6 v6.0.8 - github.com/gofrs/uuid v4.3.0+incompatible + github.com/gobuffalo/pop/v6 v6.1.1 + github.com/gofrs/uuid v4.4.0+incompatible github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/julienschmidt/httprouter v1.3.0 github.com/luna-duclos/instrumentedsql v1.1.3 @@ -23,169 +19,170 @@ require ( github.com/ory/herodot v0.9.13 github.com/ory/jsonschema/v3 v3.0.7 github.com/ory/keto/proto v0.10.0-alpha.0 - github.com/ory/x v0.0.502 + github.com/ory/x v0.0.534 github.com/pelletier/go-toml v1.9.5 github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 github.com/pkg/errors v0.9.1 - github.com/rs/cors v1.8.2 + github.com/rs/cors v1.8.3 github.com/segmentio/objconv v1.0.1 github.com/sirupsen/logrus v1.9.0 github.com/soheilhy/cmux v0.1.5 github.com/spf13/cobra v1.6.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.1 - github.com/tidwall/gjson v1.14.3 + github.com/tidwall/gjson v1.14.4 github.com/tidwall/sjson v1.2.5 github.com/urfave/negroni v1.0.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.4 - go.opentelemetry.io/otel v1.11.1 - go.uber.org/goleak v1.2.0 - golang.org/x/exp v0.0.0-20221026153819-32f3d567a233 - golang.org/x/oauth2 v0.1.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.38.0 + go.opentelemetry.io/otel v1.13.0 + go.opentelemetry.io/otel/sdk v1.12.0 + go.opentelemetry.io/otel/trace v1.13.0 + go.uber.org/goleak v1.2.1 + golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 + golang.org/x/oauth2 v0.5.0 golang.org/x/sync v0.1.0 - google.golang.org/grpc v1.50.1 + google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.28.1 ) require ( - cloud.google.com/go/compute v1.12.1 // indirect - cloud.google.com/go/compute/metadata v0.1.1 // indirect - github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect - github.com/Masterminds/semver/v3 v3.1.1 // indirect + cloud.google.com/go/compute v1.18.0 // indirect + cloud.google.com/go/compute/metadata v0.2.3 // indirect + github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect + github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Microsoft/go-winio v0.6.0 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect - github.com/avast/retry-go/v4 v4.3.0 // indirect + github.com/avast/retry-go/v4 v4.3.2 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bradleyjkemp/cupaloy/v2 v2.8.0 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/cockroachdb/cockroach-go/v2 v2.2.16 // indirect + github.com/cenkalti/backoff/v4 v4.2.0 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cockroachdb/cockroach-go/v2 v2.2.20 // indirect github.com/containerd/continuity v0.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect - github.com/docker/cli v20.10.21+incompatible // indirect + github.com/docker/cli v20.10.23+incompatible // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.21+incompatible // indirect + github.com/docker/docker v20.10.23+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect - github.com/dustin/go-humanize v1.0.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect github.com/evanphx/json-patch v5.6.0+incompatible // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/fatih/color v1.14.1 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/felixge/fgprof v0.9.3 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/swag v0.22.3 // indirect github.com/gobuffalo/envy v1.10.2 // indirect github.com/gobuffalo/fizz v1.14.4 // indirect - github.com/gobuffalo/flect v0.3.0 // indirect + github.com/gobuffalo/flect v1.0.0 // indirect github.com/gobuffalo/github_flavored_markdown v1.1.3 // indirect github.com/gobuffalo/helpers v0.6.7 // indirect github.com/gobuffalo/nulls v0.4.2 // indirect - github.com/gobuffalo/plush/v4 v4.1.16 // indirect + github.com/gobuffalo/plush/v4 v4.1.18 // indirect github.com/gobuffalo/tags/v3 v3.1.4 // indirect github.com/gobuffalo/validate/v3 v3.3.3 // indirect - github.com/goccy/go-yaml v1.9.6 // indirect + github.com/goccy/go-yaml v1.9.8 // indirect github.com/gofrs/flock v0.8.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/glog v1.0.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/pprof v0.0.0-20221010195024-131d412537ea // indirect + github.com/google/pprof v0.0.0-20230131232505-5a9e8f65f08f // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/google/uuid v1.3.0 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.3.0 // indirect - github.com/hashicorp/go-retryablehttp v0.7.1 // indirect + github.com/hashicorp/go-hclog v1.4.0 // indirect + github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/imdario/mergo v0.3.13 // indirect - github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect github.com/jackc/pgconn v1.13.0 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect github.com/jackc/pgproto3/v2 v2.3.1 // indirect - github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.12.0 // indirect + github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect + github.com/jackc/pgtype v1.13.0 // indirect github.com/jackc/pgx/v4 v4.17.2 // indirect github.com/jandelgado/gcov2lcov v1.0.5 // indirect github.com/jmoiron/sqlx v1.3.5 // indirect github.com/joho/godotenv v1.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect - github.com/knadh/koanf v1.4.4 // indirect + github.com/knadh/koanf v1.5.0 // indirect github.com/lib/pq v1.10.7 // indirect - github.com/magiconair/properties v1.8.6 // indirect + github.com/magiconair/properties v1.8.7 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.16 // indirect - github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/mattn/go-sqlite3 v1.14.16 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect - github.com/microcosm-cc/bluemonday v1.0.21 // indirect + github.com/microcosm-cc/bluemonday v1.0.22 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae // indirect - github.com/nyaruka/phonenumbers v1.1.1 // indirect + github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect + github.com/nyaruka/phonenumbers v1.1.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.4 // indirect github.com/openzipkin/zipkin-go v0.4.1 // indirect github.com/ory/dockertest/v3 v3.9.1 // indirect - github.com/ory/go-acc v0.2.8 // indirect - github.com/ory/viper v1.7.5 // indirect - github.com/pborman/uuid v1.2.1 // indirect + github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe // indirect + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pkg/profile v1.7.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.13.0 // indirect + github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.37.0 // indirect - github.com/prometheus/procfs v0.8.0 // indirect + github.com/prometheus/common v0.39.0 // indirect + github.com/prometheus/procfs v0.9.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/seatgeek/logrus-gelf-formatter v0.0.0-20210414080842-5b05eb8ff761 // indirect github.com/segmentio/backo-go v1.0.1 // indirect - github.com/sergi/go-diff v1.2.0 // indirect + github.com/sergi/go-diff v1.3.1 // indirect github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d // indirect github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e // indirect - github.com/spf13/afero v1.9.2 // indirect + github.com/spf13/afero v1.9.3 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect - github.com/subosito/gotenv v1.4.1 // indirect + github.com/spf13/viper v1.15.0 // indirect + github.com/subosito/gotenv v1.4.2 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.1 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/xtgo/uuid v0.0.0-20140804021211-a0b114877d4c // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.36.4 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.11.1 // indirect - go.opentelemetry.io/contrib/propagators/jaeger v1.11.1 // indirect - go.opentelemetry.io/contrib/samplers/jaegerremote v0.5.2 // indirect - go.opentelemetry.io/otel/exporters/jaeger v1.11.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1 // indirect - go.opentelemetry.io/otel/exporters/zipkin v1.11.1 // indirect - go.opentelemetry.io/otel/metric v0.33.0 // indirect - go.opentelemetry.io/otel/sdk v1.11.1 // indirect - go.opentelemetry.io/otel/trace v1.11.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.38.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.39.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.13.0 // indirect + go.opentelemetry.io/contrib/propagators/jaeger v1.13.0 // indirect + go.opentelemetry.io/contrib/samplers/jaegerremote v0.7.0 // indirect + go.opentelemetry.io/otel/exporters/jaeger v1.12.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.12.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.12.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.12.0 // indirect + go.opentelemetry.io/otel/exporters/zipkin v1.12.0 // indirect + go.opentelemetry.io/otel/metric v0.36.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect - golang.org/x/crypto v0.1.0 // indirect - golang.org/x/mod v0.6.0 // indirect - golang.org/x/net v0.1.0 // indirect - golang.org/x/sys v0.1.0 // indirect - golang.org/x/text v0.4.0 // indirect - golang.org/x/tools v0.2.0 // indirect + golang.org/x/crypto v0.5.0 // indirect + golang.org/x/mod v0.7.0 // indirect + golang.org/x/net v0.6.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + golang.org/x/tools v0.5.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71 // indirect + google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -go 1.19 diff --git a/go.sum b/go.sum index ef7f65dd0..8f70442c7 100644 --- a/go.sum +++ b/go.sum @@ -23,10 +23,10 @@ cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvf cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= -cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute/metadata v0.1.1 h1:/sxEbyrm6cw+XOUw1YxBHlatV71z4vpnmO7z2IZ0h3I= -cloud.google.com/go/compute/metadata v0.1.1/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute v1.18.0 h1:FEigFqoDbys2cvFkZ9Fjq4gnHBP55anJ0yQyau2f9oY= +cloud.google.com/go/compute v1.18.0/go.mod h1:1X7yHxec2Ga+Ss6jPyjxRxpu2uu7PLgsOVXvgU0yacs= +cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -41,12 +41,13 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= +github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= @@ -63,8 +64,8 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/avast/retry-go/v4 v4.3.0 h1:cqI48aXx0BExKoM7XPklDpoHAg7/srPPLAfWG5z62jo= -github.com/avast/retry-go/v4 v4.3.0/go.mod h1:bqOlT4nxk4phk9buiQFaghzjpqdchOSwPgjdfdQBtdg= +github.com/avast/retry-go/v4 v4.3.2 h1:x4sTEu3jSwr7zNjya8NTdIN+U88u/jtO/q3OupBoDtM= +github.com/avast/retry-go/v4 v4.3.2/go.mod h1:rg6XFaiuFYII0Xu3RDbZQkxCofFwruZKW8oEF1jpWiU= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -89,13 +90,13 @@ github.com/bradleyjkemp/cupaloy/v2 v2.8.0 h1:any4BmKE+jGIaMpnU8YgH/I2LPiLBufr6oM github.com/bradleyjkemp/cupaloy/v2 v2.8.0/go.mod h1:bm7JXdkRd4BHJk9HpwqAI8BoAY1lps46Enkdqw6aRX0= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= github.com/cenkalti/backoff/v3 v3.2.2/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= @@ -109,12 +110,11 @@ github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XP 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-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/cockroachdb/cockroach-go/v2 v2.2.16 h1:t9dmZuC9J2W8IDQDSIGXmP+fBuEJSsrGXxWQz4cYqBY= -github.com/cockroachdb/cockroach-go/v2 v2.2.16/go.mod h1:xZ2VHjUEb/cySv0scXBx7YsBnHtLHkR1+w/w73b5i3M= +github.com/cockroachdb/cockroach-go/v2 v2.2.20 h1:TLSzwdTdIwgsbdApHzaxunhSMrmbGf5YY6oxtaP2kvw= +github.com/cockroachdb/cockroach-go/v2 v2.2.20/go.mod h1:73vQi5H/H7kE8SgOt+XA6729Tubvj5hxKIEgbQQhp4c= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= @@ -132,8 +132,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -147,19 +146,20 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU= -github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.23+incompatible h1:qwyha/T3rXk9lfuVcn533cKFc7n/6IzL5GXVAgMVPBg= +github.com/docker/cli v20.10.23+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= -github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.23+incompatible h1:1ZQUUYAdh+oylOT85aA2ZcfRp22jmLhoaEcVEfK8dyA= +github.com/docker/docker v20.10.23+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -168,15 +168,15 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/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/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= +github.com/fatih/color v1.14.1/go.mod h1:2oHN61fhTpgcxD3TSWCgKDiH1+x4OiDVVGH8WlgGZGg= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= @@ -197,17 +197,19 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +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/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -215,8 +217,9 @@ github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD87 github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= +github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/gobuffalo/attrs v1.0.3/go.mod h1:KvDJCE0avbufqS0Bw3UV7RQynESY0jjod+572ctX4t8= @@ -224,8 +227,9 @@ github.com/gobuffalo/envy v1.10.2 h1:EIi03p9c3yeuRCFPOKcSfajzkLb3hrRjEpHGI8I2Wo4 github.com/gobuffalo/envy v1.10.2/go.mod h1:qGAGwdvDsaEtPhfBzb3o0SfDea8ByGn9j8bKmVft9z8= github.com/gobuffalo/fizz v1.14.4 h1:8uume7joF6niTNWN582IQ2jhGTUoa9g1fiV/tIoGdBs= github.com/gobuffalo/fizz v1.14.4/go.mod h1:9/2fGNXNeIFOXEEgTPJwiK63e44RjG+Nc4hfMm1ArGM= -github.com/gobuffalo/flect v0.3.0 h1:erfPWM+K1rFNIQeRPdeEXxo8yFr/PO17lhRnS8FUrtk= github.com/gobuffalo/flect v0.3.0/go.mod h1:5pf3aGnsvqvCj50AVni7mJJF8ICxGZ8HomberC3pXLE= +github.com/gobuffalo/flect v1.0.0 h1:eBFmskjXZgAOagiTXJH25Nt5sdFwNRcb8DKZsIsAUQI= +github.com/gobuffalo/flect v1.0.0/go.mod h1:l9V6xSb4BlXwsxEMj3FVEub2nkdQjWhPvD8XTTlHPQc= github.com/gobuffalo/genny/v2 v2.1.0/go.mod h1:4yoTNk4bYuP3BMM6uQKYPvtP6WsXFGm2w2EFYZdRls8= github.com/gobuffalo/github_flavored_markdown v1.1.3 h1:rSMPtx9ePkFB22vJ+dH+m/EUBS8doQ3S8LeEXcdwZHk= github.com/gobuffalo/github_flavored_markdown v1.1.3/go.mod h1:IzgO5xS6hqkDmUh91BW/+Qxo/qYnvfzoz3A7uLkg77I= @@ -238,24 +242,28 @@ github.com/gobuffalo/logger v1.0.7/go.mod h1:u40u6Bq3VVvaMcy5sRBclD8SXhBYPS0Qk95 github.com/gobuffalo/nulls v0.4.2 h1:GAqBR29R3oPY+WCC7JL9KKk9erchaNuV6unsOSZGQkw= github.com/gobuffalo/nulls v0.4.2/go.mod h1:EElw2zmBYafU2R9W4Ii1ByIj177wA/pc0JdjtD0EsH8= github.com/gobuffalo/packd v1.0.2/go.mod h1:sUc61tDqGMXON80zpKGp92lDb86Km28jfvX7IAyxFT8= -github.com/gobuffalo/plush/v4 v4.1.16 h1:Y6jVVTLdg1BxRXDIbTJz+J8QRzEAtv5ZwYpGdIFR7VU= github.com/gobuffalo/plush/v4 v4.1.16/go.mod h1:6t7swVsarJ8qSLw1qyAH/KbrcSTwdun2ASEQkOznakg= -github.com/gobuffalo/pop/v6 v6.0.8 h1:9+5ShHYh3x9NDFCITfm/gtKDDRSgOwiY7kA0Hf7N9aQ= -github.com/gobuffalo/pop/v6 v6.0.8/go.mod h1:f4JQ4Zvkffcevz+t+XAwBLStD7IQs19DiIGIDFYw1eA= +github.com/gobuffalo/plush/v4 v4.1.18 h1:bnPjdMTEUQHqj9TNX2Ck3mxEXYZa+0nrFMNM07kpX9g= +github.com/gobuffalo/plush/v4 v4.1.18/go.mod h1:xi2tJIhFI4UdzIL8sxZtzGYOd2xbBpcFbLZlIPGGZhU= +github.com/gobuffalo/pop/v6 v6.1.1 h1:eUDBaZcb0gYrmFnKwpuTEUA7t5ZHqNfvS4POqJYXDZY= +github.com/gobuffalo/pop/v6 v6.1.1/go.mod h1:1n7jAmI1i7fxuXPZjZb0VBPQDbksRtCoFnrDV5IsvaI= github.com/gobuffalo/tags/v3 v3.1.4 h1:X/ydLLPhgXV4h04Hp2xlbI2oc5MDaa7eub6zw8oHjsM= github.com/gobuffalo/tags/v3 v3.1.4/go.mod h1:ArRNo3ErlHO8BtdA0REaZxijuWnWzF6PUXngmMXd2I0= github.com/gobuffalo/validate/v3 v3.3.3 h1:o7wkIGSvZBYBd6ChQoLxkz2y1pfmhbI4jNJYh6PuNJ4= github.com/gobuffalo/validate/v3 v3.3.3/go.mod h1:YC7FsbJ/9hW/VjQdmXPvFqvRis4vrRYFxr69WiNZw6g= -github.com/goccy/go-yaml v1.9.6 h1:KhAu1zf9JXnm3vbG49aDE0E5uEBUsM4uwD31/58ZWyI= -github.com/goccy/go-yaml v1.9.6/go.mod h1:JubOolP3gh0HpiBc4BLRD4YmjEjHAmIIB2aaXKkTfoE= +github.com/goccy/go-yaml v1.9.8 h1:5gMyLUeU1/6zl+WFfR1hN7D2kf+1/eRGa7DFtToiBvQ= +github.com/goccy/go-yaml v1.9.8/go.mod h1:JubOolP3gh0HpiBc4BLRD4YmjEjHAmIIB2aaXKkTfoE= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.3.0+incompatible h1:CaSVZxm5B+7o45rtab4jC2G37WGYX1zQfuU2i6DSvnc= -github.com/gofrs/uuid v4.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -320,8 +328,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20221010195024-131d412537ea h1:R3VfsTXMMK4JCWZDdxScmnTzu9n9YRsDvguLis0U/b8= -github.com/google/pprof v0.0.0-20221010195024-131d412537ea/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= +github.com/google/pprof v0.0.0-20230131232505-5a9e8f65f08f h1:gl1DCiSk+mrXXBGPm6CEeS2MkJuMVzAOrXg34oVj1QI= +github.com/google/pprof v0.0.0-20230131232505-5a9e8f65f08f/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= @@ -329,8 +337,6 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= @@ -352,8 +358,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgf github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0 h1:kr3j8iIMR4ywO/O0rvksXaJvauGGCMg2zAZIiNZ9uIQ= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.12.0/go.mod h1:ummNFgdgLhhX7aIiy35vVmQNS0rWXknfPE0qe6fmFXg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 h1:1JYBfzqrWPcCclBwxFCPAou9n+q86mfnu7NAeHfte7A= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0/go.mod h1:YDZoGHuwE+ov0c8smSH49WLF3F2LaWnYYuDVd+EWrc0= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= @@ -367,8 +373,8 @@ github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9 github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.3.0 h1:G0ACM8Z2WilWgPv3Vdzwm3V0BQu/kSmrkVtpe1fy9do= -github.com/hashicorp/go-hclog v1.3.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.4.0 h1:ctuWFGrhFha8BnnzxqeRGidlEcQkDyL5u8J8t5eA11I= +github.com/hashicorp/go-hclog v1.4.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= @@ -376,8 +382,8 @@ github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+ github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.8/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= -github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= +github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= +github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -411,11 +417,11 @@ github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1: github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf h1:FtEj8sfIcaaBfAKrE1Cwb61YDtYq9JxChK1c7AKce7s= github.com/inhies/go-bytesize v0.0.0-20220417184213-4913239db9cf/go.mod h1:yrqSXGoD/4EKfF26AOGzscPOgTTJcyAwM2rpixWT+t4= -github.com/instana/testify v1.6.2-0.20200721153833-94b1851f4d65 h1:T25FL3WEzgmKB0m6XCJNZ65nw09/QIp3T1yXr487D+A= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= @@ -448,15 +454,17 @@ github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwX github.com/jackc/pgproto3/v2 v2.3.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= +github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= github.com/jackc/pgtype v1.11.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= -github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.13.0 h1:XkIc7A+1BmZD19bB2NxrtjJweHxQ9agqvM+9URc68Cg= +github.com/jackc/pgtype v1.13.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= @@ -483,11 +491,12 @@ github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqx github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -496,10 +505,11 @@ github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4d github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/knadh/koanf v1.4.4 h1:d2jY5nCCeoaiqvEKSBW9rEc93EfNy/XWgWsSB3j7JEA= -github.com/knadh/koanf v1.4.4/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= +github.com/knadh/koanf v1.5.0 h1:q2TSd/3Pyc/5yP9ldIrSdIz26MCcyNQzW0pEAugLPNs= +github.com/knadh/koanf v1.5.0/go.mod h1:Hgyjp4y8v44hpZtPzs7JZfRAW5AhN7KfZcwv1RYggDs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -529,8 +539,10 @@ github.com/luna-duclos/instrumentedsql v1.1.3/go.mod h1:9J1njvFds+zN7y85EDhN9XNQ github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= -github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= -github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= +github.com/magiconair/properties v1.8.7/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/pkger v0.17.1 h1:/MKEtWqtc0mZvu9OinB9UzVN9iYCwLWuyUv4Bw+PCno= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= @@ -549,16 +561,19 @@ github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcME github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-sqlite3 v1.14.10 h1:MLn+5bFRlWMGoSRmJour3CL1w/qL96mvipqpwQW/Sfk= -github.com/mattn/go-sqlite3 v1.14.10/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= +github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/microcosm-cc/bluemonday v1.0.20/go.mod h1:yfBmMi8mxvaZut3Yytv+jTXRY8mxyjJ0/kQBTElld50= -github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= -github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= +github.com/microcosm-cc/bluemonday v1.0.22 h1:p2tT7RNzRdCi0qmwxG+HbqD6ILkmwter1ZwVZn1oTxA= +github.com/microcosm-cc/bluemonday v1.0.22/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= @@ -584,24 +599,22 @@ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae h1:O4SWKdcHVCvYqyDV+9CJA1fcDN2L11Bule0iFy3YlAI= -github.com/moby/term v0.0.0-20220808134915-39b0c02b01ae/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= +github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nyaruka/phonenumbers v1.0.73/go.mod h1:3aiS+PS3DuYwkbK3xdcmRwMiPNECZ0oENH8qUT1lY7Q= -github.com/nyaruka/phonenumbers v1.1.1 h1:fyoZmpLN2VCmAnc51XcrNOUVP2wT1ZzQl348ggIaXII= -github.com/nyaruka/phonenumbers v1.1.1/go.mod h1:cGaEsOrLjIL0iKGqJR5Rfywy86dSkbApEpXuM9KySNA= +github.com/nyaruka/phonenumbers v1.1.5 h1:vYy2DI+z5hdaemqVzXYJ4CVyK92IG484CirEY+40GTo= +github.com/nyaruka/phonenumbers v1.1.5/go.mod h1:yShPJHDSH3aTKzCbXyVxNpbl2kA+F+Ne5Pun/MvFRos= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -620,22 +633,20 @@ github.com/ory/analytics-go/v4 v4.0.3/go.mod h1:A3Chm/3TmM8jw4nqRss+gFhAYHRI5j/H github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/ory/go-acc v0.2.6/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw= -github.com/ory/go-acc v0.2.8 h1:rOHHAPQjf0u7eHFGWpiXK+gIu/e0GRSJNr9pDukdNC4= -github.com/ory/go-acc v0.2.8/go.mod h1:iCRZUdGb/7nqvSn8xWZkhfVrtXRZ9Wru2E5rabCjFPI= +github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe h1:rvu4obdvqR0fkSIJ8IfgzKOWwZ5kOT2UNfLq81Qk7rc= +github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe/go.mod h1:z4n3u6as84LbV4YmgjHhnwtccQqzf4cZlSk9f1FhygI= github.com/ory/graceful v0.1.3 h1:FaeXcHZh168WzS+bqruqWEw/HgXWLdNv2nJ+fbhxbhc= github.com/ory/graceful v0.1.3/go.mod h1:4zFz687IAF7oNHHiB586U4iL+/4aV09o/PYLE34t2bA= github.com/ory/herodot v0.9.13 h1:cN/Z4eOkErl/9W7hDIDLb79IO/bfsH+8yscBjRpB4IU= github.com/ory/herodot v0.9.13/go.mod h1:IWDs9kSvFQqw/cQ8zi5ksyYvITiUU4dI7glUrhZcJYo= github.com/ory/jsonschema/v3 v3.0.7 h1:GQ9qfZDiJqs4l2d3p56dozCChvejQFZyLKGHYzDzOSo= github.com/ory/jsonschema/v3 v3.0.7/go.mod h1:g8c8YOtN4TrR2wYeMdT02GDmzJDI0fEW2nI26BECafY= -github.com/ory/viper v1.7.5 h1:+xVdq7SU3e1vNaCsk/ixsfxE4zylk1TJUiJrY647jUE= github.com/ory/viper v1.7.5/go.mod h1:ypOuyJmEUb3oENywQZRgeAMwqgOyDqwboO1tj3DjTaM= -github.com/ory/x v0.0.502 h1:jEIKsQot19mb3ZOMzV97O6l/tyvIZu5nNg7FNACP8Qs= -github.com/ory/x v0.0.502/go.mod h1:xUtRpoiRARyJNPVk/fcCNKzyp25Foxt9GPlj8pd7egY= +github.com/ory/x v0.0.534 h1:hc49pmcOuHdJ6rbHVGtJJ4/LU88dzDCtEQKfgeo/ecU= +github.com/ory/x v0.0.534/go.mod h1:CQopDsCC9t0tQsddE9UlyRFVEFd2xjKBVcw4nLMMMS0= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= @@ -643,6 +654,8 @@ github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bA github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= +github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5 h1:Ii+DKncOVM8Cu1Hc+ETb5K+23HdAMvESYE3ZJ5b5cMI= github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5/go.mod h1:iIss55rKnNBTvrwdmkUpLnDpZoAHvWaiq5+iMmen4AE= @@ -664,11 +677,9 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= -github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= +github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -680,17 +691,15 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8pXE= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.39.0 h1:oOyhkDq05hPZKItWVBkJ6g6AtGxi+fy7F4JvUV8uhsI= +github.com/prometheus/common v0.39.0/go.mod h1:6XBZ7lYdLCbkAVhwRsWTZn+IN5AB9F/NXd5w0BbEX0Y= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= +github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -699,8 +708,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= +github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= @@ -722,8 +731,9 @@ github.com/segmentio/conf v1.2.0/go.mod h1:Y3B9O/PqqWqjyxyWWseyj/quPEtMu1zDp/kVb github.com/segmentio/go-snakecase v1.1.0/go.mod h1:jk1miR5MS7Na32PZUykG89Arm+1BUSYhuGR6b7+hJto= github.com/segmentio/objconv v1.0.1 h1:QjfLzwriJj40JibCV3MGSEiAoXixbp4ybhwfTB8RXOM= github.com/segmentio/objconv v1.0.1/go.mod h1:auayaH5k3137Cl4SoXTgrzQcuQDmvuVtZgS0fb1Ahys= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= +github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= @@ -738,8 +748,9 @@ github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0 github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.5-0.20210114230657-cdd3331e3e7c h1:Jmp/Xy1lMcqIcxWpgAOee2+Is5RkIQVN61N1iGLddbo= -github.com/soheilhy/cmux v0.1.5-0.20210114230657-cdd3331e3e7c/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= +github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d h1:yKm7XZV6j9Ev6lojP2XaIshpT4ymkqhMeSghO5Ps00E= github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE= github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e h1:qpG93cPwA5f7s/ZPBJnGOYQNK/vKsaDaseuKT5Asee8= @@ -748,8 +759,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.5.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= -github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= +github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.2-0.20200723214538-8d17101741c8/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -757,7 +768,6 @@ github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -768,6 +778,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.15.0 h1:js3yy885G8xwJa6iOISGFwd+qlUo5AvyXb7CiihdtiU= +github.com/spf13/viper v1.15.0/go.mod h1:fFcTBJxvhhzSJiZy8n+PeW6t8l+KeT/uTARa0jHOQLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -786,12 +798,12 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= -github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/subosito/gotenv v1.4.2 h1:X1TuBLAMDFbaTAChgCBLu3DU3UPyELpnF2jjJ2cz/S8= +github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= -github.com/tidwall/gjson v1.14.3 h1:9jvXn7olKEHU1S9vwoMGliaT8jq1vJ7IH/n9zD9Dnlw= -github.com/tidwall/gjson v1.14.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= +github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM= +github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= @@ -835,36 +847,36 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.4 h1:PRXhsszxTt5bbPriTjmaweWUsAnJYeWBhUMLRetUgBU= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.36.4/go.mod h1:05eWWy6ZWzmpeImD3UowLTB3VjDMU1yxQ+ENuVWDM3c= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.36.4 h1:toN8e0U4RWQL4f8H+1eFtaeWe/IkSM3+81qJEDOgShs= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.36.4/go.mod h1:u4OeI4ujQmFbpZOOysLUfYrRWOmEVmvzkM2zExVorXM= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4 h1:aUEBEdCa6iamGzg6fuYxDA8ThxvOG240mAvWDU+XLio= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4/go.mod h1:l2MdsbKTocpPS5nQZscqTR9jd8u96VYZdcpF8Sye7mA= -go.opentelemetry.io/contrib/propagators/b3 v1.11.1 h1:icQ6ttRV+r/2fnU46BIo/g/mPu6Rs5Ug8Rtohe3KqzI= -go.opentelemetry.io/contrib/propagators/b3 v1.11.1/go.mod h1:ECIveyMXgnl4gorxFcA7RYjJY/Ql9n20ubhbfDc3QfA= -go.opentelemetry.io/contrib/propagators/jaeger v1.11.1 h1:Gw+P9NQzw4bjNGZXsoDhwwDWLnk4Y1waF8MQZAq/eYM= -go.opentelemetry.io/contrib/propagators/jaeger v1.11.1/go.mod h1:dP/N3ZFADH8azBcZfGXEFNBXpEmPTXYcNj9rkw1+2Oc= -go.opentelemetry.io/contrib/samplers/jaegerremote v0.5.2 h1:Izp9RqrioK/y7J/RXy2c7zd83iKQ4N3td3AMNKNzHiI= -go.opentelemetry.io/contrib/samplers/jaegerremote v0.5.2/go.mod h1:Z0aRlRERn9v/3J2K+ATa6ffKyb8/i+/My/gTzFr3dII= -go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= -go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= -go.opentelemetry.io/otel/exporters/jaeger v1.11.1 h1:F9Io8lqWdGyIbY3/SOGki34LX/l+7OL0gXNxjqwcbuQ= -go.opentelemetry.io/otel/exporters/jaeger v1.11.1/go.mod h1:lRa2w3bQ4R4QN6zYsDgy7tEezgoKEu7Ow2g35Y75+KI= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 h1:X2GndnMCsUPh6CiY2a+frAbNsXaPLbB0soHRYhAZ5Ig= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1/go.mod h1:i8vjiSzbiUC7wOQplijSXMYUpNM93DtlS5CbUT+C6oQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 h1:MEQNafcNCB0uQIti/oHgU7CZpUMYQ7qigBwMVKycHvc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1/go.mod h1:19O5I2U5iys38SsmT2uDJja/300woyzE1KPIQxEUBUc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1 h1:tFl63cpAAcD9TOU6U8kZU7KyXuSRYAZlbx1C61aaB74= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1/go.mod h1:X620Jww3RajCJXw/unA+8IRTgxkdS7pi+ZwK9b7KUJk= -go.opentelemetry.io/otel/exporters/zipkin v1.11.1 h1:JlJ3/oQoyqlrPDCfsSVFcHgGeHvZq+hr1VPWtiYCXTo= -go.opentelemetry.io/otel/exporters/zipkin v1.11.1/go.mod h1:T4S6aVwIS1+MHA+dJHCcPROtZe6ORwnv5vMKPRapsFw= -go.opentelemetry.io/otel/metric v0.33.0 h1:xQAyl7uGEYvrLAiV/09iTJlp1pZnQ9Wl793qbVvED1E= -go.opentelemetry.io/otel/metric v0.33.0/go.mod h1:QlTYc+EnYNq/M2mNk1qDDMRLpqCOj2f/r5c7Fd5FYaI= -go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= -go.opentelemetry.io/otel/sdk v1.11.1/go.mod h1:/l3FE4SupHJ12TduVjUkZtlfFqDCQJlOlithYrdktys= -go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= -go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.38.0 h1:g/BAN5o90Pr6D8xMRezjzGOHBpc15U+4oE53nZLiae4= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.38.0/go.mod h1:+F41JBSkye7aYJELRvIMF0Z66reIwIOL0St75ZVwSJs= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.38.0 h1:q2UbRSx6GEv9HSjgMSQKcuJ9xaczm8xeKIRNzV28RJc= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.38.0/go.mod h1:0qaU8WKebRvZWDd0VqhlLXXzEmTmyELEQbdAsxIbe1k= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.39.0 h1:vFEBG7SieZJzvnRWQ81jxpuEqe6J8Ex+hgc9CqOTzHc= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.39.0/go.mod h1:9rgTcOKdIhDOC0IcAu8a+R+FChqSUBihKpM1lVNi6T0= +go.opentelemetry.io/contrib/propagators/b3 v1.13.0 h1:f17PBmZK60RoHvOpJVqEka8oS2EXjpjHquESD/8zZ50= +go.opentelemetry.io/contrib/propagators/b3 v1.13.0/go.mod h1:zy2hz1TpGUoJzSwlBchVGvVAFQS8s2pglKLbrAFZ+Sc= +go.opentelemetry.io/contrib/propagators/jaeger v1.13.0 h1:+tVlvpiQMOCzi4EYCaBjblibpyKfqoph0fcITmtXMws= +go.opentelemetry.io/contrib/propagators/jaeger v1.13.0/go.mod h1:Qf7eVCLYawiNIB+A81kk8aFDFwYqXSqmt0N2RcvkLLI= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.7.0 h1:E+RlfFhGZ5Tk0wO1oOJYC0Il4Q7SjE8ZMl8x/VTK9Pk= +go.opentelemetry.io/contrib/samplers/jaegerremote v0.7.0/go.mod h1:cuBMmL+iGJ4UpZi6dykQlIUxqKSMkp5eu1C1UjUJYFI= +go.opentelemetry.io/otel v1.13.0 h1:1ZAKnNQKwBBxFtww/GwxNUyTf0AxkZzrukO8MeXqe4Y= +go.opentelemetry.io/otel v1.13.0/go.mod h1:FH3RtdZCzRkJYFTCsAKDy9l/XYjMdNv6QrkFFB8DvVg= +go.opentelemetry.io/otel/exporters/jaeger v1.12.0 h1:1Vy11S0iAD70EPfcP3N2f2IhLq/cIuTW+Zt010MswR8= +go.opentelemetry.io/otel/exporters/jaeger v1.12.0/go.mod h1:SCLbaspEoU9mGJZB6ksc2iSGU6CLWY5yefchDqOM0IM= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.12.0 h1:UfDENi+LTcLjQ/JhaXimjlIgn7wWjwbEMmdREm2Gyng= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.12.0/go.mod h1:rqbht/LlhVBgn5+k3M5QK96K5Xb0DvXpMJ5SFQpY6uw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.12.0 h1:ZVqtSAxrR4+ofzayuww0/EKamCjjnwnXTMRZzMudJoU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.12.0/go.mod h1:IlaGLENJkAl9+Xoo3J0unkdOwtL+rmqZ3ryMjUtYA94= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.12.0 h1:L23MzcHDznr05xOM1Ng1F98L0nVd7hm/S7y2jW9IRB4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.12.0/go.mod h1:C+onYX2j5QH653b3wGJwowYr8jLMjBJw35QcaCQQK0U= +go.opentelemetry.io/otel/exporters/zipkin v1.12.0 h1:0Pvqi4MAvQ28rGUFoH8uIaNKNCGVLNpn7TbRCkB1gP8= +go.opentelemetry.io/otel/exporters/zipkin v1.12.0/go.mod h1:zrxX/glbLVD/EFi01JCn2W1KdWNrJb3FkBHF+oRPlXs= +go.opentelemetry.io/otel/metric v0.36.0 h1:t0lgGI+L68QWt3QtOIlqM9gXoxqxWLhZ3R/e5oOAY0Q= +go.opentelemetry.io/otel/metric v0.36.0/go.mod h1:wKVw57sd2HdSZAzyfOM9gTqqE8v7CbqWsYL6AyrH9qk= +go.opentelemetry.io/otel/sdk v1.12.0 h1:8npliVYV7qc0t1FKdpU08eMnOjgPFMnriPhn0HH4q3o= +go.opentelemetry.io/otel/sdk v1.12.0/go.mod h1:WYcvtgquYvgODEvxOry5owO2y9MyciW7JqMz6cpXShE= +go.opentelemetry.io/otel/trace v1.13.0 h1:CBgRZ6ntv+Amuj1jDsMhZtlAPT6gbyIRdaIzFhfBSdY= +go.opentelemetry.io/otel/trace v1.13.0/go.mod h1:muCvmmO9KKpvuXSf3KKAXXB2ygNYHQ+ZfI5X08d3tds= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -873,8 +885,8 @@ go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.2.0 h1:xqgm/S+aQvhWFTtR0XK3Jvg7z8kGV8P4X14IzwN3Eqk= -go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= @@ -903,8 +915,8 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -915,8 +927,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20221026153819-32f3d567a233 h1:9bNbSKT4RPLEzne0Xh1v3NaNecsa1DKjkOuTbY6V9rI= -golang.org/x/exp v0.0.0-20221026153819-32f3d567a233/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20230131160201-f062dba9d201 h1:BEABXpNXLEz0WxtA+6CQIz2xkg80e+1zrhWyMcq8VzE= +golang.org/x/exp v0.0.0-20230131160201-f062dba9d201/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -930,7 +942,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu 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/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/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= @@ -944,8 +955,8 @@ 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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -982,22 +993,19 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/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-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -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-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220622184535-263ec571b305/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1007,11 +1015,9 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/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-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/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.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= -golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.5.0 h1:HuArIo48skDwlrvM3sEdHXElYslAMsf3KwRkkW4MC4s= +golang.org/x/oauth2 v0.5.0/go.mod h1:9/XBHVqLaWO3/BRHs5jbpYCnOZVjj5V0ndyaAM7KB4I= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1100,22 +1106,18 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/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-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220513210249-45d2b4557a2a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -1130,12 +1132,13 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1149,7 +1152,6 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1197,8 +1199,8 @@ golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.5.0 h1:+bSpV5HIeWkuvgaMfI3UmKRThoTA5ODJTUd8T17NO+4= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1277,9 +1279,8 @@ google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220622171453-ea41d75dfa0f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71 h1:GEgb2jF5zxsFJpJfg9RoDDWm7tiwc/DDSTE2BtLUkXU= -google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 h1:p0kMzw6AG0JEzd7Z+kXqOiLhC6gjUQTbtS2zR0Q3DbI= +google.golang.org/genproto v0.0.0-20230131230820-1c016267d619/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1304,10 +1305,8 @@ google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= 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.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1 h1:DS/BukOZWp8s6p4Dt/tOaJaTQyPyOoCcrjroHuCeLzY= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc/examples v0.0.0-20210304020650-930c79186c99 h1:qA8rMbz1wQ4DOFfM2ouD29DG9aHWBm6ZOy9BGxiUMmY= google.golang.org/grpc/examples v0.0.0-20210304020650-930c79186c99/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1323,7 +1322,6 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= @@ -1331,8 +1329,9 @@ gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUy gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE= gopkg.in/go-playground/mold.v2 v2.2.0/go.mod h1:XMyyRsGtakkDPbxXbrA5VODo6bUXyvoDjLd5l3T0XoA= @@ -1363,7 +1362,6 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/postgres v1.3.5/go.mod h1:EGCWefLFQSVFrHGy4J8EtiHCWX5Q8t0yz2Jt9aKkGzU= gorm.io/gorm v1.23.4/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= gorm.io/gorm v1.23.5/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.2.0 h1:I0DwBVMGAx26dttAj1BtJLAkVGncrkkUXfJLC4Flt/I= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/internal/check/2023-01-09-benchtest.txt b/internal/check/2023-01-09-benchtest.txt new file mode 100644 index 000000000..cf97a9d44 --- /dev/null +++ b/internal/check/2023-01-09-benchtest.txt @@ -0,0 +1,7 @@ +goos: linux +goarch: amd64 +pkg: github.com/ory/keto/internal/check +cpu: 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz +BenchmarkComputedUsersets/Computed_userset-8 2155 583306 ns/op 9.000 queries/op 109370 B/op 1556 allocs/op +PASS +ok github.com/ory/keto/internal/check 1.351s diff --git a/internal/check/bench_test.go b/internal/check/bench_test.go index 23b962bfa..351fd9d4a 100644 --- a/internal/check/bench_test.go +++ b/internal/check/bench_test.go @@ -5,15 +5,20 @@ package check_test import ( "context" + _ "embed" "fmt" + "strings" "testing" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/sdk/trace" + "go.opentelemetry.io/otel/sdk/trace/tracetest" "github.com/ory/keto/internal/check" "github.com/ory/keto/internal/check/checkgroup" + "github.com/ory/keto/internal/driver" "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/namespace/ast" @@ -96,7 +101,6 @@ func BenchmarkCheckEngine(b *testing.B) { require.NoError(b, reg.Config(ctx).Set(config.KeyLimitMaxReadDepth, 100*maxDepth)) e := check.NewEngine(reg) - b.ResetTimer() b.Run("case=deep tree", func(b *testing.B) { for _, depth := range depths { b.Run(fmt.Sprintf("depth=%03d", depth), func(b *testing.B) { @@ -127,3 +131,53 @@ func BenchmarkCheckEngine(b *testing.B) { } }) } + +//go:embed testfixtures/project_opl.ts +var ProjectOPLConfig string + +func BenchmarkComputedUsersets(b *testing.B) { + ctx := context.Background() + + spans := tracetest.NewSpanRecorder() + tracer := trace.NewTracerProvider(trace.WithSpanProcessor(spans)).Tracer("") + reg := driver.NewSqliteTestRegistry(b, false, + driver.WithLogLevel("debug"), + driver.WithOPL(ProjectOPLConfig), + driver.WithTracer(tracer), + driver.WithConfig(config.KeyNamespacesExperimentalStrictMode, true)) + reg.Logger().Logger.SetLevel(logrus.DebugLevel) + + insertFixtures(b, reg.RelationTupleManager(), []string{ + "Project:Ory#owner@User:Admin", + "Project:Ory#developer@User:Dev", + }) + + e := check.NewEngine(reg) + + query := tupleFromString(b, "Project:Ory#readProject@User:Dev") + + b.Run("Computed userset", func(b *testing.B) { + initialDBSpans := dbSpans(spans) + for i := 0; i < b.N; i++ { + res := e.CheckRelationTuple(ctx, query, 0) + assert.NoError(b, res.Err) + if res.Err != nil { + b.Errorf("got unexpected error: %v", res.Err) + } + if res.Membership != checkgroup.IsMember { + b.Error("check failed") + } + } + b.ReportMetric((float64(dbSpans(spans)-initialDBSpans))/float64(b.N), "queries/op") + }) + +} + +func dbSpans(spans *tracetest.SpanRecorder) (count int) { + for _, s := range spans.Started() { + if strings.HasPrefix(s.Name(), "sql-conn-query") { + count++ + } + } + return +} diff --git a/internal/check/engine.go b/internal/check/engine.go index b42145a88..20f23d257 100644 --- a/internal/check/engine.go +++ b/internal/check/engine.go @@ -5,17 +5,19 @@ package check import ( "context" - "fmt" "github.com/ory/herodot" + "github.com/ory/x/otelx" "github.com/pkg/errors" "github.com/ory/keto/internal/check/checkgroup" "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/namespace/ast" + "github.com/ory/keto/internal/persistence" "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" + "github.com/ory/keto/internal/x/events" "github.com/ory/keto/internal/x/graph" "github.com/ory/keto/ketoapi" ) @@ -29,8 +31,11 @@ type ( } EngineDependencies interface { relationtuple.ManagerProvider + persistence.Provider config.Provider x.LoggerProvider + x.TracingProvider + x.NetworkIDProvider } EngineOpt func(*Engine) @@ -65,7 +70,12 @@ func (e *Engine) CheckIsMember(ctx context.Context, r *relationTuple, restDepth // CheckRelationTuple checks if the relation tuple's subject has the relation on // the object in the namespace either directly or indirectly and returns a check // result. -func (e *Engine) CheckRelationTuple(ctx context.Context, r *relationTuple, restDepth int) checkgroup.Result { +func (e *Engine) CheckRelationTuple(ctx context.Context, r *relationTuple, restDepth int) (res checkgroup.Result) { + ctx, span := e.d.Tracer(ctx).Tracer().Start(ctx, "Engine.CheckRelationTuple") + defer otelx.End(span, &res.Err) + + events.Add(ctx, e.d, events.PermissionsChecked) + // global max-depth takes precedence when it is the lesser or if the request // max-depth is less than or equal to 0 if globalMaxDepth := e.d.Config(ctx).MaxReadDepth(); restDepth <= 0 || globalMaxDepth < restDepth { @@ -73,7 +83,7 @@ func (e *Engine) CheckRelationTuple(ctx context.Context, r *relationTuple, restD } resultCh := make(chan checkgroup.Result) - go e.checkIsAllowed(ctx, r, restDepth)(ctx, resultCh) + go e.checkIsAllowed(ctx, r, restDepth, false)(ctx, resultCh) select { case result := <-resultCh: return result @@ -85,10 +95,10 @@ func (e *Engine) CheckRelationTuple(ctx context.Context, r *relationTuple, restD // checkExpandSubject checks the expansions of the subject set of the tuple. // // For a relation tuple n:obj#rel@user, checkExpandSubject first queries for all -// subjects that match n:obj#rel@* (arbitrary subjects), and then for each -// subject set checks subject@user. +// tuples that match n:obj#rel@* (arbitrary subjects), and then for each +// subject set checks subject_set@user. func (e *Engine) checkExpandSubject(r *relationTuple, restDepth int) checkgroup.CheckFunc { - if restDepth < 0 { + if restDepth <= 0 { e.d.Logger(). WithField("request", r.String()). Debug("reached max-depth, therefore this query will not be further expanded") @@ -100,56 +110,45 @@ func (e *Engine) checkExpandSubject(r *relationTuple, restDepth int) checkgroup. Trace("check expand subject") g := checkgroup.New(ctx) + defer func() { resultCh <- g.Result() }() var ( - subjects []*relationTuple - pageToken string - err error - visited bool - innerCtx = graph.InitVisited(ctx) - query = &query{Namespace: &r.Namespace, Object: &r.Object, Relation: &r.Relation} + visited bool + innerCtx = graph.InitVisited(ctx) ) - for { - subjects, pageToken, err = e.d.RelationTupleManager().GetRelationTuples(innerCtx, query, x.WithToken(pageToken)) - if errors.Is(err, herodot.ErrNotFound) { - g.Add(checkgroup.NotMemberFunc) - break - } else if err != nil { - g.Add(checkgroup.ErrorFunc(err)) - break - } - for _, s := range subjects { - innerCtx, visited = graph.CheckAndAddVisited(innerCtx, s.Subject) - if visited { - continue - } - subjectSet, ok := s.Subject.(*relationtuple.SubjectSet) - if !ok || subjectSet.Relation == "" { - continue - } - g.Add(e.checkIsAllowed( - innerCtx, - &relationTuple{ - Namespace: subjectSet.Namespace, - Object: subjectSet.Object, - Relation: subjectSet.Relation, - Subject: r.Subject, - }, - restDepth-1, - )) - } - if pageToken == "" || g.Done() { - break + + results, err := e.d.Traverser().TraverseSubjectSetExpansion(ctx, r) + + if errors.Is(err, herodot.ErrNotFound) { + g.Add(checkgroup.NotMemberFunc) + return + } else if err != nil { + g.Add(checkgroup.ErrorFunc(err)) + return + } + + // See if the current hop was already enough to answer the check + for _, result := range results { + if result.Found { + g.Add(checkgroup.IsMemberFunc) + return } } - resultCh <- g.Result() + // If not, we must go another hop: + for _, result := range results { + innerCtx, visited = graph.CheckAndAddVisited(innerCtx, result.To.Subject) + if visited { + continue + } + g.Add(e.checkIsAllowed(innerCtx, result.To, restDepth, true)) + } } } // checkDirect checks if the relation tuple is in the database directly. func (e *Engine) checkDirect(r *relationTuple, restDepth int) checkgroup.CheckFunc { - if restDepth < 0 { + if restDepth <= 0 { e.d.Logger(). WithField("method", "checkDirect"). Debug("reached max-depth, therefore this query will not be further expanded") @@ -159,11 +158,22 @@ func (e *Engine) checkDirect(r *relationTuple, restDepth int) checkgroup.CheckFu e.d.Logger(). WithField("request", r.String()). Trace("check direct") - if rels, _, err := e.d.RelationTupleManager().GetRelationTuples( + found, err := e.d.RelationTupleManager().ExistsRelationTuples( ctx, r.ToQuery(), - x.WithSize(1), - ); err == nil && len(rels) > 0 { + ) + + switch { + case err != nil: + e.d.Logger(). + WithField("method", "checkDirect"). + WithError(err). + Error("failed to look up direct access in db") + resultCh <- checkgroup.Result{ + Membership: checkgroup.NotMember, + } + + case found: resultCh <- checkgroup.Result{ Membership: checkgroup.IsMember, Tree: &ketoapi.Tree[*relationtuple.RelationTuple]{ @@ -171,7 +181,8 @@ func (e *Engine) checkDirect(r *relationTuple, restDepth int) checkgroup.CheckFu Tuple: r, }, } - } else { + + default: resultCh <- checkgroup.Result{ Membership: checkgroup.NotMember, } @@ -183,8 +194,8 @@ func (e *Engine) checkDirect(r *relationTuple, restDepth int) checkgroup.CheckFu // the relation tuple subject to the namespace, object and relation) either // directly (in the database), or through subject-set expansions, or through // user-set rewrites. -func (e *Engine) checkIsAllowed(ctx context.Context, r *relationTuple, restDepth int) checkgroup.CheckFunc { - if restDepth < 0 { +func (e *Engine) checkIsAllowed(ctx context.Context, r *relationTuple, restDepth int, skipDirect bool) checkgroup.CheckFunc { + if restDepth <= 0 { e.d.Logger(). WithField("method", "checkIsAllowed"). Debug("reached max-depth, therefore this query will not be further expanded") @@ -196,55 +207,43 @@ func (e *Engine) checkIsAllowed(ctx context.Context, r *relationTuple, restDepth Trace("check is allowed") g := checkgroup.New(ctx) - g.Add(e.checkDirect(r, restDepth-1)) - g.Add(e.checkExpandSubject(r, restDepth)) relation, err := e.astRelationFor(ctx, r) if err != nil { g.Add(checkgroup.ErrorFunc(err)) - } else if relation != nil && relation.SubjectSetRewrite != nil { + return g.CheckFunc() + } + hasRewrite := relation != nil && relation.SubjectSetRewrite != nil + strictMode := e.d.Config(ctx).StrictMode() + canHaveSubjectSets := !strictMode || relation == nil || containsSubjectSetExpand(relation) + if hasRewrite { g.Add(e.checkSubjectSetRewrite(ctx, r, relation.SubjectSetRewrite, restDepth)) } - - return g.CheckFunc() -} - -func (e *Engine) astRelationFor(ctx context.Context, r *relationTuple) (*ast.Relation, error) { - // Special case: If the relationTuple's relation is empty, then it is not an - // error that the relation was not found. - if r.Relation == "" { - return nil, nil + if (!strictMode || !hasRewrite) && !skipDirect { + // In strict mode, add a direct check only if there is no subject set rewrite for this relation. + // Rewrites are added as 'permits'. + g.Add(e.checkDirect(r, restDepth-1)) } - - ns, err := e.namespaceFor(ctx, r) - if err != nil { - // On an unknown namespace the answer should be "not allowed", not "not - // found". Therefore we don't return the error here. - return nil, nil + if canHaveSubjectSets { + g.Add(e.checkExpandSubject(r, restDepth-1)) } - // Special case: If Relations is empty, then there is no namespace - // configuration, and it is not an error that the relation was not found. - if len(ns.Relations) == 0 { - return nil, nil - } + return g.CheckFunc() +} - for _, rel := range ns.Relations { - if rel.Name == r.Relation { - return &rel, nil +func containsSubjectSetExpand(relation *ast.Relation) bool { + for _, t := range relation.Types { + if t.Relation != "" { + return true } } - return nil, fmt.Errorf("relation %q not found", r.Relation) + return false } -func (e *Engine) namespaceFor(ctx context.Context, r *relationTuple) (*namespace.Namespace, error) { +func (e *Engine) astRelationFor(ctx context.Context, r *relationTuple) (*ast.Relation, error) { namespaceManager, err := e.d.Config(ctx).NamespaceManager() if err != nil { return nil, err } - ns, err := namespaceManager.GetNamespaceByName(ctx, r.Namespace) - if err != nil { - return nil, err - } - return ns, nil + return namespace.ASTRelationFor(ctx, namespaceManager, r.Namespace, r.Relation) } diff --git a/internal/check/engine_test.go b/internal/check/engine_test.go index 4d31da900..8169149fc 100644 --- a/internal/check/engine_test.go +++ b/internal/check/engine_test.go @@ -15,19 +15,22 @@ import ( "github.com/ory/keto/internal/driver" "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/namespace" + "github.com/ory/keto/internal/persistence" "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" "github.com/ory/keto/ketoapi" ) type configProvider = config.Provider -type loggerProvider = x.LoggerProvider -// deps is defined to capture engine dependencies in a single struct +// deps are defined to capture engine dependencies in a single struct type deps struct { *relationtuple.ManagerWrapper // managerProvider + persistence.Provider configProvider - loggerProvider + x.LoggerProvider + x.TracingProvider + x.NetworkIDProvider } func newDepsProvider(t testing.TB, namespaces []*namespace.Namespace, pageOpts ...x.PaginationOptionSetter) *deps { @@ -36,9 +39,12 @@ func newDepsProvider(t testing.TB, namespaces []*namespace.Namespace, pageOpts . mr := relationtuple.NewManagerWrapper(t, reg, pageOpts...) return &deps{ - ManagerWrapper: mr, - configProvider: reg, - loggerProvider: reg, + ManagerWrapper: mr, + Provider: reg, + configProvider: reg, + LoggerProvider: reg, + TracingProvider: reg, + NetworkIDProvider: reg, } } @@ -107,7 +113,7 @@ func TestEngine(t *testing.T) { // global max-depth takes precedence and max-depth=2 is not enough require.NoError(t, reg.Config(ctx).Set(config.KeyLimitMaxReadDepth, 2)) - res, err = e.CheckIsMember(ctx, userHasAccess, 3) + res, err = e.CheckIsMember(ctx, userHasAccess, 2) require.NoError(t, err) assert.False(t, res) @@ -284,67 +290,26 @@ func TestEngine(t *testing.T) { }) t.Run("indirect inclusion level 2", func(t *testing.T) { - object := uuid.Must(uuid.NewV4()) - someNamespace := "some_namespaces" - user := relationtuple.SubjectID{ID: uuid.Must(uuid.NewV4())} - organization := uuid.Must(uuid.NewV4()) - orgNamespace := "organizations" - - ownerUserSet := relationtuple.SubjectSet{ - Namespace: someNamespace, - Relation: "owner", - Object: object, - } - orgMembers := relationtuple.SubjectSet{ - Namespace: orgNamespace, - Relation: "member", - Object: organization, - } - - writeRel := relationtuple.RelationTuple{ - Namespace: someNamespace, - Relation: "write", - Object: object, - Subject: &ownerUserSet, - } - orgOwnerRel := relationtuple.RelationTuple{ - Namespace: someNamespace, - Relation: ownerUserSet.Relation, - Object: object, - Subject: &orgMembers, - } - userMembershipRel := relationtuple.RelationTuple{ - Namespace: orgNamespace, - Relation: orgMembers.Relation, - Object: organization, - Subject: &user, - } - reg := newDepsProvider(t, []*namespace.Namespace{ - {Name: someNamespace}, - {Name: orgNamespace}, + {Name: "obj"}, + {Name: "org"}, + }) + // require.NoError(t, reg.RelationTupleManager().WriteRelationTuples(ctx, &writeRel, &orgOwnerRel, &userMembershipRel)) + insertFixtures(t, reg.RelationTupleManager(), []string{ + "obj:object#write@obj:object#owner", + "obj:object#owner@org:organization#member", + "org:organization#member@user", }) - require.NoError(t, reg.RelationTupleManager().WriteRelationTuples(ctx, &writeRel, &orgOwnerRel, &userMembershipRel)) e := check.NewEngine(reg) // user can write object - res, err := e.CheckIsMember(ctx, &relationtuple.RelationTuple{ - Namespace: someNamespace, - Relation: writeRel.Relation, - Object: object, - Subject: &user, - }, 0) + res, err := e.CheckIsMember(ctx, tupleFromString(t, "obj:object#write@user"), 0) require.NoError(t, err) assert.True(t, res) // user is member of the organization - res, err = e.CheckIsMember(ctx, &relationtuple.RelationTuple{ - Namespace: orgNamespace, - Relation: orgMembers.Relation, - Object: organization, - Subject: &user, - }, 0) + res, err = e.CheckIsMember(ctx, tupleFromString(t, "org:organization#member@user"), 0) require.NoError(t, err) assert.True(t, res) }) @@ -536,4 +501,34 @@ func TestEngine(t *testing.T) { require.NoError(t, err) assert.False(t, res) }) + + t.Run("case=strict mode", func(t *testing.T) { + reg := driver.NewSqliteTestRegistry(t, false, + driver.WithOPL(ProjectOPLConfig), + driver.WithConfig(config.KeyNamespacesExperimentalStrictMode, true)) + + insertFixtures(t, reg.RelationTupleManager(), []string{ + "Project:abc#owner@User:1", + "Project:abc#owner@User1", + // The following tuples are ignored in strict mode + "Project:abc#isOwner@User:isOwner", + "Project:abc#readProject@readProjectUser", + "Project:abc#readProject@User:ReadProject", + }) + + e := check.NewEngine(reg) + + for _, sub := range []string{"readProjectUser", "User:ReadProject", "User:isOwner"} { + // These checks should return false, even though the exact tuple is in the db. + res, err := e.CheckIsMember(ctx, tupleFromString(t, "Project:abc#readProject@"+sub), 10) + require.NoError(t, err) + assert.False(t, res) + } + + for _, sub := range []string{"User:1", "User1"} { + res, err := e.CheckIsMember(ctx, tupleFromString(t, "Project:abc#readProject@"+sub), 10) + require.NoError(t, err) + assert.True(t, res) + } + }) } diff --git a/internal/check/handler.go b/internal/check/handler.go index eeddf0499..86f778b34 100644 --- a/internal/check/handler.go +++ b/internal/check/handler.go @@ -120,6 +120,7 @@ func (h *Handler) getCheckNoStatus(w http.ResponseWriter, r *http.Request, _ htt // Check Permission Or Error Request Parameters // // swagger:parameters checkPermissionOrError +// nolint:deadcode,unused type checkPermissionOrError struct { // in: query MaxDepth int `json:"max-depth"` @@ -170,7 +171,7 @@ func (h *Handler) getCheck(ctx context.Context, q url.Values) (bool, error) { return false, err } - it, err := h.d.Mapper().FromTuple(ctx, tuple) + it, err := h.d.ReadOnlyMapper().FromTuple(ctx, tuple) // herodot.ErrNotFound occurs when the namespace is unknown if errors.Is(err, herodot.ErrNotFound) { return false, nil @@ -184,6 +185,7 @@ func (h *Handler) getCheck(ctx context.Context, q url.Values) (bool, error) { // Check Permission using Post Request Parameters // // swagger:parameters postCheckPermission +// nolint:deadcode,unused type postCheckPermission struct { // in: query MaxDepth int `json:"max-depth"` @@ -195,6 +197,7 @@ type postCheckPermission struct { // Check Permission using Post Request Body // // swagger:model postCheckPermissionBody +// nolint:deadcode,unused type postCheckPermissionBody struct { ketoapi.RelationQuery } @@ -229,7 +232,9 @@ func (h *Handler) postCheckNoStatus(w http.ResponseWriter, r *http.Request, _ ht // Post Check Permission Or Error Request Parameters // // swagger:parameters postCheckPermissionOrError +// nolint:deadcode,unused type postCheckPermissionOrError struct { + // nolint:deadcode,unused // in: query MaxDepth int `json:"max-depth"` @@ -240,6 +245,7 @@ type postCheckPermissionOrError struct { // Post Check Permission Or Error Body // // swagger:model postCheckPermissionOrErrorBody +// nolint:deadcode,unused type postCheckPermissionOrErrorBody struct { ketoapi.RelationQuery } @@ -288,7 +294,7 @@ func (h *Handler) postCheck(ctx context.Context, body io.Reader, query url.Value if err := json.NewDecoder(body).Decode(&tuple); err != nil { return false, errors.WithStack(herodot.ErrBadRequest.WithErrorf("could not unmarshal json: %s", err.Error())) } - t, err := h.d.Mapper().FromTuple(ctx, &tuple) + t, err := h.d.ReadOnlyMapper().FromTuple(ctx, &tuple) // herodot.ErrNotFound occurs when the namespace is unknown if errors.Is(err, herodot.ErrNotFound) { return false, nil @@ -312,7 +318,7 @@ func (h *Handler) Check(ctx context.Context, req *rts.CheckRequest) (*rts.CheckR return nil, err } - internalTuple, err := h.d.Mapper().FromTuple(ctx, tuple) + internalTuple, err := h.d.ReadOnlyMapper().FromTuple(ctx, tuple) if err != nil { return nil, err } diff --git a/internal/check/performance_test.go b/internal/check/performance_test.go deleted file mode 100644 index 2bb37da16..000000000 --- a/internal/check/performance_test.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright © 2023 Ory Corp -// SPDX-License-Identifier: Apache-2.0 - -package check_test - -//import ( -// "context" -// "fmt" -// "strconv" -// "testing" -// -// "github.com/stretchr/testify/assert" -// "github.com/stretchr/testify/require" -// -// "github.com/ory/keto/internal/driver" -// "github.com/ory/keto/internal/e2e" -// "github.com/ory/keto/internal/expand" -// "github.com/ory/keto/internal/namespace" -// "github.com/ory/keto/internal/relationtuple" -//) -// -//const ( -// defaultNamespace = "default" -// indirectRelation = "indirect" -// root = "root" -// -// tuplesPerLevel = 10 -//) -// -//func createDataset(b testing.TB, reg driver.Registry, depth int, parent string) (created int) { -// newTuples := make([]*relationtuple.InternalRelationTuple, tuplesPerLevel) -// -// for p := 0; p < tuplesPerLevel; p++ { -// me := parent + " " + strconv.Itoa(p) -// newTuples[p] = &relationtuple.InternalRelationTuple{ -// Namespace: defaultNamespace, -// Object: parent, -// Relation: indirectRelation, -// Subject: &relationtuple.SubjectSet{ -// Namespace: defaultNamespace, -// Object: me, -// Relation: indirectRelation, -// }, -// } -// -// if depth >= 1 { -// created += createDataset(b, reg, depth-1, me) -// } -// } -// -// require.NoError(b, reg.Persister().WriteRelationTuples(context.Background(), newTuples...)) -// return created + tuplesPerLevel -//} -// -//type noErrButResult struct { -// res bool -// cid int -// o string -//} -// -//func (e *noErrButResult) Error() string { -// return "why did you call me, wtf?" -//} -// -//func XBenchmarkCheckEngine(b *testing.B) { -// for _, dsn := range e2e.GetDSNs(b) { -// func(dsn *e2e.DsnT) { -// nspaces := []*namespace.Namespace{{Name: defaultNamespace, ID: 1}} -// ctx, reg := e2e.NewInitializedReg(b, dsn, nspaces) -// -// b.ResetTimer() -// -// clientC := make([]chan int, 100) -// clientErrs := make(chan error, 100) -// for ci := range clientC { -// clientC[ci] = make(chan int) -// -// go func(ci int) { -// for d := range clientC[ci] { -// o := root -// for i := 0; i < d; i++ { -// o += " " + strconv.Itoa(ci%tuplesPerLevel) -// } -// -// res, err := reg.PermissionEngine().SubjectIsAllowed(ctx, &relationtuple.InternalRelationTuple{ -// Namespace: defaultNamespace, -// Object: root, -// Relation: indirectRelation, -// Subject: &relationtuple.SubjectSet{ -// Namespace: defaultNamespace, -// Object: o, -// Relation: indirectRelation, -// }, -// }) -// if err == nil { -// err = &noErrButResult{res: res, cid: ci, o: o} -// } -// clientErrs <- err -// } -// }(ci) -// } -// -// defer func() { -// for _, c := range clientC { -// close(c) -// } -// }() -// -// for depth := 2; depth <= 4; depth += 1 { -// b.StopTimer() -// -// b.Logf("created %d tuples", createDataset(b, reg, depth, root)) -// -// b.StartTimer() -// -// for clients := 1; clients <= 5; clients++ { -// b.Run(fmt.Sprintf("dsn=%s depth=%d clients=%d", dsn.Name, depth, clients), func(b *testing.B) { -// for i := 0; i < b.N; i++ { -// for ci := 0; ci < clients; ci++ { -// clientC[ci] <- depth -// } -// -// for ci := 0; ci < clients; ci++ { -// err := <-clientErrs -// if res, ok := err.(*noErrButResult); ok { -// require.True(b, res.res) -// continue -// } -// -// b.Logf("got err %+v", err) -// b.FailNow() -// } -// } -// }) -// } -// } -// }(dsn) -// } -//} -// -//func XTestCreateDataset(t *testing.T) { -// for _, dsn := range e2e.GetDSNs(t) { -// nspaces := []*namespace.Namespace{{Name: defaultNamespace, ID: 0}} -// -// ctx, reg := e2e.NewInitializedReg(t, dsn, nspaces) -// createDataset(t, reg, 4, "root") -// -// tree, err := reg.ExpandEngine().BuildTree(ctx, &relationtuple.SubjectSet{ -// Namespace: defaultNamespace, -// Object: root, -// Relation: indirectRelation, -// }, 5) -// require.NoError(t, err) -// -// for d := 0; d < 4; d++ { -// assert.Equal(t, expand.Union, tree.Type) -// assert.Len(t, tree.Children, tuplesPerLevel) -// tree = tree.Children[0] -// } -// } -//} diff --git a/internal/check/rewrites.go b/internal/check/rewrites.go index d70dd4c85..9b2008af5 100644 --- a/internal/check/rewrites.go +++ b/internal/check/rewrites.go @@ -36,7 +36,7 @@ func (e *Engine) checkSubjectSetRewrite( rewrite *ast.SubjectSetRewrite, restDepth int, ) checkgroup.CheckFunc { - if restDepth < 0 { + if restDepth <= 0 { e.d.Logger().Debug("reached max-depth, therefore this query will not be further expanded") return checkgroup.UnknownMemberFunc } @@ -46,8 +46,9 @@ func (e *Engine) checkSubjectSetRewrite( Trace("check subject-set rewrite") var ( - op binaryOperator - checks []checkgroup.CheckFunc + op binaryOperator + checks []checkgroup.CheckFunc + handled = make(map[int]struct{}) ) switch rewrite.Operation { case ast.OperatorOr: @@ -58,7 +59,44 @@ func (e *Engine) checkSubjectSetRewrite( return checkNotImplemented } - for _, child := range rewrite.Children { + // Shortcut for ORs of ComputedSubjectSets + if rewrite.Operation == ast.OperatorOr { + var computedSubjectSets []string + for i, child := range rewrite.Children { + switch c := child.(type) { + case *ast.ComputedSubjectSet: + handled[i] = struct{}{} + computedSubjectSets = append(computedSubjectSets, c.Relation) + } + } + if len(computedSubjectSets) > 0 { + checks = append(checks, func(ctx context.Context, resultCh chan<- checkgroup.Result) { + res, err := e.d.Traverser().TraverseSubjectSetRewrite(ctx, tuple, computedSubjectSets) + if err != nil { + resultCh <- checkgroup.Result{Err: errors.WithStack(err)} + return + } + g := checkgroup.New(ctx) + defer func() { resultCh <- g.Result() }() + for _, result := range res { + if result.Found { + g.SetIsMember() + return + } + } + // If not, we must go another hop: + for _, result := range res { + g.Add(e.checkIsAllowed(ctx, result.To, restDepth-1, true)) + } + }) + } + } + + for i, child := range rewrite.Children { + if _, found := handled[i]; found { + continue + } + switch c := child.(type) { case *ast.TupleToSubjectSet: @@ -77,7 +115,7 @@ func (e *Engine) checkSubjectSetRewrite( checks = append(checks, checkgroup.WithEdge(checkgroup.Edge{ Tuple: *tuple, Type: toTreeNodeType(c.Operation), - }, e.checkSubjectSetRewrite(ctx, tuple, c, restDepth))) + }, e.checkSubjectSetRewrite(ctx, tuple, c, restDepth-1))) case *ast.InvertResult: checks = append(checks, checkgroup.WithEdge(checkgroup.Edge{ @@ -183,16 +221,12 @@ func (e *Engine) checkComputedSubjectSet( WithField("computed subjectSet relation", subjectSet.Relation). Trace("check computed subjectSet") - return e.checkIsAllowed( - ctx, - &relationTuple{ - Namespace: r.Namespace, - Object: r.Object, - Relation: subjectSet.Relation, - Subject: r.Subject, - }, - restDepth, - ) + return e.checkIsAllowed(ctx, &relationTuple{ + Namespace: r.Namespace, + Object: r.Object, + Relation: subjectSet.Relation, + Subject: r.Subject, + }, restDepth, false) } // checkTupleToSubjectSet rewrites the relation tuple to use the subject-set relation. @@ -244,16 +278,12 @@ func (e *Engine) checkTupleToSubjectSet( for _, t := range tuples { if subSet, ok := t.Subject.(*relationtuple.SubjectSet); ok { - g.Add(e.checkIsAllowed( - ctx, - &relationTuple{ - Namespace: subSet.Namespace, - Object: subSet.Object, - Relation: subjectSet.ComputedSubjectSetRelation, - Subject: tuple.Subject, - }, - restDepth-1, - )) + g.Add(e.checkIsAllowed(ctx, &relationTuple{ + Namespace: subSet.Namespace, + Object: subSet.Object, + Relation: subjectSet.ComputedSubjectSetRelation, + Subject: tuple.Subject, + }, restDepth-1, false)) } } diff --git a/internal/check/rewrites_test.go b/internal/check/rewrites_test.go index 48cab738b..ba629338c 100644 --- a/internal/check/rewrites_test.go +++ b/internal/check/rewrites_test.go @@ -234,7 +234,7 @@ func TestUsersetRewrites(t *testing.T) { res := e.CheckRelationTuple(ctx, rt, 100) require.NoError(t, res.Err) t.Logf("tree:\n%s", res.Tree) - assert.Equal(t, tc.expected.Membership, res.Membership) + assert.Equal(t, tc.expected.Membership.String(), res.Membership.String()) if len(tc.expectedPaths) > 0 { for _, path := range tc.expectedPaths { diff --git a/internal/check/testfixtures/project_opl.ts b/internal/check/testfixtures/project_opl.ts new file mode 100644 index 000000000..6a8d5465b --- /dev/null +++ b/internal/check/testfixtures/project_opl.ts @@ -0,0 +1,29 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + +import {Namespace, Context} from '@ory/keto-namespace-types' + +class User implements Namespace {} + +class Project implements Namespace { + related: { + owner: User[] + developer: User[] + } + + permits = { + isOwner: (ctx: Context) => this.related.owner.includes(ctx.subject), + isOwnerOrDeveloper: (ctx: Context) => + this.related.owner.includes(ctx.subject) || + this.related.developer.includes(ctx.subject), + writeCollaborator: (ctx: Context) => + this.permits.isOwner(ctx), + readCollaborator: (ctx: Context) => + this.permits.isOwnerOrDeveloper(ctx), + deleteProject: (ctx: Context) => this.permits.isOwner(ctx), + writeProject: (ctx: Context) => + this.permits.isOwnerOrDeveloper(ctx), + readProject: (ctx: Context) => + this.permits.isOwnerOrDeveloper(ctx), + } +} diff --git a/internal/check/testmain_test.go b/internal/check/testmain_test.go index a0065a88b..66f7774ee 100644 --- a/internal/check/testmain_test.go +++ b/internal/check/testmain_test.go @@ -16,5 +16,6 @@ func TestMain(m *testing.M) { goleak.IgnoreTopFunction("github.com/ory/keto/internal/check/checkgroup.worker"), goleak.IgnoreTopFunction("net/http.(*persistConn).readLoop"), goleak.IgnoreTopFunction("net/http.(*persistConn).writeLoop"), + goleak.IgnoreTopFunction("database/sql.(*DB).connectionOpener"), ) } diff --git a/internal/driver/config/provider.go b/internal/driver/config/provider.go index e7748c1db..3c82e829b 100644 --- a/internal/driver/config/provider.go +++ b/internal/driver/config/provider.go @@ -49,7 +49,8 @@ const ( KeyMetricsHost = "serve." + string(EndpointMetrics) + ".host" KeyMetricsPort = "serve." + string(EndpointMetrics) + ".port" - KeyNamespaces = "namespaces" + KeyNamespaces = "namespaces" + KeyNamespacesExperimentalStrictMode = KeyNamespaces + ".experimental_strict_mode" DSNMemory = "sqlite://file::memory:?_fk=true&cache=shared" ) @@ -166,8 +167,8 @@ func (k *Config) Set(key string, v any) error { func (k *Config) addressFor(endpoint EndpointType) string { return fmt.Sprintf( "%s:%d", - k.p.String("serve."+string(endpoint)+".host"), - k.p.Int("serve."+string(endpoint)+".port"), + k.p.StringF("serve."+string(endpoint)+".host", ""), + k.p.IntF("serve."+string(endpoint)+".port", 0), ) } @@ -247,6 +248,10 @@ func (k *Config) NamespaceManager() (namespace.Manager, error) { return k.nm, nil } +func (k *Config) StrictMode() bool { + return k.p.BoolF(KeyNamespacesExperimentalStrictMode, false) +} + type ( buildNamespaceFn func(context.Context, *Config) (namespace.Manager, error) diff --git a/internal/driver/config/provider_test.go b/internal/driver/config/provider_test.go index 302d39958..6b37a5435 100644 --- a/internal/driver/config/provider_test.go +++ b/internal/driver/config/provider_test.go @@ -105,6 +105,7 @@ namespaces: require.NoError(t, err) _, ok := nm.(*memoryNamespaceManager) assert.True(t, ok) + assert.False(t, p.StrictMode()) } } @@ -152,6 +153,7 @@ namespaces: file://%s`, require.NoError(t, err) _, ok := nm.(*NamespaceWatcher) assert.True(t, ok) + assert.False(t, p.StrictMode()) }) t.Run("case=uses passed configx provider", func(t *testing.T) { @@ -232,8 +234,33 @@ namespaces: names, relationNames := []string{namespaces[0].Name, namespaces[1].Name}, []string{namespaces[0].Relations[0].Name, namespaces[1].Relations[0].Name} + assert.False(t, p.StrictMode()) assert.ElementsMatch(t, names, []string{"User", "Group"}) assert.ElementsMatch(t, relationNames, []string{"manager", "members"}) }) } + + t.Run("case=strict_mode=true", func(t *testing.T) { + config := createFileF(t, ` +dsn: memory +namespaces: + location: file://%s + experimental_strict_mode: true`, oplConfigFile) + + _, p := setup(t, config) + assert.True(t, p.StrictMode()) + }) +} + +func TestProvider_DefaultReadAPIListenOn(t *testing.T) { + ctx := context.Background() + config, err := NewDefault( + ctx, + pflag.NewFlagSet("test", pflag.ContinueOnError), + logrusx.New("", ""), + configx.WithValue("dsn", "foo"), + ) + require.NoError(t, err) + + assert.Equal(t, ":4466", config.ReadAPIListenOn()) } diff --git a/internal/driver/daemon.go b/internal/driver/daemon.go index b9cc2b1f5..726252eeb 100644 --- a/internal/driver/daemon.go +++ b/internal/driver/daemon.go @@ -450,7 +450,7 @@ func (r *RegistryDefault) OPLSyntaxRouter(ctx context.Context) http.Handler { return handler } -func (r *RegistryDefault) grpcRecoveryHandler(_ context.Context, p interface{}) error { +func (r *RegistryDefault) grpcRecoveryHandler(p interface{}) error { r.Logger(). WithField("reason", p). WithField("stack_trace", string(debug.Stack())). @@ -460,16 +460,17 @@ func (r *RegistryDefault) grpcRecoveryHandler(_ context.Context, p interface{}) } func (r *RegistryDefault) unaryInterceptors(ctx context.Context) []grpc.UnaryServerInterceptor { - is := make([]grpc.UnaryServerInterceptor, len(r.defaultUnaryInterceptors)+1, len(r.defaultUnaryInterceptors)+5) - is[0] = grpcRecovery.UnaryServerInterceptor(grpcRecovery.WithRecoveryHandlerContext(r.grpcRecoveryHandler)) - copy(is[1:], r.defaultUnaryInterceptors) + is := []grpc.UnaryServerInterceptor{ + grpcRecovery.UnaryServerInterceptor(grpcRecovery.WithRecoveryHandler(r.grpcRecoveryHandler)), + } + if r.Tracer(ctx).IsLoaded() { + is = append(is, grpcOtel.UnaryServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider()))) + } + is = append(is, r.defaultUnaryInterceptors...) is = append(is, herodot.UnaryErrorUnwrapInterceptor, grpcLogrus.UnaryServerInterceptor(r.l.Entry), ) - if r.Tracer(ctx).IsLoaded() { - is = append(is, grpcOtel.UnaryServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider()))) - } if r.sqaService != nil { is = append(is, r.sqaService.UnaryInterceptor) } @@ -477,18 +478,17 @@ func (r *RegistryDefault) unaryInterceptors(ctx context.Context) []grpc.UnarySer } func (r *RegistryDefault) streamInterceptors(ctx context.Context) []grpc.StreamServerInterceptor { - is := make([]grpc.StreamServerInterceptor, len(r.defaultStreamInterceptors)+1, len(r.defaultStreamInterceptors)+5) - // The recovery interceptor must be the first one to recover panics in other interceptors as well. - is[0] = grpcRecovery.StreamServerInterceptor(grpcRecovery.WithRecoveryHandlerContext(r.grpcRecoveryHandler)) - - copy(is[1:], r.defaultStreamInterceptors) + is := []grpc.StreamServerInterceptor{ + grpcRecovery.StreamServerInterceptor(grpcRecovery.WithRecoveryHandler(r.grpcRecoveryHandler)), + } + if r.Tracer(ctx).IsLoaded() { + is = append(is, grpcOtel.StreamServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider()))) + } + is = append(is, r.defaultStreamInterceptors...) is = append(is, herodot.StreamErrorUnwrapInterceptor, grpcLogrus.StreamServerInterceptor(r.l.Entry), ) - if r.Tracer(ctx).IsLoaded() { - is = append(is, grpcOtel.StreamServerInterceptor(grpcOtel.WithTracerProvider(otel.GetTracerProvider()))) - } if r.sqaService != nil { is = append(is, r.sqaService.StreamInterceptor) } diff --git a/internal/driver/pop_connection.go b/internal/driver/pop_connection.go index 4d1aa4556..96716ef0d 100644 --- a/internal/driver/pop_connection.go +++ b/internal/driver/pop_connection.go @@ -16,24 +16,18 @@ import ( ) func (r *RegistryDefault) PopConnectionWithOpts(ctx context.Context, popOpts ...func(*pop.ConnectionDetails)) (*pop.Connection, error) { - tracer := r.Tracer(ctx) - - var opts []instrumentedsql.Opt - if tracer.IsLoaded() { - opts = []instrumentedsql.Opt{ - instrumentedsql.WithTracer(otelsql.NewTracer()), - instrumentedsql.WithOmitArgs(), - } - } pool, idlePool, connMaxLifetime, connMaxIdleTime, cleanedDSN := sqlcon.ParseConnectionOptions(r.Logger(), r.Config(ctx).DSN()) connDetails := &pop.ConnectionDetails{ - URL: sqlcon.FinalizeDSN(r.Logger(), cleanedDSN), - IdlePool: idlePool, - ConnMaxLifetime: connMaxLifetime, - ConnMaxIdleTime: connMaxIdleTime, - Pool: pool, - UseInstrumentedDriver: tracer != nil && tracer.IsLoaded(), - InstrumentedDriverOptions: opts, + URL: sqlcon.FinalizeDSN(r.Logger(), cleanedDSN), + IdlePool: idlePool, + ConnMaxLifetime: connMaxLifetime, + ConnMaxIdleTime: connMaxIdleTime, + Pool: pool, + UseInstrumentedDriver: true, + InstrumentedDriverOptions: []instrumentedsql.Opt{ + instrumentedsql.WithTracer(otelsql.NewTracer()), + instrumentedsql.WithIncludeArgs(), + }, } for _, o := range popOpts { o(connDetails) diff --git a/internal/driver/registry_default.go b/internal/driver/registry_default.go index e860aeddd..dde2f1144 100644 --- a/internal/driver/registry_default.go +++ b/internal/driver/registry_default.go @@ -9,6 +9,7 @@ import ( "sync" "github.com/gobuffalo/pop/v6" + "github.com/gofrs/uuid" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/ory/herodot" "github.com/ory/x/dbal" @@ -50,16 +51,18 @@ var ( type ( RegistryDefault struct { - p persistence.Persister - mb *popx.MigrationBox - l *logrusx.Logger - w herodot.Writer - ce *check.Engine - ee *expand.Engine - c *config.Config - conn *pop.Connection - ctxer ketoctx.Contextualizer - mapper *relationtuple.Mapper + p persistence.Persister + traverser relationtuple.Traverser + mb *popx.MigrationBox + l *logrusx.Logger + w herodot.Writer + ce *check.Engine + ee *expand.Engine + c *config.Config + conn *pop.Connection + ctxer ketoctx.Contextualizer + mapper *relationtuple.Mapper + readOnlyMapper *relationtuple.Mapper initialized sync.Once healthH *healthx.Handler @@ -67,6 +70,7 @@ type ( handlers []Handler sqaService *metricsx.Service tracer *otelx.Tracer + tracerWrapper ketoctx.TracerWrapper pmm *prometheus.MetricsManager metricsHandler *prometheus.Handler @@ -75,6 +79,7 @@ type ( defaultHttpMiddlewares []func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) grpcTransportCredentials credentials.TransportCredentials defaultMigrationOptions []popx.MigrationBoxOption + healthReadyCheckers healthx.ReadyCheckers } ReadHandler interface { RegisterReadRoutes(r *x.ReadRouter) @@ -104,6 +109,13 @@ func (r *RegistryDefault) Mapper() *relationtuple.Mapper { return r.mapper } +func (r *RegistryDefault) ReadOnlyMapper() *relationtuple.Mapper { + if r.readOnlyMapper == nil { + r.readOnlyMapper = &relationtuple.Mapper{D: r, ReadOnly: true} + } + return r.readOnlyMapper +} + func (r *RegistryDefault) Contextualizer() ketoctx.Contextualizer { return r.ctxer } @@ -117,7 +129,10 @@ func (r *RegistryDefault) Config(ctx context.Context) *config.Config { func (r *RegistryDefault) HealthHandler() *healthx.Handler { if r.healthH == nil { - r.healthH = healthx.NewHandler(r.Writer(), config.Version, healthx.ReadyCheckers{}) + if r.healthReadyCheckers == nil { + r.healthReadyCheckers = healthx.ReadyCheckers{} + } + r.healthH = healthx.NewHandler(r.Writer(), config.Version, r.healthReadyCheckers) } return r.healthH @@ -142,6 +157,12 @@ func (r *RegistryDefault) Tracer(ctx context.Context) *otelx.Tracer { if err != nil { r.Logger().WithError(err).Fatalf("Unable to initialize Tracer.") } + + // Wrap the tracer if required + if r.tracerWrapper != nil { + t = r.tracerWrapper(t) + } + r.tracer = t } @@ -197,6 +218,20 @@ func (r *RegistryDefault) Persister() persistence.Persister { return r.p } +func (r *RegistryDefault) NetworkID(ctx context.Context) uuid.UUID { + if r.p == nil { + panic("no persister, but expected to have one") + } + return r.p.NetworkID(ctx) +} + +func (r *RegistryDefault) Traverser() relationtuple.Traverser { + if r.traverser == nil { + panic("no traverser, but expected to have one") + } + return r.traverser +} + func (r *RegistryDefault) PermissionEngine() *check.Engine { if r.ce == nil { r.ce = check.NewEngine(r) @@ -304,10 +339,12 @@ func (r *RegistryDefault) Init(ctx context.Context) (err error) { return err } - r.p, err = sql.NewPersister(ctx, r, network.ID) + p, err := sql.NewPersister(ctx, r, network.ID) if err != nil { return err } + r.p = p + r.traverser = sql.NewTraverser(p) return nil }() diff --git a/internal/driver/registry_factory.go b/internal/driver/registry_factory.go index a0781f565..ebf947932 100644 --- a/internal/driver/registry_factory.go +++ b/internal/driver/registry_factory.go @@ -10,29 +10,50 @@ import ( "crypto/rand" "crypto/tls" "fmt" + "os" "sync" "testing" "github.com/ory/x/configx" + "github.com/ory/x/logrusx" + "github.com/ory/x/otelx" "github.com/ory/x/tlsx" + "github.com/pkg/errors" + "github.com/sirupsen/logrus" + "github.com/spf13/pflag" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/otel/trace" "google.golang.org/grpc" "google.golang.org/grpc/credentials" - "github.com/ory/keto/ketoctx" - + "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/x/dbx" + "github.com/ory/keto/ketoctx" +) - "github.com/sirupsen/logrus" +// createFile writes the content to a temporary file, returning the path. +// Good for testing config files. +func createFile(t testing.TB, content string) (path string) { + t.Helper() - "github.com/pkg/errors" + f, err := os.CreateTemp(t.TempDir(), "config-*.yaml") + if err != nil { + t.Fatal(err) + } - "github.com/ory/x/logrusx" - "github.com/spf13/pflag" - "github.com/stretchr/testify/require" + t.Cleanup(func() { _ = os.Remove(f.Name()) }) - "github.com/ory/keto/internal/driver/config" -) + n, err := f.WriteString(content) + if err != nil { + t.Fatal(err) + } + if n != len(content) { + t.Fatal("failed to write the complete content") + } + + return f.Name() +} func NewDefaultRegistry(ctx context.Context, flags *pflag.FlagSet, withoutNetwork bool, opts []ketoctx.Option) (Registry, error) { reg, ok := ctx.Value(RegistryContextKey).(Registry) @@ -57,11 +78,13 @@ func NewDefaultRegistry(ctx context.Context, flags *pflag.FlagSet, withoutNetwor r := &RegistryDefault{ c: c, l: l, + tracerWrapper: options.TracerWrapper, ctxer: options.Contextualizer(), defaultUnaryInterceptors: options.GRPCUnaryInterceptors(), defaultStreamInterceptors: options.GRPCStreamInterceptors(), defaultHttpMiddlewares: options.HTTPMiddlewares(), defaultMigrationOptions: options.MigrationOptions(), + healthReadyCheckers: options.ReadyCheckers(), } init := r.Init @@ -83,24 +106,56 @@ func NewSqliteTestRegistry(t testing.TB, debugOnDisk bool, opts ...TestRegistryO return NewTestRegistry(t, dbx.GetSqlite(t, mode), opts...) } +func NewCRDBTestRegistry(t testing.TB) *RegistryDefault { + var buf [20]byte + _, _ = rand.Read(buf[:]) + testdb := fmt.Sprintf("testdb_%x", buf) + return NewTestRegistry(t, &dbx.DsnT{ + Name: "cockroach", + Conn: dbx.RunCockroach(t, testdb), + MigrateUp: true, + MigrateDown: true, + }) +} + type TestRegistryOption func(t testing.TB, r *RegistryDefault) +func WithConfig(key string, value any) TestRegistryOption { + return func(t testing.TB, r *RegistryDefault) { + require.NoError(t, r.c.Set(key, value)) + } +} func WithNamespaces(namespaces []*namespace.Namespace) TestRegistryOption { return func(t testing.TB, r *RegistryDefault) { require.NoError(t, r.c.Set(config.KeyNamespaces, namespaces)) } } +func WithOPL(opl string) TestRegistryOption { + return func(t testing.TB, r *RegistryDefault) { + f := createFile(t, opl) + require.NoError(t, r.c.Set(config.KeyNamespaces+".location", "file://"+f)) + } +} func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) TestRegistryOption { return func(_ testing.TB, r *RegistryDefault) { r.defaultUnaryInterceptors = i } } - func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) TestRegistryOption { return func(_ testing.TB, r *RegistryDefault) { r.defaultStreamInterceptors = i } } +func WithTracer(tracer trace.Tracer) TestRegistryOption { + return func(_ testing.TB, r *RegistryDefault) { + r.tracer = new(otelx.Tracer).WithOTLP(tracer) + } +} +func WithLogLevel(level string) TestRegistryOption { + return func(t testing.TB, r *RegistryDefault) { + require.NoError(t, r.c.Set("log.level", level)) + } +} type selfSignedCert struct { once sync.Once @@ -144,7 +199,7 @@ func NewTestRegistry(t testing.TB, dsn *dbx.DsnT, opts ...TestRegistryOption) *R ctx = configx.ContextWithConfigOptions(ctx, configx.WithValues(map[string]interface{}{ config.KeyDSN: dsn.Conn, - "log.level": "debug", + "log.level": "info", config.KeyNamespaces: []*namespace.Namespace{}, })) c, err := config.NewDefault(ctx, nil, l) diff --git a/internal/expand/engine.go b/internal/expand/engine.go index 16eb95606..3fe3d323c 100644 --- a/internal/expand/engine.go +++ b/internal/expand/engine.go @@ -6,13 +6,14 @@ package expand import ( "context" - "github.com/ory/keto/ketoapi" + "github.com/ory/x/otelx" "github.com/ory/keto/internal/driver/config" + "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" + "github.com/ory/keto/internal/x/events" "github.com/ory/keto/internal/x/graph" - - "github.com/ory/keto/internal/relationtuple" + "github.com/ory/keto/ketoapi" ) type ( @@ -20,6 +21,8 @@ type ( relationtuple.ManagerProvider config.Provider x.LoggerProvider + x.TracingProvider + x.NetworkIDProvider } Engine struct { d EngineDependencies @@ -35,7 +38,16 @@ func NewEngine(d EngineDependencies) *Engine { } } -func (e *Engine) BuildTree(ctx context.Context, subject relationtuple.Subject, restDepth int) (*relationtuple.Tree, error) { +func (e *Engine) BuildTree(ctx context.Context, subject relationtuple.Subject, restDepth int) (t *relationtuple.Tree, err error) { + ctx, span := e.d.Tracer(ctx).Tracer().Start(ctx, "Engine.BuildTree") + defer otelx.End(span, &err) + events.Add(ctx, e.d, events.PermissionsExpanded) + + t, err = e.buildTreeRecursive(ctx, subject, restDepth) + return +} + +func (e *Engine) buildTreeRecursive(ctx context.Context, subject relationtuple.Subject, restDepth int) (*relationtuple.Tree, error) { // global max-depth takes precedence when it is the lesser or if the request max-depth is less than or equal to 0 if globalMaxDepth := e.d.Config(ctx).MaxReadDepth(); restDepth <= 0 || globalMaxDepth < restDepth { restDepth = globalMaxDepth @@ -89,7 +101,7 @@ func (e *Engine) BuildTree(ctx context.Context, subject relationtuple.Subject, r children := make([]*relationtuple.Tree, len(rels)) for ri, r := range rels { - child, err := e.BuildTree(ctx, r.Subject, restDepth-1) + child, err := e.buildTreeRecursive(ctx, r.Subject, restDepth-1) if err != nil { return nil, err } diff --git a/internal/expand/engine_test.go b/internal/expand/engine_test.go index 8679fd717..5d960fc40 100644 --- a/internal/expand/engine_test.go +++ b/internal/expand/engine_test.go @@ -27,14 +27,18 @@ import ( "github.com/ory/keto/internal/driver" ) -type configProvider = config.Provider -type loggerProvider = x.LoggerProvider +type ( + configProvider = config.Provider + loggerProvider = x.LoggerProvider +) // deps is defined to capture engine dependencies in a single struct type deps struct { *relationtuple.ManagerWrapper // managerProvider configProvider loggerProvider + x.TracingProvider + x.NetworkIDProvider } func newTestEngine(t *testing.T, namespaces []*namespace.Namespace, paginationOpts ...x.PaginationOptionSetter) (*relationtuple.ManagerWrapper, *expand.Engine) { @@ -42,9 +46,11 @@ func newTestEngine(t *testing.T, namespaces []*namespace.Namespace, paginationOp require.NoError(t, innerReg.Config(context.Background()).Set(config.KeyNamespaces, namespaces)) reg := relationtuple.NewManagerWrapper(t, innerReg, paginationOpts...) e := expand.NewEngine(&deps{ - ManagerWrapper: reg, - configProvider: innerReg, - loggerProvider: innerReg, + ManagerWrapper: reg, + configProvider: innerReg, + loggerProvider: innerReg, + TracingProvider: innerReg, + NetworkIDProvider: innerReg, }) return reg, e } diff --git a/internal/expand/handler.go b/internal/expand/handler.go index 2de981e13..5104be8dd 100644 --- a/internal/expand/handler.go +++ b/internal/expand/handler.go @@ -96,7 +96,7 @@ func (h *handler) getExpand(w http.ResponseWriter, r *http.Request, _ httprouter } subSet := (&ketoapi.SubjectSet{}).FromURLQuery(r.URL.Query()) - internal, err := h.d.Mapper().FromSubjectSet(r.Context(), subSet) + internal, err := h.d.ReadOnlyMapper().FromSubjectSet(r.Context(), subSet) if err != nil { h.d.Writer().WriteError(w, r, err) return @@ -112,7 +112,7 @@ func (h *handler) getExpand(w http.ResponseWriter, r *http.Request, _ httprouter return } - tree, err := h.d.Mapper().ToTree(r.Context(), res) + tree, err := h.d.ReadOnlyMapper().ToTree(r.Context(), res) if err != nil { h.d.Writer().WriteError(w, r, err) return @@ -140,7 +140,7 @@ func (h *handler) Expand(ctx context.Context, req *rts.ExpandRequest) (*rts.Expa } } - internal, err := h.d.Mapper().FromSubjectSet(ctx, subSet) + internal, err := h.d.ReadOnlyMapper().FromSubjectSet(ctx, subSet) if err != nil { return nil, err } @@ -152,7 +152,7 @@ func (h *handler) Expand(ctx context.Context, req *rts.ExpandRequest) (*rts.Expa return &rts.ExpandResponse{}, nil } - tree, err := h.d.Mapper().ToTree(ctx, res) + tree, err := h.d.ReadOnlyMapper().ToTree(ctx, res) if err != nil { return nil, err } diff --git a/internal/namespace/definitions.go b/internal/namespace/definitions.go index 25e2073b6..386610ea6 100644 --- a/internal/namespace/definitions.go +++ b/internal/namespace/definitions.go @@ -6,6 +6,7 @@ package namespace import ( "context" "encoding/json" + "fmt" "github.com/ory/keto/internal/namespace/ast" ) @@ -31,3 +32,30 @@ type ( NamespaceManager() (Manager, error) } ) + +func ASTRelationFor(ctx context.Context, m Manager, namespace, relation string) (*ast.Relation, error) { + // Special case: If the relationTuple's relation is empty, then it is not an + // error that the relation was not found. + if relation == "" { + return nil, nil + } + ns, err := m.GetNamespaceByName(ctx, namespace) + if err != nil { + // On an unknown namespace the answer should be "not allowed", not "not + // found". Therefore, we don't return the error here. + return nil, nil + } + + // Special case: If Relations is empty, then there is no namespace + // configuration, and it is not an error that the relation was not found. + if len(ns.Relations) == 0 { + return nil, nil + } + + for _, rel := range ns.Relations { + if rel.Name == relation { + return &rel, nil + } + } + return nil, fmt.Errorf("relation %q not found", relation) +} diff --git a/internal/persistence/definitions.go b/internal/persistence/definitions.go index 58118129d..631d93b60 100644 --- a/internal/persistence/definitions.go +++ b/internal/persistence/definitions.go @@ -7,6 +7,7 @@ import ( "context" "errors" + "github.com/gofrs/uuid" "github.com/ory/x/popx" "github.com/gobuffalo/pop/v6" @@ -20,6 +21,7 @@ type ( relationtuple.MappingManager Connection(ctx context.Context) *pop.Connection + NetworkID(ctx context.Context) uuid.UUID } Migrator interface { MigrationBox(ctx context.Context) (*popx.MigrationBox, error) @@ -28,6 +30,7 @@ type ( } Provider interface { Persister() Persister + Traverser() relationtuple.Traverser } ) diff --git a/internal/persistence/sql/persister.go b/internal/persistence/sql/persister.go index b28a164f6..dc0e7aceb 100644 --- a/internal/persistence/sql/persister.go +++ b/internal/persistence/sql/persister.go @@ -10,9 +10,11 @@ import ( "github.com/gobuffalo/pop/v6" "github.com/gofrs/uuid" + "github.com/ory/x/otelx" "github.com/ory/x/popx" "github.com/pkg/errors" + "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/persistence" "github.com/ory/keto/internal/x" "github.com/ory/keto/ketoctx" @@ -32,6 +34,7 @@ type ( x.LoggerProvider x.TracingProvider ketoctx.ContextualizerProvider + config.Provider PopConnection(ctx context.Context) (*pop.Connection, error) } @@ -67,9 +70,9 @@ func (p *Persister) Connection(ctx context.Context) *pop.Connection { return popx.GetConnection(ctx, p.conn.WithContext(ctx)) } -func (p *Persister) CreateWithNetwork(ctx context.Context, v interface{}) error { - ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.CreateWithNetwork") - defer span.End() +func (p *Persister) createWithNetwork(ctx context.Context, v interface{}) (err error) { + ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.createWithNetwork") + defer otelx.End(span, &err) rv := reflect.ValueOf(v) @@ -85,11 +88,11 @@ func (p *Persister) CreateWithNetwork(ctx context.Context, v interface{}) error return p.Connection(ctx).Create(v) } -func (p *Persister) QueryWithNetwork(ctx context.Context) *pop.Query { +func (p *Persister) queryWithNetwork(ctx context.Context) *pop.Query { return p.Connection(ctx).Where("nid = ?", p.NetworkID(ctx)) } -func (p *Persister) Transaction(ctx context.Context, f func(ctx context.Context, c *pop.Connection) error) error { +func (p *Persister) transaction(ctx context.Context, f func(ctx context.Context, c *pop.Connection) error) error { return popx.Transaction(ctx, p.conn.WithContext(ctx), f) } diff --git a/internal/persistence/sql/relationtuples.go b/internal/persistence/sql/relationtuples.go index 7f1776221..f497eb298 100644 --- a/internal/persistence/sql/relationtuples.go +++ b/internal/persistence/sql/relationtuples.go @@ -12,6 +12,7 @@ import ( "github.com/gobuffalo/pop/v6" "github.com/gofrs/uuid" + "github.com/ory/x/otelx" "github.com/ory/x/sqlcon" "github.com/pkg/errors" @@ -40,11 +41,11 @@ func (relationTuples) TableName() string { return "keto_relation_tuples" } -func (RelationTuple) TableName() string { +func (*RelationTuple) TableName() string { return "keto_relation_tuples" } -func (r *RelationTuple) toInternal() (*relationtuple.RelationTuple, error) { +func (r *RelationTuple) ToInternal() (*relationtuple.RelationTuple, error) { if r == nil { return nil, nil } @@ -89,9 +90,9 @@ func (r *RelationTuple) insertSubject(_ context.Context, s relationtuple.Subject return nil } -func (r *RelationTuple) FromInternal(ctx context.Context, p *Persister, rt *relationtuple.RelationTuple) error { +func (r *RelationTuple) FromInternal(ctx context.Context, p *Persister, rt *relationtuple.RelationTuple) (err error) { ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.FromInternal") - defer span.End() + defer otelx.End(span, &err) r.Namespace = rt.Namespace r.Object = rt.Object @@ -100,9 +101,9 @@ func (r *RelationTuple) FromInternal(ctx context.Context, p *Persister, rt *rela return r.insertSubject(ctx, rt.Subject) } -func (p *Persister) InsertRelationTuple(ctx context.Context, rel *relationtuple.RelationTuple) error { +func (p *Persister) InsertRelationTuple(ctx context.Context, rel *relationtuple.RelationTuple) (err error) { ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.InsertRelationTuple") - defer span.End() + defer otelx.End(span, &err) if rel.Subject == nil { return errors.WithStack(ketoapi.ErrNilSubject) @@ -117,7 +118,7 @@ func (p *Persister) InsertRelationTuple(ctx context.Context, rel *relationtuple. } if err := sqlcon.HandleError( - p.CreateWithNetwork(ctx, rt), + p.createWithNetwork(ctx, rt), ); err != nil { return err } @@ -164,13 +165,13 @@ func (p *Persister) whereQuery(ctx context.Context, q *pop.Query, rq *relationtu return nil } -func (p *Persister) DeleteRelationTuples(ctx context.Context, rs ...*relationtuple.RelationTuple) error { +func (p *Persister) DeleteRelationTuples(ctx context.Context, rs ...*relationtuple.RelationTuple) (err error) { ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.DeleteRelationTuples") - defer span.End() + defer otelx.End(span, &err) - return p.Transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { + return p.transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { for _, r := range rs { - q := p.QueryWithNetwork(ctx). + q := p.queryWithNetwork(ctx). Where("namespace = ?", r.Namespace). Where("object = ?", r.Object). Where("relation = ?", r.Relation) @@ -187,12 +188,12 @@ func (p *Persister) DeleteRelationTuples(ctx context.Context, rs ...*relationtup }) } -func (p *Persister) DeleteAllRelationTuples(ctx context.Context, query *relationtuple.RelationQuery) error { +func (p *Persister) DeleteAllRelationTuples(ctx context.Context, query *relationtuple.RelationQuery) (err error) { ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.DeleteAllRelationTuples") - defer span.End() + defer otelx.End(span, &err) - return p.Transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { - sqlQuery := p.QueryWithNetwork(ctx) + return p.transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { + sqlQuery := p.queryWithNetwork(ctx) err := p.whereQuery(ctx, sqlQuery, query) if err != nil { return err @@ -203,16 +204,16 @@ func (p *Persister) DeleteAllRelationTuples(ctx context.Context, query *relation }) } -func (p *Persister) GetRelationTuples(ctx context.Context, query *relationtuple.RelationQuery, options ...x.PaginationOptionSetter) ([]*relationtuple.RelationTuple, string, error) { +func (p *Persister) GetRelationTuples(ctx context.Context, query *relationtuple.RelationQuery, options ...x.PaginationOptionSetter) (_ []*relationtuple.RelationTuple, nextPageToken string, err error) { ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.GetRelationTuples") - defer span.End() + defer otelx.End(span, &err) pagination, err := internalPaginationFromOptions(options...) if err != nil { return nil, "", err } - sqlQuery := p.QueryWithNetwork(ctx). + sqlQuery := p.queryWithNetwork(ctx). Order("shard_id, nid"). Where("shard_id > ?", pagination.LastID). Limit(pagination.PerPage + 1) @@ -229,7 +230,6 @@ func (p *Persister) GetRelationTuples(ctx context.Context, query *relationtuple. return make([]*relationtuple.RelationTuple, 0), "", nil } - var nextPageToken string if len(res) > pagination.PerPage { res = res[:len(res)-1] nextPageToken = pagination.encodeNextPageToken(res[len(res)-1].ID) @@ -237,7 +237,7 @@ func (p *Persister) GetRelationTuples(ctx context.Context, query *relationtuple. internalRes := make([]*relationtuple.RelationTuple, 0, len(res)) for _, r := range res { - if rt, err := r.toInternal(); err == nil { + if rt, err := r.ToInternal(); err == nil { // Ignore error here, which stems from a deleted namespace. internalRes = append(internalRes, rt) } @@ -246,11 +246,25 @@ func (p *Persister) GetRelationTuples(ctx context.Context, query *relationtuple. return internalRes, nextPageToken, nil } -func (p *Persister) WriteRelationTuples(ctx context.Context, rs ...*relationtuple.RelationTuple) error { +func (p *Persister) ExistsRelationTuples(ctx context.Context, query *relationtuple.RelationQuery) (_ bool, err error) { + ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.ExistsRelationTuples") + defer otelx.End(span, &err) + + sqlQuery := p.queryWithNetwork(ctx) + + err = p.whereQuery(ctx, sqlQuery, query) + if err != nil { + return false, err + } + exists, err := sqlQuery.Exists(&RelationTuple{}) + return exists, sqlcon.HandleError(err) +} + +func (p *Persister) WriteRelationTuples(ctx context.Context, rs ...*relationtuple.RelationTuple) (err error) { ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.WriteRelationTuples") - defer span.End() + defer otelx.End(span, &err) - return p.Transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { + return p.transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { for _, r := range rs { if err := p.InsertRelationTuple(ctx, r); err != nil { return err @@ -260,11 +274,11 @@ func (p *Persister) WriteRelationTuples(ctx context.Context, rs ...*relationtupl }) } -func (p *Persister) TransactRelationTuples(ctx context.Context, ins []*relationtuple.RelationTuple, del []*relationtuple.RelationTuple) error { +func (p *Persister) TransactRelationTuples(ctx context.Context, ins []*relationtuple.RelationTuple, del []*relationtuple.RelationTuple) (err error) { ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TransactRelationTuples") - defer span.End() + defer otelx.End(span, &err) - return p.Transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { + return p.transaction(ctx, func(ctx context.Context, _ *pop.Connection) error { if err := p.WriteRelationTuples(ctx, ins...); err != nil { return err } diff --git a/internal/persistence/sql/traverser.go b/internal/persistence/sql/traverser.go new file mode 100644 index 000000000..b0fb6c2c6 --- /dev/null +++ b/internal/persistence/sql/traverser.go @@ -0,0 +1,206 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + +package sql + +import ( + "context" + "fmt" + + "github.com/gobuffalo/pop/v6" + "github.com/gofrs/uuid" + "github.com/ory/x/otelx" + "github.com/ory/x/sqlcon" + "github.com/pkg/errors" + + "github.com/ory/keto/internal/namespace" + "github.com/ory/keto/internal/relationtuple" + "github.com/ory/keto/ketoapi" +) + +type ( + Traverser struct { + conn *pop.Connection + d dependencies + nid uuid.UUID + p *Persister + } + + subjectExpandedRelationTupleRow struct { + RelationTuple + + Found bool `db:"found"` + } + + rewriteRelationTupleRow struct { + RelationTuple + Traversal relationtuple.Traversal `db:"traversal"` + } +) + +func whereSubject(sub relationtuple.Subject) (sqlFragment string, args []any, err error) { + switch s := sub.(type) { + case *relationtuple.SubjectID: + sqlFragment = "subject_id = ? AND subject_set_namespace IS NULL AND subject_set_object IS NULL AND subject_set_relation IS NULL" + args = []any{s.ID} + + case *relationtuple.SubjectSet: + sqlFragment = "subject_id IS NULL AND subject_set_namespace = ? AND subject_set_object = ? AND subject_set_relation = ?" + args = []any{s.Namespace, s.Object, s.Relation} + + case nil: + return "", nil, errors.WithStack(ketoapi.ErrNilSubject) + } + return sqlFragment, args, nil +} + +// TraverseSubjectSetExpansion gets all subject sets for the object#relation. +// It also checks whether the requested subject is a member of each of the returned subject sets. +func (t *Traverser) TraverseSubjectSetExpansion(ctx context.Context, start *relationtuple.RelationTuple) (res []*relationtuple.TraversalResult, err error) { + ctx, span := t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetExpansion") + defer otelx.End(span, &err) + + targetSubjectSQL, targetSubjectArgs, err := whereSubject(start.Subject) + if err != nil { + return nil, err + } + + shardID := uuid.Nil + for { + var ( + rows []*subjectExpandedRelationTupleRow + limit = 1000 + ) + err = t.conn.WithContext(ctx).RawQuery(fmt.Sprintf(` +SELECT current.shard_id AS shard_id, + current.subject_set_namespace AS namespace, + current.subject_set_object AS object, + current.subject_set_relation AS relation, + EXISTS( + SELECT 1 FROM keto_relation_tuples + WHERE nid = current.nid AND + namespace = current.subject_set_namespace AND + object = current.subject_set_object AND + relation = current.subject_set_relation AND + %s -- subject where clause + ) AS found +FROM keto_relation_tuples AS current +WHERE current.nid = ? AND + current.shard_id > ? AND + current.namespace = ? AND + current.object = ? AND + current.relation = ? AND + current.subject_id IS NULL +ORDER BY current.nid, current.shard_id +LIMIT ? +`, targetSubjectSQL), + append(targetSubjectArgs, t.p.NetworkID(ctx), shardID, start.Namespace, start.Object, start.Relation, limit)..., + ).All(&rows) + if err != nil { + return nil, sqlcon.HandleError(err) + } + + for _, r := range rows { + to, err := r.RelationTuple.ToInternal() + if err != nil { + return nil, errors.WithStack(err) + } + to.Subject = start.Subject + res = append(res, &relationtuple.TraversalResult{ + From: start, + To: to, + Via: relationtuple.TraversalSubjectSetExpand, + Found: r.Found, + }) + if r.Found { + return res, nil + } + } + if len(rows) == limit { + shardID = rows[limit-1].ID + } else { + break + } + } + + return res, nil +} + +func (t *Traverser) TraverseSubjectSetRewrite(ctx context.Context, start *relationtuple.RelationTuple, computedSubjectSets []string) (res []*relationtuple.TraversalResult, err error) { + ctx, span := t.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.TraverseSubjectSetRewrite") + defer otelx.End(span, &err) + + namespaceManager, err := t.d.Config(ctx).NamespaceManager() + if err != nil { + return nil, err + } + + var relations []string + for _, relation := range computedSubjectSets { + astRel, _ := namespace.ASTRelationFor(ctx, namespaceManager, start.Namespace, relation) + // In strict mode, we can skip querying for those relations that have userset rewrites defined, + // because we can already apply those rewrites in memory. + if t.d.Config(ctx).StrictMode() && astRel != nil && astRel.SubjectSetRewrite != nil { + continue + } + relations = append(relations, relation) + } + + if len(relations) > 0 { + var rows relationTuples + + query := t.p.queryWithNetwork(ctx) + if err := t.p.whereQuery(ctx, query, &relationtuple.RelationQuery{ + Namespace: &start.Namespace, + Object: &start.Object, + Subject: start.Subject, + }); err != nil { + return nil, err + } + err = query.Where("relation IN (?)", relations).Limit(1).All(&rows) + if err != nil { + return nil, sqlcon.HandleError(err) + } + + // If we got any rows back, success! + if len(rows) > 0 { + r := rows[0] + to, err := r.ToInternal() + if err != nil { + return nil, errors.WithStack(err) + } + return []*relationtuple.TraversalResult{{ + From: start, + To: to, + Via: relationtuple.TraversalComputedUserset, + Found: true, + }}, nil + } + } + + // Otherwise, the next candidates are those tuples with relations from the rewrite + for _, relation := range computedSubjectSets { + res = append(res, &relationtuple.TraversalResult{ + From: start, + To: &relationtuple.RelationTuple{ + Namespace: start.Namespace, + Object: start.Object, + Relation: relation, + Subject: start.Subject, + }, + Via: relationtuple.TraversalComputedUserset, + Found: false, + }) + } + + return res, nil +} + +func NewTraverser(p *Persister) *Traverser { + return &Traverser{ + conn: p.conn, + d: p.d, + nid: p.nid, + p: p, + } +} diff --git a/internal/persistence/sql/uuid_mapping.go b/internal/persistence/sql/uuid_mapping.go index 0517b70e7..6c0218dd3 100644 --- a/internal/persistence/sql/uuid_mapping.go +++ b/internal/persistence/sql/uuid_mapping.go @@ -10,6 +10,7 @@ import ( "golang.org/x/exp/maps" "github.com/gofrs/uuid" + "github.com/ory/x/otelx" "github.com/ory/x/sqlcon" "github.com/ory/keto/internal/x" @@ -31,7 +32,7 @@ func (UUIDMapping) TableName() string { return "keto_uuid_mappings" } -func (p *Persister) batchToUUIDs(ctx context.Context, values []string) (uuids []uuid.UUID, err error) { +func (p *Persister) batchToUUIDs(ctx context.Context, values []string, readOnly bool) (uuids []uuid.UUID, err error) { if len(values) == 0 { return } @@ -48,24 +49,28 @@ func (p *Persister) batchToUUIDs(ctx context.Context, values []string) (uuids [] p.d.Logger().WithField("values", values).WithField("UUIDs", uuids).Trace("adding UUID mappings") - // We need to write manual SQL here because the INSERT should not fail if - // the UUID already exists, but we still want to return an error if anything - // else goes wrong. - var query string - switch d := p.Connection(ctx).Dialect.Name(); d { - case "mysql": - query = ` + if !readOnly { + // We need to write manual SQL here because the INSERT should not fail if + // the UUID already exists, but we still want to return an error if anything + // else goes wrong. + var query string + switch d := p.Connection(ctx).Dialect.Name(); d { + case "mysql": + query = ` INSERT IGNORE INTO keto_uuid_mappings (id, string_representation) VALUES ` + placeholders - default: - query = ` + default: + query = ` INSERT INTO keto_uuid_mappings (id, string_representation) VALUES ` + placeholders + ` ON CONFLICT (id) DO NOTHING` - } + } - return uuids, sqlcon.HandleError( - p.Connection(ctx).RawQuery(query, args...).Exec(), - ) + return uuids, sqlcon.HandleError( + p.Connection(ctx).RawQuery(query, args...).Exec(), + ) + } else { + return uuids, nil + } } func (p *Persister) batchFromUUIDs(ctx context.Context, ids []uuid.UUID, opts ...x.PaginationOptionSetter) (res []string, err error) { @@ -116,10 +121,23 @@ func (p *Persister) batchFromUUIDs(ctx context.Context, ids []uuid.UUID, opts .. return } -func (p *Persister) MapStringsToUUIDs(ctx context.Context, s ...string) ([]uuid.UUID, error) { - return p.batchToUUIDs(ctx, s) +func (p *Persister) MapStringsToUUIDs(ctx context.Context, s ...string) (_ []uuid.UUID, err error) { + ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.MapStringsToUUIDs") + defer otelx.End(span, &err) + + return p.batchToUUIDs(ctx, s, false) +} + +func (p *Persister) MapStringsToUUIDsReadOnly(ctx context.Context, s ...string) (_ []uuid.UUID, err error) { + ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.MapStringsToUUIDsReadOnly") + defer otelx.End(span, &err) + + return p.batchToUUIDs(ctx, s, true) } -func (p *Persister) MapUUIDsToStrings(ctx context.Context, u ...uuid.UUID) ([]string, error) { +func (p *Persister) MapUUIDsToStrings(ctx context.Context, u ...uuid.UUID) (_ []string, err error) { + ctx, span := p.d.Tracer(ctx).Tracer().Start(ctx, "persistence.sql.MapUUIDsToStrings") + defer otelx.End(span, &err) + return p.batchFromUUIDs(ctx, u) } diff --git a/internal/relationtuple/definitions.go b/internal/relationtuple/definitions.go index e499cc6d7..8f99ba34f 100644 --- a/internal/relationtuple/definitions.go +++ b/internal/relationtuple/definitions.go @@ -19,8 +19,13 @@ type ( ManagerProvider interface { RelationTupleManager() Manager } + Traverser interface { + TraverseSubjectSetExpansion(ctx context.Context, tuple *RelationTuple) ([]*TraversalResult, error) + TraverseSubjectSetRewrite(ctx context.Context, tuple *RelationTuple, computedSubjectSets []string) ([]*TraversalResult, error) + } Manager interface { GetRelationTuples(ctx context.Context, query *RelationQuery, options ...x.PaginationOptionSetter) ([]*RelationTuple, string, error) + ExistsRelationTuples(ctx context.Context, query *RelationQuery) (bool, error) WriteRelationTuples(ctx context.Context, rs ...*RelationTuple) error DeleteRelationTuples(ctx context.Context, rs ...*RelationTuple) error DeleteAllRelationTuples(ctx context.Context, query *RelationQuery) error @@ -65,6 +70,22 @@ type ( Subject Subject `json:"subject"` Children []*Tree `json:"children,omitempty"` } + + TraversalResult struct { + From *RelationTuple + To *RelationTuple + Via Traversal + Found bool + } + + Traversal string +) + +const ( + TraversalUnknown Traversal = "unknown" + TraversalSubjectSetExpand Traversal = "subject set expand" + TraversalComputedUserset Traversal = "computed userset" + TraversalTupleToUserset Traversal = "tuple to userset" ) var ( @@ -151,6 +172,10 @@ func (t *ManagerWrapper) GetRelationTuples(ctx context.Context, query *RelationQ return t.Reg.RelationTupleManager().GetRelationTuples(ctx, query, append(t.PageOpts, options...)...) } +func (t *ManagerWrapper) ExistsRelationTuples(ctx context.Context, query *RelationQuery) (bool, error) { + return t.Reg.RelationTupleManager().ExistsRelationTuples(ctx, query) +} + func (t *ManagerWrapper) WriteRelationTuples(ctx context.Context, rs ...*RelationTuple) error { return t.Reg.RelationTupleManager().WriteRelationTuples(ctx, rs...) } diff --git a/internal/relationtuple/handler.go b/internal/relationtuple/handler.go index 7bdff5bc5..a6c40b60b 100644 --- a/internal/relationtuple/handler.go +++ b/internal/relationtuple/handler.go @@ -9,9 +9,8 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "google.golang.org/grpc" - rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - "github.com/ory/keto/internal/x" + rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" ) type ( @@ -20,6 +19,8 @@ type ( MapperProvider x.LoggerProvider x.WriterProvider + x.TracingProvider + x.NetworkIDProvider } handler struct { d handlerDeps diff --git a/internal/relationtuple/read_server.go b/internal/relationtuple/read_server.go index 0979be1bd..9bded22b3 100644 --- a/internal/relationtuple/read_server.go +++ b/internal/relationtuple/read_server.go @@ -85,7 +85,7 @@ func (h *handler) ListRelationTuples(ctx context.Context, req *rts.ListRelationT q.FromDataProvider(&openAPIQueryWrapper{req}) } - iq, err := h.d.Mapper().FromQuery(ctx, &q) + iq, err := h.d.ReadOnlyMapper().FromQuery(ctx, &q) if err != nil { return nil, err } @@ -96,7 +96,7 @@ func (h *handler) ListRelationTuples(ctx context.Context, req *rts.ListRelationT if err != nil { return nil, err } - relations, err := h.d.Mapper().ToTuple(ctx, ir...) + relations, err := h.d.ReadOnlyMapper().ToTuple(ctx, ir...) if err != nil { return nil, err } @@ -160,7 +160,7 @@ func (h *handler) getRelations(w http.ResponseWriter, r *http.Request, _ httprou paginationOpts = append(paginationOpts, x.WithSize(int(s))) } - iq, err := h.d.Mapper().FromQuery(ctx, query) + iq, err := h.d.ReadOnlyMapper().FromQuery(ctx, query) if err != nil { h.d.Writer().WriteError(w, r, err) return @@ -171,7 +171,7 @@ func (h *handler) getRelations(w http.ResponseWriter, r *http.Request, _ httprou return } - relations, err := h.d.Mapper().ToTuple(ctx, ir...) + relations, err := h.d.ReadOnlyMapper().ToTuple(ctx, ir...) if err != nil { h.d.Writer().WriteError(w, r, err) return diff --git a/internal/relationtuple/transact_server.go b/internal/relationtuple/transact_server.go index eee89448c..03678be99 100644 --- a/internal/relationtuple/transact_server.go +++ b/internal/relationtuple/transact_server.go @@ -8,21 +8,19 @@ import ( "encoding/json" "net/http" + "github.com/julienschmidt/httprouter" + "github.com/ory/herodot" + "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + "github.com/ory/keto/internal/x/events" + "github.com/ory/keto/internal/x/validate" "github.com/ory/keto/ketoapi" - rts "github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2" - - "github.com/julienschmidt/httprouter" - "github.com/ory/herodot" - "github.com/pkg/errors" ) -var ( - _ rts.WriteServiceServer = (*handler)(nil) -) +var _ rts.WriteServiceServer = (*handler)(nil) func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.RelationTupleDelta_Action) (filtered []*ketoapi.RelationTuple, err error) { for _, d := range deltas { @@ -38,6 +36,8 @@ func protoTuplesWithAction(deltas []*rts.RelationTupleDelta, action rts.Relation } func (h *handler) TransactRelationTuples(ctx context.Context, req *rts.TransactRelationTuplesRequest) (*rts.TransactRelationTuplesResponse, error) { + events.Add(ctx, h.d, events.RelationtuplesChanged) + insertTuples, err := protoTuplesWithAction(req.RelationTupleDeltas, rts.RelationTupleDelta_ACTION_INSERT) if err != nil { return nil, err @@ -123,8 +123,17 @@ func (h *handler) CreateRelationTuple(ctx context.Context, request *rts.CreateRe } func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelationTuplesRequest) (*rts.DeleteRelationTuplesResponse, error) { + events.Add(ctx, h.d, events.RelationtuplesDeleted) + var q ketoapi.RelationQuery + if md, ok := metadata.FromIncomingContext(ctx); ok { + if hasBody := md["hasbody"]; len(hasBody) > 0 && hasBody[0] == "true" { + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "400")) + return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("body is not allowed for this request")) + } + } + switch { case req.RelationQuery != nil: q.FromDataProvider(&queryWrapper{req.RelationQuery}) @@ -134,7 +143,12 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat q.FromDataProvider(&openAPIQueryWrapper{req}) } - iq, err := h.d.Mapper().FromQuery(ctx, &q) + if q.Namespace == nil || *q.Namespace == "" { + _ = grpc.SetHeader(ctx, metadata.Pairs("x-http-code", "400")) + return nil, errors.WithStack(herodot.ErrBadRequest.WithReason("Namespace must be set")) + } + + iq, err := h.d.ReadOnlyMapper().FromQuery(ctx, &q) if err != nil { return nil, err } @@ -149,6 +163,7 @@ func (h *handler) DeleteRelationTuples(ctx context.Context, req *rts.DeleteRelat // Create Relationship Request Parameters // // swagger:parameters createRelationship +// nolint:deadcode,unused type createRelationship struct { // in: body Body createRelationshipBody @@ -157,6 +172,7 @@ type createRelationship struct { // Create Relationship Request Body // // swagger:model createRelationshipBody +// nolint:deadcode,unused type createRelationshipBody struct { ketoapi.RelationQuery } @@ -182,6 +198,8 @@ type createRelationshipBody struct { func (h *handler) createRelation(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { ctx := r.Context() + events.Add(ctx, h.d, events.RelationtuplesCreated) + var rt ketoapi.RelationTuple if err := json.NewDecoder(r.Body).Decode(&rt); err != nil { h.d.Writer().WriteError(w, r, errors.WithStack(herodot.ErrBadRequest.WithError(err.Error()))) @@ -234,6 +252,17 @@ func (h *handler) createRelation(w http.ResponseWriter, r *http.Request, _ httpr func (h *handler) deleteRelations(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { ctx := r.Context() + events.Add(ctx, h.d, events.RelationtuplesDeleted) + + if err := validate.All(r, + validate.NoExtraQueryParams(ketoapi.RelationQueryKeys...), + validate.QueryParamsContainsOneOf(ketoapi.NamespaceKey), + validate.HasEmptyBody(), + ); err != nil { + h.d.Writer().WriteError(w, r, err) + return + } + q := r.URL.Query() query, err := (&ketoapi.RelationQuery{}).FromURLQuery(q) if err != nil { @@ -247,7 +276,7 @@ func (h *handler) deleteRelations(w http.ResponseWriter, r *http.Request, _ http } l.Debug("deleting relationships") - iq, err := h.d.Mapper().FromQuery(ctx, query) + iq, err := h.d.ReadOnlyMapper().FromQuery(ctx, query) if err != nil { h.d.Logger().WithError(err).Errorf("could not map fields to UUIDs") h.d.Writer().WriteError(w, r, err) @@ -293,6 +322,8 @@ func internalTuplesWithAction(deltas []*ketoapi.PatchDelta, action ketoapi.Patch func (h *handler) patchRelationTuples(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { ctx := r.Context() + events.Add(ctx, h.d, events.RelationtuplesChanged) + var deltas []*ketoapi.PatchDelta if err := json.NewDecoder(r.Body).Decode(&deltas); err != nil { h.d.Writer().WriteError(w, r, herodot.ErrBadRequest.WithError(err.Error())) diff --git a/internal/relationtuple/transact_server_test.go b/internal/relationtuple/transact_server_test.go index 9f1a6652c..2b84bb88c 100644 --- a/internal/relationtuple/transact_server_test.go +++ b/internal/relationtuple/transact_server_test.go @@ -10,20 +10,19 @@ import ( "io" "net/http" "net/url" + "strings" "testing" "github.com/ory/x/pointerx" - - "github.com/ory/keto/internal/driver/config" - "github.com/ory/keto/ketoapi" - "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/ory/keto/internal/driver" + "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/internal/namespace" "github.com/ory/keto/internal/relationtuple" "github.com/ory/keto/internal/x" + "github.com/ory/keto/ketoapi" ) func TestWriteHandlers(t *testing.T) { @@ -212,6 +211,85 @@ func TestWriteHandlers(t *testing.T) { require.NoError(t, err) assert.Equal(t, []*relationtuple.RelationTuple{}, actualRTs) }) + + t.Run("suite=bad requests", func(t *testing.T) { + nspace := addNamespace(t) + + rts := []*ketoapi.RelationTuple{ + { + Namespace: nspace.Name, + Object: "deleted obj", + Relation: "deleted rel", + SubjectID: pointerx.Ptr("deleted subj 1"), + }, + { + Namespace: nspace.Name, + Object: "deleted obj", + Relation: "deleted rel", + SubjectID: pointerx.Ptr("deleted subj 2"), + }, + } + + relationtuple.MapAndWriteTuples(t, reg, rts...) + + assertBadRequest := func(t *testing.T, req *http.Request) { + resp, err := ts.Client().Do(req) + require.NoError(t, err) + assert.Equal(t, http.StatusBadRequest, resp.StatusCode) + } + + assertTuplesExist := func(t *testing.T) { + mappedQuery, err := reg.Mapper().FromQuery(ctx, &ketoapi.RelationQuery{ + Namespace: &nspace.Name, + }) + require.NoError(t, err) + + actualRTs, _, err := reg.RelationTupleManager().GetRelationTuples(ctx, mappedQuery, x.WithSize(10)) + require.NoError(t, err) + mappedRTs, err := reg.Mapper().ToTuple(ctx, actualRTs...) + require.NoError(t, err) + assert.ElementsMatch(t, rts, mappedRTs) + } + + t.Run("case=bad request if body sent", func(t *testing.T) { + q := url.Values{ + "namespace": {nspace.Name}, + "object": {"deleted obj"}, + "relation": {"deleted rel"}, + } + req, err := http.NewRequest( + http.MethodDelete, + ts.URL+relationtuple.WriteRouteBase+"?"+q.Encode(), + strings.NewReader("some body")) + require.NoError(t, err) + + assertBadRequest(t, req) + assertTuplesExist(t) + }) + + t.Run("case=bad request query param misspelled", func(t *testing.T) { + req, err := http.NewRequest( + http.MethodDelete, + ts.URL+relationtuple.WriteRouteBase+"?invalid=param", + nil) + require.NoError(t, err) + + assertBadRequest(t, req) + assertTuplesExist(t) + }) + + t.Run("case=bad request if query params misssing", func(t *testing.T) { + req, err := http.NewRequest( + http.MethodDelete, + ts.URL+relationtuple.WriteRouteBase, + nil) + require.NoError(t, err) + + assertBadRequest(t, req) + assertTuplesExist(t) + }) + }) + }) t.Run("method=patch", func(t *testing.T) { diff --git a/internal/relationtuple/uuid_mapping.go b/internal/relationtuple/uuid_mapping.go index ea826e17f..3f084775b 100644 --- a/internal/relationtuple/uuid_mapping.go +++ b/internal/relationtuple/uuid_mapping.go @@ -7,7 +7,9 @@ import ( "context" "testing" + "github.com/ory/x/otelx" "github.com/ory/x/pointerx" + "go.opentelemetry.io/otel/trace" "github.com/ory/keto/internal/driver/config" "github.com/ory/keto/ketoapi" @@ -27,13 +29,16 @@ type ( } MappingManager interface { MapStringsToUUIDs(ctx context.Context, s ...string) ([]uuid.UUID, error) + MapStringsToUUIDsReadOnly(ctx context.Context, s ...string) ([]uuid.UUID, error) MapUUIDsToStrings(ctx context.Context, u ...uuid.UUID) ([]string, error) } MapperProvider interface { Mapper() *Mapper + ReadOnlyMapper() *Mapper } Mapper struct { - D mapperDependencies + D mapperDependencies + ReadOnly bool } ) @@ -62,6 +67,9 @@ func (c *success) apply() { } func (m *Mapper) FromQuery(ctx context.Context, apiQuery *ketoapi.RelationQuery) (res *RelationQuery, err error) { + ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer("keto/internal/relationtuple").Start(ctx, "Mapper.FromQuery") + defer otelx.End(span, &err) + onSuccess := newSuccess(&err) defer onSuccess.apply() @@ -116,7 +124,11 @@ func (m *Mapper) FromQuery(ctx context.Context, apiQuery *ketoapi.RelationQuery) }(len(s) - 1)) } - u, err = m.D.MappingManager().MapStringsToUUIDs(ctx, s...) + if m.ReadOnly { + u, err = m.D.MappingManager().MapStringsToUUIDsReadOnly(ctx, s...) + } else { + u, err = m.D.MappingManager().MapStringsToUUIDs(ctx, s...) + } if err != nil { return nil, err } @@ -124,6 +136,9 @@ func (m *Mapper) FromQuery(ctx context.Context, apiQuery *ketoapi.RelationQuery) } func (m *Mapper) ToQuery(ctx context.Context, q *RelationQuery) (res *ketoapi.RelationQuery, err error) { + ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer("keto/internal/relationtuple").Start(ctx, "Mapper.ToQuery") + defer otelx.End(span, &err) + onSuccess := newSuccess(&err) defer onSuccess.apply() @@ -182,6 +197,9 @@ func (m *Mapper) ToQuery(ctx context.Context, q *RelationQuery) (res *ketoapi.Re } func (m *Mapper) FromTuple(ctx context.Context, ts ...*ketoapi.RelationTuple) (res []*RelationTuple, err error) { + ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer("keto/internal/relationtuple").Start(ctx, "Mapper.FromTuple") + defer otelx.End(span, &err) + onSuccess := newSuccess(&err) defer onSuccess.apply() @@ -237,7 +255,11 @@ func (m *Mapper) FromTuple(ctx context.Context, ts ...*ketoapi.RelationTuple) (r res = append(res, &mt) } - u, err = m.D.MappingManager().MapStringsToUUIDs(ctx, s...) + if m.ReadOnly { + u, err = m.D.MappingManager().MapStringsToUUIDsReadOnly(ctx, s...) + } else { + u, err = m.D.MappingManager().MapStringsToUUIDs(ctx, s...) + } if err != nil { return nil, err } @@ -245,6 +267,9 @@ func (m *Mapper) FromTuple(ctx context.Context, ts ...*ketoapi.RelationTuple) (r } func (m *Mapper) ToTuple(ctx context.Context, ts ...*RelationTuple) (res []*ketoapi.RelationTuple, err error) { + ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer("keto/internal/relationtuple").Start(ctx, "Mapper.ToTuple") + defer otelx.End(span, &err) + onSuccess := newSuccess(&err) defer onSuccess.apply() @@ -291,7 +316,10 @@ func (m *Mapper) ToTuple(ctx context.Context, ts ...*RelationTuple) (res []*keto return res, nil } -func (m *Mapper) FromSubjectSet(ctx context.Context, set *ketoapi.SubjectSet) (*SubjectSet, error) { +func (m *Mapper) FromSubjectSet(ctx context.Context, set *ketoapi.SubjectSet) (_ *SubjectSet, err error) { + ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer("keto/internal/relationtuple").Start(ctx, "Mapper.FromSubjectSet") + defer otelx.End(span, &err) + nm, err := m.D.Config(ctx).NamespaceManager() if err != nil { return nil, err @@ -300,7 +328,12 @@ func (m *Mapper) FromSubjectSet(ctx context.Context, set *ketoapi.SubjectSet) (* if err != nil { return nil, err } - u, err := m.D.MappingManager().MapStringsToUUIDs(ctx, set.Object) + var u []uuid.UUID + if m.ReadOnly { + u, err = m.D.MappingManager().MapStringsToUUIDsReadOnly(ctx, set.Object) + } else { + u, err = m.D.MappingManager().MapStringsToUUIDs(ctx, set.Object) + } if err != nil { return nil, err } @@ -312,6 +345,9 @@ func (m *Mapper) FromSubjectSet(ctx context.Context, set *ketoapi.SubjectSet) (* } func (m *Mapper) ToTree(ctx context.Context, tree *Tree) (res *ketoapi.Tree[*ketoapi.RelationTuple], err error) { + ctx, span := trace.SpanFromContext(ctx).TracerProvider().Tracer("keto/internal/relationtuple").Start(ctx, "Mapper.ToTree") + defer otelx.End(span, &err) + onSuccess := newSuccess(&err) defer onSuccess.apply() diff --git a/internal/relationtuple/uuid_mapping_test.go b/internal/relationtuple/uuid_mapping_test.go index f69dbfe45..e7d03d9c2 100644 --- a/internal/relationtuple/uuid_mapping_test.go +++ b/internal/relationtuple/uuid_mapping_test.go @@ -21,6 +21,11 @@ import ( "github.com/ory/keto/ketoapi" ) +func runWithMappers(t *testing.T, p relationtuple.MapperProvider, runner func(t *testing.T, m *relationtuple.Mapper)) { + t.Run("mapper=readwrite", func(t *testing.T) { runner(t, p.Mapper()) }) + t.Run("mapper=readonly", func(t *testing.T) { runner(t, p.ReadOnlyMapper()) }) +} + func TestMapper(t *testing.T) { ctx := context.Background() reg := driver.NewSqliteTestRegistry(t, false) @@ -90,18 +95,19 @@ func TestMapper(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - m := reg.Mapper() - mapped, err := m.FromTuple(ctx, tc.rts...) - require.ErrorIs(t, err, tc.err) - if tc.err != nil { - // the rest only makes sense if we have no error - return - } + runWithMappers(t, reg, func(t *testing.T, m *relationtuple.Mapper) { + mapped, err := m.FromTuple(ctx, tc.rts...) + require.ErrorIs(t, err, tc.err) + if tc.err != nil { + // the rest only makes sense if we have no error + return + } - assert.Len(t, mapped, len(tc.rts)) - actual, err := m.ToTuple(ctx, mapped...) - require.NoError(t, err) - assert.ElementsMatch(t, tc.rts, actual) + assert.Len(t, mapped, len(tc.rts)) + actual, err := m.ToTuple(ctx, mapped...) + require.NoError(t, err) + assert.ElementsMatch(t, tc.rts, actual) + }) }) } }) @@ -155,17 +161,18 @@ func TestMapper(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - m := reg.Mapper() - mapped, err := m.FromQuery(ctx, tc.query) - require.ErrorIs(t, err, tc.err) - if tc.err != nil { - // the rest only makes sense if we have no error - return - } + runWithMappers(t, reg, func(t *testing.T, m *relationtuple.Mapper) { + mapped, err := m.FromQuery(ctx, tc.query) + require.ErrorIs(t, err, tc.err) + if tc.err != nil { + // the rest only makes sense if we have no error + return + } - actual, err := m.ToQuery(ctx, mapped) - require.NoError(t, err) - assert.Equal(t, tc.query, actual) + actual, err := m.ToQuery(ctx, mapped) + require.NoError(t, err) + assert.Equal(t, tc.query, actual) + }) }) } }) @@ -195,15 +202,17 @@ func TestMapper(t *testing.T) { }, } { t.Run(tc.name, func(t *testing.T) { - mapped, err := reg.Mapper().FromSubjectSet(ctx, tc.set) - require.ErrorIs(t, err, tc.err) - if tc.err != nil { - // the rest only makes sense if we have no error - return - } - assert.NotZero(t, mapped.Object) - assert.Equal(t, nspace.Name, mapped.Namespace) - assert.Equal(t, tc.set.Relation, mapped.Relation) + runWithMappers(t, reg, func(t *testing.T, m *relationtuple.Mapper) { + mapped, err := reg.Mapper().FromSubjectSet(ctx, tc.set) + require.ErrorIs(t, err, tc.err) + if tc.err != nil { + // the rest only makes sense if we have no error + return + } + assert.NotZero(t, mapped.Object) + assert.Equal(t, nspace.Name, mapped.Namespace) + assert.Equal(t, tc.set.Relation, mapped.Relation) + }) }) } }) @@ -312,4 +321,55 @@ func TestMapper(t *testing.T) { }) } }) + + t.Run("suite=ro and rw mappers", func(t *testing.T) { + roMapper := reg.ReadOnlyMapper() + rwMapper := reg.Mapper() + + t.Run("case=ro manager does not insert into DB", func(t *testing.T) { + unmapped := &ketoapi.RelationQuery{Object: pointerx.Ptr("unmapped object")} + mapped, err := roMapper.FromQuery(ctx, unmapped) + require.NoError(t, err) + assert.NotNil(t, mapped.Object) + + reUnmapped, err := roMapper.ToQuery(ctx, mapped) + require.NoError(t, err) + assert.Empty(t, reUnmapped.Object) + }) + + t.Run("case=rw manager inserts into DB", func(t *testing.T) { + unmapped := &ketoapi.RelationQuery{Object: pointerx.Ptr("another unmapped object")} + mapped, err := rwMapper.FromQuery(ctx, unmapped) + require.NoError(t, err) + assert.NotNil(t, mapped.Object) + + reUnmapped, err := rwMapper.ToQuery(ctx, mapped) + require.NoError(t, err) + assert.NotEmpty(t, reUnmapped.Object) + }) + }) +} + +func BenchmarkReadOnlyMapper(b *testing.B) { + ctx := context.Background() + reg := driver.NewSqliteTestRegistry(b, false, + driver.WithNamespaces([]*namespace.Namespace{{Name: "test"}})) + m := reg.ReadOnlyMapper() + + b.Run("FromTuple", func(b *testing.B) { + for i := 0; i < b.N; i++ { + _, err := m.FromTuple(ctx, &ketoapi.RelationTuple{ + Namespace: "test", + Object: "object", + Relation: "relation", + SubjectSet: &ketoapi.SubjectSet{ + Namespace: "test", + Object: "subject object", + Relation: "relation", + }, + }) + assert.NoError(b, err) + } + + }) } diff --git a/internal/schema/itemtype_string.go b/internal/schema/itemtype_string.go index c2656ed19..c38fa384f 100644 --- a/internal/schema/itemtype_string.go +++ b/internal/schema/itemtype_string.go @@ -28,7 +28,7 @@ func _() { _ = x[itemOperatorDot-14] _ = x[itemOperatorColon-15] _ = x[itemOperatorComma-16] - _ = x[itemOperatorSemicolon-17] + _ = x[itemSemicolon-17] _ = x[itemTypeUnion-18] _ = x[itemParenLeft-19] _ = x[itemParenRight-20] diff --git a/internal/schema/lexer.go b/internal/schema/lexer.go index d5e2b7754..7a365d9a1 100644 --- a/internal/schema/lexer.go +++ b/internal/schema/lexer.go @@ -57,16 +57,18 @@ const ( itemKeywordCtx // operators - itemOperatorAnd // "&&" - itemOperatorOr // "||" - itemOperatorNot // "!" - itemOperatorAssign // "=" - itemOperatorArrow // "=>" - itemOperatorDot // "." - itemOperatorColon // ":" - itemOperatorComma // "," - itemOperatorSemicolon // ";" - itemTypeUnion // "|" + itemOperatorAnd // "&&" + itemOperatorOr // "||" + itemOperatorNot // "!" + itemOperatorAssign // "=" + itemOperatorArrow // "=>" + itemOperatorDot // "." + itemOperatorColon // ":" + itemOperatorComma // "," + + // misc characters + itemSemicolon // ";" + itemTypeUnion // "|" // brackets itemParenLeft // "(" @@ -228,7 +230,7 @@ var oneRuneTokens = map[rune]itemType{ '>': itemAngledRight, '=': itemOperatorAssign, ',': itemOperatorComma, - ';': itemOperatorSemicolon, + ';': itemSemicolon, '|': itemTypeUnion, '!': itemOperatorNot, } diff --git a/internal/schema/parser.go b/internal/schema/parser.go index 0db66aae3..06a74785e 100644 --- a/internal/schema/parser.go +++ b/internal/schema/parser.go @@ -180,7 +180,7 @@ func (p *parser) parseClass() { p.parseRelated() case item.Val == "permits": p.parsePermits() - case item.Typ == itemOperatorSemicolon: + case item.Typ == itemSemicolon: continue default: p.addFatal(item, "expected 'permits' or 'related', got %q", item.Val) @@ -194,6 +194,9 @@ func (p *parser) parseRelated() { for !p.fatal { switch item := p.next(); item.Typ { + case itemSemicolon: + continue + case itemBraceRight: return diff --git a/internal/schema/parser_test.go b/internal/schema/parser_test.go index 3ecee5c00..1ea6eceab 100644 --- a/internal/schema/parser_test.go +++ b/internal/schema/parser_test.go @@ -65,14 +65,14 @@ var parserTestCases = []struct { class User implements Namespace { related: { - manager: User[] + manager: User[]; } } class Group implements Namespace { related: { - members: (User | Group)[] - } + members: (User | Group)[]; + }; } class Folder implements Namespace { diff --git a/internal/swagger_types.go b/internal/swagger_types.go index e5d198744..9aea9a242 100644 --- a/internal/swagger_types.go +++ b/internal/swagger_types.go @@ -3,7 +3,7 @@ package internal -// Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201. +// Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 204. // // swagger:response emptyResponse // nolint:deadcode,unused diff --git a/internal/x/events/events.go b/internal/x/events/events.go new file mode 100644 index 000000000..a063d78c4 --- /dev/null +++ b/internal/x/events/events.go @@ -0,0 +1,35 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + +package events + +import ( + "context" + + "github.com/ory/x/otelx/semconv" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/trace" + + "github.com/ory/keto/internal/x" +) + +type Event string + +const ( + RelationtuplesCreated Event = "RelationtuplesCreated" + RelationtuplesDeleted Event = "RelationtuplesDeleted" + RelationtuplesChanged Event = "RelationtuplesChanged" + + PermissionsExpanded Event = "PermissionsExpanded" + PermissionsChecked Event = "PermissionsChecked" +) + +// Add adds an event to the current span in the context. +func Add(ctx context.Context, p x.NetworkIDProvider, event Event) { + trace.SpanFromContext(ctx).AddEvent( + string(event), + trace.WithAttributes( + attribute.String(semconv.AttrNID, p.NetworkID(ctx).String()), + ), + ) +} diff --git a/internal/x/registry.go b/internal/x/registry.go index 00bddd941..4a0215c84 100644 --- a/internal/x/registry.go +++ b/internal/x/registry.go @@ -6,6 +6,7 @@ package x import ( "context" + "github.com/gofrs/uuid" "github.com/ory/herodot" "github.com/ory/x/logrusx" "github.com/ory/x/otelx" @@ -22,3 +23,7 @@ type WriterProvider interface { type TracingProvider interface { Tracer(ctx context.Context) *otelx.Tracer } + +type NetworkIDProvider interface { + NetworkID(context.Context) uuid.UUID +} diff --git a/internal/x/test_endpoints.go b/internal/x/test_endpoints.go index e969aae59..28d44e205 100644 --- a/internal/x/test_endpoints.go +++ b/internal/x/test_endpoints.go @@ -16,6 +16,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/test/bufconn" "google.golang.org/protobuf/proto" ) @@ -101,10 +102,15 @@ func NewTestEndpoints( ) require.NoError(t, err) + // TODO: Sync with router setup in daemon.go mux := runtime.NewServeMux( runtime.WithForwardResponseOption(HttpResponseModifier), - runtime.WithErrorHandler(func(ctx context.Context, mux *runtime.ServeMux, marshaler runtime.Marshaler, writer http.ResponseWriter, request *http.Request, err error) { - runtime.DefaultHTTPErrorHandler(ctx, mux, marshaler, writer, request, err) + runtime.WithMetadata(func(ctx context.Context, req *http.Request) metadata.MD { + md := make(metadata.MD) + contentLength, _ := strconv.Atoi(req.Header.Get("Content-Length")) + md.Set("hasbody", strconv.FormatBool(contentLength > 0)) + + return md }), ) if h, ok := handler.(readHandler); ok { diff --git a/internal/x/validate/validate.go b/internal/x/validate/validate.go new file mode 100644 index 000000000..e29993ac1 --- /dev/null +++ b/internal/x/validate/validate.go @@ -0,0 +1,75 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + +package validate + +import ( + "fmt" + "io" + "net/http" + "strings" + + "github.com/ory/herodot" +) + +type Validator func(r *http.Request) (ok bool, reason string) + +// All runs all validators and returns an error if any of them fail. It returns +// a ErrBadRequest with all failed validation messages. +func All(r *http.Request, validator ...Validator) error { + var reasons []string + for _, v := range validator { + if ok, msg := v(r); !ok { + reasons = append(reasons, msg) + } + } + if len(reasons) > 0 { + return herodot.ErrBadRequest.WithReason(strings.Join(reasons, "; ")) + } + return nil +} + +// NoExtraQueryParams returns a validator that checks if the request has any +// query parameters that are not in the except list. +func NoExtraQueryParams(except ...string) Validator { + return func(req *http.Request) (ok bool, reason string) { + allowed := make(map[string]struct{}, len(except)) + for _, e := range except { + allowed[e] = struct{}{} + } + for key := range req.URL.Query() { + if _, found := allowed[key]; !found { + return false, fmt.Sprintf("query parameter key %q unknown", key) + } + } + return true, "" + } +} + +// QueryParamsContainsOneOf returns a validator that checks if the request has +// at least one of the specified query parameters. +func QueryParamsContainsOneOf(keys ...string) Validator { + return func(req *http.Request) (ok bool, reason string) { + oneOfKeys := make(map[string]struct{}, len(keys)) + for _, k := range keys { + oneOfKeys[k] = struct{}{} + } + for key := range req.URL.Query() { + if _, found := oneOfKeys[key]; found { + return true, "" + } + } + return false, fmt.Sprintf("quey parameters must specify at least one of the following: %s", strings.Join(keys, ", ")) + } +} + +// HasEmptyBody returns a validator that checks if the request body is empty. +func HasEmptyBody() Validator { + return func(r *http.Request) (ok bool, reason string) { + _, err := r.Body.Read([]byte{}) + if err != io.EOF { + return false, "body is not empty" + } + return true, "" + } +} diff --git a/internal/x/validate/validate_test.go b/internal/x/validate/validate_test.go new file mode 100644 index 000000000..50ff5d8f7 --- /dev/null +++ b/internal/x/validate/validate_test.go @@ -0,0 +1,116 @@ +// Copyright © 2023 Ory Corp +// SPDX-License-Identifier: Apache-2.0 + +package validate_test + +import ( + "io" + "net/http" + "net/url" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/ory/keto/internal/x/validate" +) + +func toURL(t *testing.T, s string) *url.URL { + u, err := url.Parse(s) + require.NoError(t, err) + return u +} + +func TestValidateNoExtraParams(t *testing.T) { + for _, tt := range []struct { + name string + req *http.Request + assertErr assert.ErrorAssertionFunc + }{ + { + name: "empty", + req: &http.Request{URL: toURL(t, "https://example.com")}, + assertErr: assert.NoError, + }, + { + name: "all params", + req: &http.Request{URL: toURL(t, "https://example.com?foo=1&bar=baz")}, + assertErr: assert.NoError, + }, + { + name: "extra params", + req: &http.Request{URL: toURL(t, "https://example.com?foo=1&bar=2&baz=3")}, + assertErr: assert.Error, + }, + } { + t.Run("case="+tt.name, func(t *testing.T) { + err := validate.All(tt.req, validate.NoExtraQueryParams("foo", "bar")) + tt.assertErr(t, err) + }) + } +} + +func TestQueryParamsContainsOneOf(t *testing.T) { + for _, tt := range []struct { + name string + req *http.Request + assertErr assert.ErrorAssertionFunc + }{ + { + name: "empty", + req: &http.Request{URL: toURL(t, "https://example.com")}, + assertErr: assert.Error, + }, + { + name: "other", + req: &http.Request{URL: toURL(t, "https://example.com?a=1&b=2&c=3")}, + assertErr: assert.Error, + }, + { + name: "one", + req: &http.Request{URL: toURL(t, "https://example.com?foo=1")}, + assertErr: assert.NoError, + }, + { + name: "all params", + req: &http.Request{URL: toURL(t, "https://example.com?foo=1&bar=baz")}, + assertErr: assert.NoError, + }, + { + name: "extra params", + req: &http.Request{URL: toURL(t, "https://example.com?foo=1&bar=2&baz=3")}, + assertErr: assert.NoError, + }, + } { + t.Run("case="+tt.name, func(t *testing.T) { + err := validate.All(tt.req, validate.QueryParamsContainsOneOf("foo", "bar")) + tt.assertErr(t, err) + }) + } +} + +func TestValidateHasEmptyBody(t *testing.T) { + for _, tt := range []struct { + name string + req *http.Request + assertErr assert.ErrorAssertionFunc + }{ + { + name: "empty body", + req: &http.Request{Body: io.NopCloser(strings.NewReader(""))}, + assertErr: assert.NoError, + }, + { + name: "non-empty body", + req: &http.Request{Body: io.NopCloser(strings.NewReader("content"))}, + assertErr: assert.Error, + }, + } { + t.Run("case="+tt.name, func(t *testing.T) { + err := validate.All(tt.req, validate.HasEmptyBody()) + tt.assertErr(t, err) + }) + } + +} diff --git a/ketoapi/enc_url_query.go b/ketoapi/enc_url_query.go index 0001c391a..98e397a24 100644 --- a/ketoapi/enc_url_query.go +++ b/ketoapi/enc_url_query.go @@ -40,14 +40,14 @@ func (q *RelationQuery) FromURLQuery(query url.Values) (*RelationQuery, error) { return nil, ErrIncompleteSubject } - if query.Has("namespace") { - q.Namespace = pointerx.Ptr(query.Get("namespace")) + if query.Has(NamespaceKey) { + q.Namespace = pointerx.Ptr(query.Get(NamespaceKey)) } - if query.Has("object") { - q.Object = pointerx.Ptr(query.Get("object")) + if query.Has(ObjectKey) { + q.Object = pointerx.Ptr(query.Get(ObjectKey)) } - if query.Has("relation") { - q.Relation = pointerx.Ptr(query.Get("relation")) + if query.Has(RelationKey) { + q.Relation = pointerx.Ptr(query.Get(RelationKey)) } return q, nil @@ -57,13 +57,13 @@ func (q *RelationQuery) ToURLQuery() url.Values { v := make(url.Values, 7) if q.Namespace != nil { - v.Add("namespace", *q.Namespace) + v.Add(NamespaceKey, *q.Namespace) } if q.Relation != nil { - v.Add("relation", *q.Relation) + v.Add(RelationKey, *q.Relation) } if q.Object != nil { - v.Add("object", *q.Object) + v.Add(ObjectKey, *q.Object) } if q.SubjectID != nil { v.Add(SubjectIDKey, *q.SubjectID) @@ -112,17 +112,17 @@ func (s *SubjectSet) FromURLQuery(values url.Values) *SubjectSet { s = &SubjectSet{} } - s.Namespace = values.Get("namespace") - s.Relation = values.Get("relation") - s.Object = values.Get("object") + s.Namespace = values.Get(NamespaceKey) + s.Relation = values.Get(RelationKey) + s.Object = values.Get(ObjectKey) return s } func (s *SubjectSet) ToURLQuery() url.Values { return url.Values{ - "namespace": []string{s.Namespace}, - "object": []string{s.Object}, - "relation": []string{s.Relation}, + NamespaceKey: []string{s.Namespace}, + ObjectKey: []string{s.Object}, + RelationKey: []string{s.Relation}, } } diff --git a/ketoapi/public_api_definitions.go b/ketoapi/public_api_definitions.go index 85636f8d2..1e96eac56 100644 --- a/ketoapi/public_api_definitions.go +++ b/ketoapi/public_api_definitions.go @@ -121,12 +121,26 @@ const ( ) const ( + NamespaceKey = "namespace" + ObjectKey = "object" + RelationKey = "relation" SubjectIDKey = "subject_id" SubjectSetNamespaceKey = "subject_set.namespace" SubjectSetObjectKey = "subject_set.object" SubjectSetRelationKey = "subject_set.relation" ) +var RelationQueryKeys = []string{ + NamespaceKey, + ObjectKey, + RelationKey, + SubjectIDKey, + SubjectSetNamespaceKey, + SubjectSetObjectKey, + SubjectSetRelationKey, + "subject", // We have a more specific error message for this key. +} + // Paginated Relationship List // // swagger:model relationships diff --git a/ketoctx/options.go b/ketoctx/options.go index 0eec52899..1e0d7c4e9 100644 --- a/ketoctx/options.go +++ b/ketoctx/options.go @@ -6,7 +6,9 @@ package ketoctx import ( "net/http" + "github.com/ory/x/healthx" "github.com/ory/x/logrusx" + "github.com/ory/x/otelx" "github.com/ory/x/popx" "google.golang.org/grpc" ) @@ -14,51 +16,77 @@ import ( type ( opts struct { logger *logrusx.Logger + TracerWrapper TracerWrapper contextualizer Contextualizer httpMiddlewares []func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) grpcUnaryInterceptors []grpc.UnaryServerInterceptor grpcStreamInterceptors []grpc.StreamServerInterceptor migrationOpts []popx.MigrationBoxOption + readyCheckers healthx.ReadyCheckers } - Option func(o *opts) + Option func(o *opts) + TracerWrapper func(*otelx.Tracer) *otelx.Tracer ) +// WithLogger sets the logger. func WithLogger(l *logrusx.Logger) Option { - return func(o *opts) { - o.logger = l - } + return func(o *opts) { o.logger = l } } +// WithTracerWrapper sets a function that wraps the tracer. +func WithTracerWrapper(wrapper TracerWrapper) Option { + return func(o *opts) { o.TracerWrapper = wrapper } +} + +// WithContextualizer sets the contextualizer. func WithContextualizer(ctxer Contextualizer) Option { return func(o *opts) { o.contextualizer = ctxer } } +// WithHTTPMiddlewares adds HTTP middlewares to the list of HTTP middlewares. func WithHTTPMiddlewares(m ...func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)) Option { return func(o *opts) { o.httpMiddlewares = m } } +// WithGRPCUnaryInterceptors adds gRPC unary interceptors to the list of gRPC +// interceptors. func WithGRPCUnaryInterceptors(i ...grpc.UnaryServerInterceptor) Option { return func(o *opts) { o.grpcUnaryInterceptors = i } } +// WithGRPCStreamInterceptors adds gRPC stream interceptors to the list of gRPC +// stream interceptors. func WithGRPCStreamInterceptors(i ...grpc.StreamServerInterceptor) Option { return func(o *opts) { o.grpcStreamInterceptors = i } } +// WithMigrationOptions adds migration options to the list of migration options. func WithMigrationOptions(o ...popx.MigrationBoxOption) Option { return func(opts *opts) { opts.migrationOpts = o } } +// WithReadinessCheck adds a new readness health checker to the list of +// checkers. Can be called multiple times. If the name is already taken, the +// checker will be overwritten. +func WithReadinessCheck(name string, rc healthx.ReadyChecker) Option { + return func(o *opts) { + if o.readyCheckers == nil { + o.readyCheckers = make(healthx.ReadyCheckers) + } + o.readyCheckers[name] = rc + } +} + func (o *opts) Logger() *logrusx.Logger { return o.logger } @@ -83,6 +111,10 @@ func (o *opts) MigrationOptions() []popx.MigrationBoxOption { return o.migrationOpts } +func (o *opts) ReadyCheckers() healthx.ReadyCheckers { + return o.readyCheckers +} + func Options(options ...Option) *opts { o := &opts{ contextualizer: &DefaultContextualizer{}, diff --git a/package-lock.json b/package-lock.json index f74d57b80..4f057b9fd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,18 +10,27 @@ "license": "Apache 2.0", "dependencies": { "@openapitools/openapi-generator-cli": "^2.1.18", - "grpc_tools_node_protoc_ts": "^5.3.2", - "grpc-tools": "^1.11.3" + "grpc_tools_node_protoc_ts": "^5.3.3", + "grpc-tools": "^1.12.4" }, "devDependencies": { + "@ory/keto-namespace-types": "file:contrib/namespace-type-lib", "doctoc": "^2.0.1", "license-checker": "^25.0.1", - "opencollective": "^1.0.3", "ory-prettier-styles": "^1.2.0", - "prettier": "2.7.1", + "prettier": "2.8.4", "prettier-plugin-packagejson": "^2.2.18" } }, + "contrib/namespace-type-lib": { + "name": "@ory/keto-namespace-types", + "version": "0.9.0-alpha.0", + "dev": true, + "devDependencies": { + "@ory/keto-namespace-types": "file:./", + "typescript": "^4.7.4" + } + }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.10.tgz", @@ -207,6 +216,10 @@ "url": "https://opencollective.com/openapi_generator" } }, + "node_modules/@ory/keto-namespace-types": { + "resolved": "contrib/namespace-type-lib", + "link": true + }, "node_modules/@textlint/ast-node-types": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-12.1.1.tgz", @@ -376,33 +389,6 @@ "follow-redirects": "^1.14.8" } }, - "node_modules/babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", - "integrity": "sha512-0l7mVU+LrQ2X/ZTUq63T5i3VyR2aTgcRTFmBcD6djQ/Fek6q1A9t5u0F4jZVYHzp78jwWAzGfLpAY1b4/I3lfg==", - "dev": true, - "dependencies": { - "babel-runtime": "^6.22.0", - "core-js": "^2.4.0", - "regenerator-runtime": "^0.10.0" - } - }, - "node_modules/babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "dependencies": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "node_modules/babel-runtime/node_modules/regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - }, "node_modules/bail": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", @@ -721,14 +707,6 @@ "node": "> 0.10" } }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true - }, "node_modules/date-fns": { "version": "2.28.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", @@ -926,7 +904,8 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, + "optional": true, + "peer": true, "dependencies": { "iconv-lite": "^0.6.2" } @@ -935,7 +914,8 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "optional": true, + "peer": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -1219,9 +1199,9 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "node_modules/grpc_tools_node_protoc_ts": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.2.tgz", - "integrity": "sha512-7xPSeu8bwjcird3i9R5+9O4BF2Lhv9fMBdeobfUc2Bys9tSVtm/VB3WjTpKV78WlLYJyD94+wL/8hJqaMZ53Hw==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.3.tgz", + "integrity": "sha512-M/YrklvVXMtuuj9kb42PxeouZhs7Ul+R4e/31XwrankUcKL8cQQP50Q9q+KEHGyHQaPt6VtKKsxMgLaKbCxeww==", "dependencies": { "google-protobuf": "3.15.8", "handlebars": "4.7.7" @@ -1231,9 +1211,9 @@ } }, "node_modules/grpc-tools": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.11.3.tgz", - "integrity": "sha512-cRSK2uhDKHtZ9hLRM35HxaMAMxyh/L7C96Ojt58DhQBdwTOQlV1VIJHSK6X/pDeSQKhaQqWMFfebt8tIcvRfjQ==", + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", + "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", "hasInstallScript": true, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.5" @@ -1275,27 +1255,6 @@ "node": ">= 0.4.0" } }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -1557,15 +1516,6 @@ "node": ">=8" } }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -2305,271 +2255,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/opencollective": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", - "integrity": "sha512-YBRI0Qa8+Ui0/STV1qYuPrJm889PT3oCPHMVoL+8Y3nwCffj7PSrB2NlGgrhgBKDujxTjxknHWJ/FiqOsYcIDw==", - "dev": true, - "dependencies": { - "babel-polyfill": "6.23.0", - "chalk": "1.1.3", - "inquirer": "3.0.6", - "minimist": "1.2.0", - "node-fetch": "1.6.3", - "opn": "4.0.2" - }, - "bin": { - "oc": "dist/bin/opencollective.js", - "opencollective": "dist/bin/opencollective.js" - } - }, - "node_modules/opencollective/node_modules/ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/opencollective/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/opencollective/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/opencollective/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/opencollective/node_modules/chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==", - "dev": true - }, - "node_modules/opencollective/node_modules/cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, - "dependencies": { - "restore-cursor": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, - "node_modules/opencollective/node_modules/external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "dependencies": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/opencollective/node_modules/figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/inquirer": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz", - "integrity": "sha512-thluxTGBXUGb8DuQcvH9/CM/CrcGyB5xUpWc9x6Slqcq1z/hRr2a6KxUpX4ddRfmbe0hg3E4jTvo5833aWz3BA==", - "dev": true, - "dependencies": { - "ansi-escapes": "^1.1.0", - "chalk": "^1.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.1", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx": "^4.1.0", - "string-width": "^2.0.0", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - } - }, - "node_modules/opencollective/node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha512-7Wl+Jz+IGWuSdgsQEJ4JunV0si/iMhg42MnQQG6h1R6TNeVenp4U9x5CC5v/gYqz/fENLQITAWXidNtVL0NNbw==", - "dev": true - }, - "node_modules/opencollective/node_modules/mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, - "node_modules/opencollective/node_modules/node-fetch": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", - "integrity": "sha512-BDxbhLHXFFFvilHjh9xihcDyPkXQ+kjblxnl82zAX41xUYSNvuRpFRznmldR9+OKu+p+ULZ7hNoyunlLB5ecUA==", - "dev": true, - "dependencies": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "node_modules/opencollective/node_modules/onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", - "dev": true, - "dependencies": { - "mimic-fn": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "dependencies": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/opencollective/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/opencollective/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha512-iPBWbPP4OEOzR1xfhpGLDh+ypKBOygunZhM9jBtA7FS5sKjEiMZw0EFb82hnDOmTZX90ZWLoZKUza4cVt8MexA==", - "dev": true, - "dependencies": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -2683,31 +2368,10 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true, "bin": { "prettier": "bin-prettier.js" @@ -2819,12 +2483,6 @@ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" }, - "node_modules/regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==", - "dev": true - }, "node_modules/remark-footnotes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", @@ -2981,12 +2639,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rx": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha512-CiaiuN6gapkdl+cZUr67W6I8jquN4lkak3vtIsIWCl4XIPP8ffsoyN6/+PuGXnQy8Cu8W2y9Xxh31Rq4M6wUug==", - "dev": true - }, "node_modules/rxjs": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", @@ -3320,6 +2972,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/uglify-js": { "version": "3.16.1", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.1.tgz", @@ -3685,6 +3350,13 @@ "tslib": "2.0.3" } }, + "@ory/keto-namespace-types": { + "version": "file:contrib/namespace-type-lib", + "requires": { + "@ory/keto-namespace-types": "file:", + "typescript": "^4.7.4" + } + }, "@textlint/ast-node-types": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/@textlint/ast-node-types/-/ast-node-types-12.1.1.tgz", @@ -3827,35 +3499,6 @@ "follow-redirects": "^1.14.8" } }, - "babel-polyfill": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.23.0.tgz", - "integrity": "sha512-0l7mVU+LrQ2X/ZTUq63T5i3VyR2aTgcRTFmBcD6djQ/Fek6q1A9t5u0F4jZVYHzp78jwWAzGfLpAY1b4/I3lfg==", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0", - "core-js": "^2.4.0", - "regenerator-runtime": "^0.10.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - }, - "dependencies": { - "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", - "dev": true - } - } - }, "bail": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", @@ -4074,12 +3717,6 @@ "easy-table": "1.1.0" } }, - "core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "dev": true - }, "date-fns": { "version": "2.28.0", "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", @@ -4225,7 +3862,8 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, + "optional": true, + "peer": true, "requires": { "iconv-lite": "^0.6.2" }, @@ -4234,7 +3872,8 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, + "optional": true, + "peer": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" } @@ -4442,18 +4081,18 @@ "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==" }, "grpc_tools_node_protoc_ts": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.2.tgz", - "integrity": "sha512-7xPSeu8bwjcird3i9R5+9O4BF2Lhv9fMBdeobfUc2Bys9tSVtm/VB3WjTpKV78WlLYJyD94+wL/8hJqaMZ53Hw==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/grpc_tools_node_protoc_ts/-/grpc_tools_node_protoc_ts-5.3.3.tgz", + "integrity": "sha512-M/YrklvVXMtuuj9kb42PxeouZhs7Ul+R4e/31XwrankUcKL8cQQP50Q9q+KEHGyHQaPt6VtKKsxMgLaKbCxeww==", "requires": { "google-protobuf": "3.15.8", "handlebars": "4.7.7" } }, "grpc-tools": { - "version": "1.11.3", - "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.11.3.tgz", - "integrity": "sha512-cRSK2uhDKHtZ9hLRM35HxaMAMxyh/L7C96Ojt58DhQBdwTOQlV1VIJHSK6X/pDeSQKhaQqWMFfebt8tIcvRfjQ==", + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", + "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", "requires": { "@mapbox/node-pre-gyp": "^1.0.5" } @@ -4479,23 +4118,6 @@ "function-bind": "^1.1.1" } }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - } - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -4667,12 +4289,6 @@ "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", "dev": true }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true - }, "is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -5211,220 +4827,6 @@ "mimic-fn": "^2.1.0" } }, - "opencollective": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/opencollective/-/opencollective-1.0.3.tgz", - "integrity": "sha512-YBRI0Qa8+Ui0/STV1qYuPrJm889PT3oCPHMVoL+8Y3nwCffj7PSrB2NlGgrhgBKDujxTjxknHWJ/FiqOsYcIDw==", - "dev": true, - "requires": { - "babel-polyfill": "6.23.0", - "chalk": "1.1.3", - "inquirer": "3.0.6", - "minimist": "1.2.0", - "node-fetch": "1.6.3", - "opn": "4.0.2" - }, - "dependencies": { - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha512-wiXutNjDUlNEDWHcYH3jtZUhd3c4/VojassD8zHdHCY13xbZy2XbW+NKQwA0tWGBVzDA9qEzYwfoSsWmviidhw==", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "inquirer": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.0.6.tgz", - "integrity": "sha512-thluxTGBXUGb8DuQcvH9/CM/CrcGyB5xUpWc9x6Slqcq1z/hRr2a6KxUpX4ddRfmbe0hg3E4jTvo5833aWz3BA==", - "dev": true, - "requires": { - "ansi-escapes": "^1.1.0", - "chalk": "^1.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.1", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx": "^4.1.0", - "string-width": "^2.0.0", - "strip-ansi": "^3.0.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha512-7Wl+Jz+IGWuSdgsQEJ4JunV0si/iMhg42MnQQG6h1R6TNeVenp4U9x5CC5v/gYqz/fENLQITAWXidNtVL0NNbw==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, - "node-fetch": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.6.3.tgz", - "integrity": "sha512-BDxbhLHXFFFvilHjh9xihcDyPkXQ+kjblxnl82zAX41xUYSNvuRpFRznmldR9+OKu+p+ULZ7hNoyunlLB5ecUA==", - "dev": true, - "requires": { - "encoding": "^0.1.11", - "is-stream": "^1.0.1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, - "opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha512-iPBWbPP4OEOzR1xfhpGLDh+ypKBOygunZhM9jBtA7FS5sKjEiMZw0EFb82hnDOmTZX90ZWLoZKUza4cVt8MexA==", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - }, "ora": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", @@ -5510,25 +4912,10 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, "prettier": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", - "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", + "version": "2.8.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", + "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", "dev": true }, "prettier-plugin-packagejson": { @@ -5608,12 +4995,6 @@ "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" }, - "regenerator-runtime": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", - "integrity": "sha512-02YopEIhAgiBHWeoTiA8aitHDt8z6w+rQqNuIftlM+ZtvSl/brTouaU7DW6GO/cHtvxJvS4Hwv2ibKdxIRi24w==", - "dev": true - }, "remark-footnotes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-3.0.0.tgz", @@ -5712,12 +5093,6 @@ "queue-microtask": "^1.2.2" } }, - "rx": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/rx/-/rx-4.1.0.tgz", - "integrity": "sha512-CiaiuN6gapkdl+cZUr67W6I8jquN4lkak3vtIsIWCl4XIPP8ffsoyN6/+PuGXnQy8Cu8W2y9Xxh31Rq4M6wUug==", - "dev": true - }, "rxjs": { "version": "7.5.5", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz", @@ -5983,6 +5358,12 @@ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" }, + "typescript": { + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", + "dev": true + }, "uglify-js": { "version": "3.16.1", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.16.1.tgz", diff --git a/package.json b/package.json index 953111df1..b2a99e4d8 100644 --- a/package.json +++ b/package.json @@ -13,15 +13,15 @@ "prettier": "ory-prettier-styles", "dependencies": { "@openapitools/openapi-generator-cli": "^2.1.18", - "grpc-tools": "^1.11.3", - "grpc_tools_node_protoc_ts": "^5.3.2" + "grpc-tools": "^1.12.4", + "grpc_tools_node_protoc_ts": "^5.3.3" }, "devDependencies": { + "@ory/keto-namespace-types": "file:contrib/namespace-type-lib", "doctoc": "^2.0.1", "license-checker": "^25.0.1", - "opencollective": "^1.0.3", "ory-prettier-styles": "^1.2.0", - "prettier": "2.7.1", + "prettier": "2.8.4", "prettier-plugin-packagejson": "^2.2.18" } } diff --git a/proto/go.mod b/proto/go.mod index 644f7c7fe..5470684a2 100644 --- a/proto/go.mod +++ b/proto/go.mod @@ -1,14 +1,24 @@ module github.com/ory/keto/proto -go 1.16 +go 1.19 require ( - github.com/stretchr/testify v1.8.0 - golang.org/x/net v0.0.0-20220622184535-263ec571b305 // indirect - golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664 // indirect - google.golang.org/genproto v0.0.0-20220622171453-ea41d75dfa0f // indirect - google.golang.org/grpc v1.49.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 + github.com/stretchr/testify v1.8.1 + google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 + google.golang.org/grpc v1.52.3 google.golang.org/protobuf v1.28.1 ) +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/net v0.5.0 // indirect + golang.org/x/sys v0.4.0 // indirect + golang.org/x/text v0.6.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + retract v0.9.0-alpha.0.pre.0 diff --git a/proto/go.sum b/proto/go.sum index d2178eb87..7cfb2ad15 100644 --- a/proto/go.sum +++ b/proto/go.sum @@ -1,153 +1,44 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -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-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -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/glog v1.0.0 h1:nfP3RFugxnNRyKgeWd4oI1nYvXpxrx8ck8ZrcizshdQ= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 h1:1JYBfzqrWPcCclBwxFCPAou9n+q86mfnu7NAeHfte7A= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0/go.mod h1:YDZoGHuwE+ov0c8smSH49WLF3F2LaWnYYuDVd+EWrc0= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20220622184535-263ec571b305 h1:dAgbJ2SP4jD6XYfMNLVj0BF21jo2PjChrtGaAvF5M3I= -golang.org/x/net v0.0.0-20220622184535-263ec571b305/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/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-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664 h1:wEZYwx+kK+KlZ0hpvP2Ls1Xr4+RWnlzGFwPP0aiDjIU= -golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20220622171453-ea41d75dfa0f h1:kYlCnpX4eB0QEnXm12j4DAX4yrjjhJmsyuWtSSZ+Buo= -google.golang.org/genproto v0.0.0-20220622171453-ea41d75dfa0f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0 h1:WTLtQzmQori5FUH25Pq4WT22oCsv8USpQ+F6rqtsmxw= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/genproto v0.0.0-20230131230820-1c016267d619 h1:p0kMzw6AG0JEzd7Z+kXqOiLhC6gjUQTbtS2zR0Q3DbI= +google.golang.org/genproto v0.0.0-20230131230820-1c016267d619/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= +google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js index d10e45233..031e8ec8d 100644 --- a/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js +++ b/proto/ory/keto/opl/v1alpha1/syntax_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js index fbaa67ae3..d766a6aa1 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/check_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js index f25325c17..2cffdd5e3 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/expand_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js index 9ccecd5e4..7f1a6ac43 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/namespaces_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js index 24ba51e93..71e732edd 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/read_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js index c356922e5..cf1d1d3c4 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/relation_tuples_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_visibility_pb = require('../../../../google/api/visibility_pb.js'); goog.object.extend(proto, google_api_visibility_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js index 12b1e4aa8..007df68f8 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/version_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); diff --git a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js index 9a9f53a55..66e612146 100644 --- a/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js +++ b/proto/ory/keto/relation_tuples/v1alpha2/write_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_api_annotations_pb = require('../../../../google/api/annotations_pb.js'); goog.object.extend(proto, google_api_annotations_pb); diff --git a/proto/package-lock.json b/proto/package-lock.json index 5ddeaf7a7..c67257a5e 100644 --- a/proto/package-lock.json +++ b/proto/package-lock.json @@ -13,9 +13,9 @@ } }, "node_modules/@grpc/grpc-js": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz", - "integrity": "sha512-H9l79u4kJ2PVSxUNA08HMYAnUBLj9v6KjYQ7SQ71hOZcEXhShE/y5iQCesP8+6/Ik/7i2O0a10bPquIcYfufog==", + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.9.tgz", + "integrity": "sha512-xzsl2HamhovnZddS/2pMF4Q+FgwINaBvxoFGQ+G54Lo7Xsge36VvfDO/TDkL7FofmrRK/X5weRvwlJh7rKwN4w==", "dependencies": { "@grpc/proto-loader": "^0.7.0", "@types/node": ">=12.12.47" @@ -311,9 +311,9 @@ }, "dependencies": { "@grpc/grpc-js": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.7.3.tgz", - "integrity": "sha512-H9l79u4kJ2PVSxUNA08HMYAnUBLj9v6KjYQ7SQ71hOZcEXhShE/y5iQCesP8+6/Ik/7i2O0a10bPquIcYfufog==", + "version": "1.8.9", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.8.9.tgz", + "integrity": "sha512-xzsl2HamhovnZddS/2pMF4Q+FgwINaBvxoFGQ+G54Lo7Xsge36VvfDO/TDkL7FofmrRK/X5weRvwlJh7rKwN4w==", "requires": { "@grpc/proto-loader": "^0.7.0", "@types/node": ">=12.12.47" diff --git a/scripts/install-protoc-gen-js.sh b/scripts/install-protoc-gen-js.sh deleted file mode 100755 index f5f0e21e6..000000000 --- a/scripts/install-protoc-gen-js.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/env bash -set -euo pipefail - -source ./scripts/install-helpers.sh - -PROTOBUF_JS_VERSION=3.21.2 -CHECKSUM='' - -usage() { - cat <