From b4a6d7f1f857ea311f690fec9d3bfb71cf99ef58 Mon Sep 17 00:00:00 2001 From: Elena Kolevska Date: Tue, 19 Mar 2024 16:44:21 +0000 Subject: [PATCH] Adds test matrix for grpc parsing (#41) * Adds test matrix for grpc parsing Signed-off-by: Elena Kolevska * Reword Signed-off-by: Elena Kolevska * Adds a few more testcases Signed-off-by: Elena Kolevska --------- Signed-off-by: Elena Kolevska Co-authored-by: Artur Souza --- 20230627-S-sidecar-endpoint-tls.md | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/20230627-S-sidecar-endpoint-tls.md b/20230627-S-sidecar-endpoint-tls.md index 100f4a2..53ac926 100644 --- a/20230627-S-sidecar-endpoint-tls.md +++ b/20230627-S-sidecar-endpoint-tls.md @@ -137,3 +137,54 @@ What changes or actions are required to make this proposal complete? * Add integration testing on each SDK when possible * Documentation +## Test matrix + +| URL | Endpoint string to pass to grpc client | Hostname | Port | TLS | Error | +| ------------------------------------------------------------ | ----------------------------------------- | --------------------------------- | ---- | ------ | --------------------------------------------------------------------------- | +| :5000 | dns:localhost:5000 | localhost | 5000 | FALSE | | +| :5000?tls=false | dns:localhost:5000 | localhost | 5000 | FALSE | | +| :5000?tls=true | dns:localhost:5000 | localhost | 5000 | TRUE | | +| myhost | dns:myhost:443 | myhost | 443 | FALSE | | +| myhost?tls=false | dns:myhost:443 | myhost | 443 | FALSE | | +| myhost?tls=true | dns:myhost:443 | myhost | 443 | TRUE | | +| myhost:443 | dns:myhost:443 | myhost | 443 | FALSE | | +| myhost:443?tls=false | dns:myhost:443 | myhost | 443 | FALSE | | +| myhost:443?tls=true | dns:myhost:443 | myhost | 443 | TRUE | | +| [http://myhost](http://myhost) | dns:myhost:443 | myhost | 443 | FALSE | | +| [http://myhost?tls=false](http://myhost?tls=false) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=false' | +| [http://myhost?tls=true](http://myhost?tls=true) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=true' | +| [http://myhost:443](http://myhost:443) | dns:myhost:443 | myhost | 443 | FALSE | | +| [http://myhost:443?tls=false](http://myhost:443?tls=false) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=false' | +| [http://myhost:443?tls=true](http://myhost:443?tls=true) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=true' | +| [http://myhost:5000](http://myhost:5000) | dns:myhost:5000 | myhost | 5000 | FALSE | | +| [http://myhost:5000?tls=false](http://myhost:5000?tls=false) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=false' | +| [http://myhost:5000?tls=true](http://myhost:5000?tls=true) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=true' | +| [https://myhost:443](https://myhost:443) | dns:myhost:443 | myhost | 443 | TRUE | | +| [https://myhost:443?tls=false](https://myhost:443?tls=false) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=false' | +| [https://myhost:443?tls=true](https://myhost:443?tls=true) | | | | | the tls query parameter is not supported for http(s) endpoints: 'tls=true' | +| dns:myhost | dns:myhost:443 | myhost | 443 | FALSE | | +| dns:myhost?tls=false | dns:myhost:443 | myhost | 443 | FALSE | | +| dns:myhost?tls=true | dns:myhost:443 | myhost | 443 | TRUE | | +| dns://myauthority:53/myhost | dns://myauthority:53/myhost:443 | myhost | 443 | FALSE | | +| dns://myauthority:53/myhost?tls=false | dns://myauthority:53/myhost:443 | myhost | 443 | FALSE | | +| dns://myauthority:53/myhost?tls=true | dns://myauthority:53/myhost:443 | myhost | 443 | TRUE | | +| dns://myhost | | | | | invalid dns authority 'myhost' in URL 'dns://myhost' | +| unix:my.sock | unix:my.sock | my.sock | | FALSE | | +| unix:my.sock?tls=true | unix:my.sock | my.sock | | TRUE | | +| unix://my.sock | unix://my.sock | my.sock | | FALSE | | +| unix://my.sock?tls=true | unix://my.sock | my.sock | | TRUE | | +| unix-abstract:my.sock | unix-abstract:my.sock | my.sock | | FALSE | | +| unix-abstract:my.sock?tls=true | unix-abstract:my.sock | my.sock | | TRUE | | +| vsock:mycid:5000 | vsock:mycid:5000 | mycid | 5000 | FALSE | | +| vsock:mycid:5000?tls=true | vsock:mycid:5000 | mycid | 5000 | TRUE | | +| [2001:db8:1f70::999:de8:7648:6e8] | dns:[2001:db8:1f70::999:de8:7648:6e8]:443 | [2001:db8:1f70::999:de8:7648:6e8] | 443 | FALSE | | +| dns:[2001:db8:1f70::999:de8:7648:6e8]:5000 | dns:[2001:db8:1f70::999:de8:7648:6e8]:5000 | [2001:db8:1f70::999:de8:7648:6e8] | 5000 | FALSE | | +| dns:[2001:db8:1f70::999:de8:7648:6e8]:5000?abc=[] | | | | | Error: query parameters are not supported for gRPC endpoints: 'abc=[]' | +| dns://myauthority:53/[2001:db8:1f70::999:de8:7648:6e8] | dns://myauthority:53/[2001:db8:1f70::999:de8:7648:6e8]:443 | [2001:db8:1f70::999:de8:7648:6e8] | 443 | FALSE | | +| dns:[2001:db8:1f70::999:de8:7648:6e8] | dns:[2001:db8:1f70::999:de8:7648:6e8]:443 | [2001:db8:1f70::999:de8:7648:6e8] | 443 | FALSE | | +| https://[2001:db8:1f70::999:de8:7648:6e8] | dns:[2001:db8:1f70::999:de8:7648:6e8]:443 | [2001:db8:1f70::999:de8:7648:6e8] | 443 | TRUE | | +| https://[2001:db8:1f70::999:de8:7648:6e8]:5000 | dns:[2001:db8:1f70::999:de8:7648:6e8]:5000 | [2001:db8:1f70::999:de8:7648:6e8] | 5000 | TRUE | | +| host:5000/v1/dapr | | | | | paths are not supported for gRPC endpoints: '/v1/dapr' | +| host:5000/?a=1 | | | | | paths are not supported for gRPC endpoints: '/' | +| inv-scheme://myhost | | | | | invalid scheme 'inv-scheme' in URL 'inv-scheme://myhost' | +| inv-scheme:myhost:5000 | | | | | invalid scheme 'inv-scheme' in URL 'inv-scheme:myhost:5000' |