Commit 1a0f465
authored
Add Go TLS tracing tests for binaries built with boringcrypto (#1461)
Summary: Add Go TLS tracing tests for binaries built with boringcrypto
I will follow up with updating the docs.px.dev encryption library
section of the [data source
docs](https://docs.px.dev/about-pixie/data-sources/#encryption-libraries)
to list boringcrypto as a supported TLS library.
Relevant Issues: Fixes #597
Type of change: /kind test-infra
Test Plan: New test coverage verifies boringcrypto TLS tracing is
functional and verified that binaries used have boringcrypto enabled
with `goversion -crypto`
<details>
<summary>goversion test output</summary>
```
# Build the boringcrypto binaries used the trace bpf tests
ddelnano@vigenere:~/code/pixie (ddelnano/add-go-boringcrypto-tls-tracing-tests) $ bazel query //... | grep boringcrypto | grep binary | xargs -I{} bazel build {}
Loading: 0 packages loaded
Loading: 501 packages loaded
INFO: Invocation ID: ebe2161e-6317-42d8-8c23-e83173c5ab64
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/ebe2161e-6317-42d8-8c23-e83173c5ab64
INFO: Analyzed target //src/stirling/testing/demo_apps/go_grpc_tls_pl/client:golang_boringcrypto_grpc_tls_client_binary (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //src/stirling/testing/demo_apps/go_grpc_tls_pl/client:golang_boringcrypto_grpc_tls_client_binary up-to-date:
bazel-bin/src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_boringcrypto_grpc_tls_client_binary
INFO: Elapsed time: 1.118s, Critical Path: 0.11s
INFO: 1 process: 1 internal.
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/ebe2161e-6317-42d8-8c23-e83173c5ab64
INFO: Build completed successfully, 1 total action
INFO: Invocation ID: bab5d6bb-5e75-48f3-91a7-5c7b7ab7fb25
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/bab5d6bb-5e75-48f3-91a7-5c7b7ab7fb25
INFO: Analyzed target //src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_boringcrypto_grpc_tls_server_binary (2 packages loaded, 6 targets configured).
INFO: Found 1 target...
Target //src/stirling/testing/demo_apps/go_grpc_tls_pl/server:golang_boringcrypto_grpc_tls_server_binary up-to-date:
bazel-bin/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_boringcrypto_grpc_tls_server_binary
INFO: Elapsed time: 0.932s, Critical Path: 0.04s
INFO: 1 process: 1 internal.
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/bab5d6bb-5e75-48f3-91a7-5c7b7ab7fb25
INFO: Build completed successfully, 1 total action
INFO: Invocation ID: ff5e37d4-0cdf-4f78-b582-affeef69dcc4
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/ff5e37d4-0cdf-4f78-b582-affeef69dcc4
INFO: Analyzed target //src/stirling/testing/demo_apps/go_https/client:golang_boringcrypto_client_binary (1 packages loaded, 4 targets configured).
INFO: Found 1 target...
Target //src/stirling/testing/demo_apps/go_https/client:golang_boringcrypto_client_binary up-to-date:
bazel-bin/src/stirling/testing/demo_apps/go_https/client/golang_boringcrypto_client_binary
INFO: Elapsed time: 0.503s, Critical Path: 0.06s
INFO: 1 process: 1 internal.
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/ff5e37d4-0cdf-4f78-b582-affeef69dcc4
INFO: Build completed successfully, 1 total action
INFO: Invocation ID: e1938fea-1793-490b-befd-38f632f95c6c
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/e1938fea-1793-490b-befd-38f632f95c6c
INFO: Analyzed target //src/stirling/testing/demo_apps/go_https/server:golang_boringcrypto_server_binary (1 packages loaded, 4 targets configured).
INFO: Found 1 target...
Target //src/stirling/testing/demo_apps/go_https/server:golang_boringcrypto_server_binary up-to-date:
bazel-bin/src/stirling/testing/demo_apps/go_https/server/golang_boringcrypto_server_binary
INFO: Elapsed time: 0.421s, Critical Path: 0.05s
INFO: 1 process: 1 internal.
INFO: Streaming build results to: https://bb.corp.pixielabs.ai/invocation/e1938fea-1793-490b-befd-38f632f95c6c
INFO: Build completed successfully, 1 total action
# Verify with goversion -crypto that boringcrypto is in use
ddelnano@vigenere:~/code/pixie (ddelnano/add-go-boringcrypto-tls-tracing-tests) $ ~/go/bin/goversion -crypto bazel-bin/src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_boringcrypto_grpc_tls_client_binary
bazel-bin/src/stirling/testing/demo_apps/go_grpc_tls_pl/client/golang_boringcrypto_grpc_tls_client_binary go1.20.4 X:boringcrypto,nocoverageredesign (boring crypto)
ddelnano@vigenere:~/code/pixie (ddelnano/add-go-boringcrypto-tls-tracing-tests) $ ~/go/bin/goversion -crypto bazel-bin/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_boringcrypto_grpc_tls_server_binary
bazel-bin/src/stirling/testing/demo_apps/go_grpc_tls_pl/server/golang_boringcrypto_grpc_tls_server_binary go1.20.4 X:boringcrypto,nocoverageredesign (boring crypto)
ddelnano@vigenere:~/code/pixie (ddelnano/add-go-boringcrypto-tls-tracing-tests) $ ~/go/bin/goversion -crypto bazel-bin/src/stirling/testing/demo_apps/go_https/client/golang_boringcrypto_client_binary
bazel-bin/src/stirling/testing/demo_apps/go_https/client/golang_boringcrypto_client_binary go1.20.4 X:boringcrypto,nocoverageredesign (boring crypto)
ddelnano@vigenere:~/code/pixie (ddelnano/add-go-boringcrypto-tls-tracing-tests) $ ~/go/bin/goversion -crypto bazel-bin/src/stirling/testing/demo_apps/go_https/server/golang_boringcrypto_server_binary
bazel-bin/src/stirling/testing/demo_apps/go_https/server/golang_boringcrypto_server_binary go1.20.4 X:boringcrypto,nocoverageredesign (boring crypto)
```
</details>
---------
Signed-off-by: Dom Del Nano <ddelnano@pixielabs.ai>1 parent e599084 commit 1a0f465
File tree
16 files changed
+245
-25
lines changed- src/stirling
- source_connectors/socket_tracer
- protocols/http2/testing
- go_grpc_client
- go_grpc_server
- testing/container_images
- testing/demo_apps
- go_grpc_tls_pl
- client
- server
- go_https
- client
- server
16 files changed
+245
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
242 | 255 | | |
243 | 256 | | |
244 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | 315 | | |
| 316 | + | |
315 | 317 | | |
316 | 318 | | |
317 | 319 | | |
| |||
354 | 356 | | |
355 | 357 | | |
356 | 358 | | |
| 359 | + | |
| 360 | + | |
357 | 361 | | |
358 | 362 | | |
359 | 363 | | |
| |||
528 | 532 | | |
529 | 533 | | |
530 | 534 | | |
| 535 | + | |
| 536 | + | |
531 | 537 | | |
532 | 538 | | |
533 | 539 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | | - | |
| 96 | + | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
| 197 | + | |
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| |||
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
92 | 99 | | |
93 | | - | |
| 100 | + | |
| 101 | + | |
94 | 102 | | |
95 | 103 | | |
96 | 104 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
69 | | - | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | | - | |
| 97 | + | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
| |||
105 | 107 | | |
106 | 108 | | |
107 | 109 | | |
108 | | - | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
0 commit comments