Commit 0a60e46
authored
change: return invalid credentials errors on custom nginx error codes for incorrect client cert (#96)
This improves the user feedback in some cases when supplying invalid
client certificates.
However this covers only a subset of possible server behaviors on
invalid client certificates, but those are the only cases which can be
clearly attributed to invalid/missing client certs.
Some common server responses from CSAF Provider on invalid or missing
client certificate:
- http status 400 (bad request):
https://docs.apigee.com/api-platform/troubleshoot/runtime/400-ssl-certificate-error
- custom NGINX http error codes 495 or 496:
https://nginx.org/en/docs/http/ngx_http_ssl_module.html#errors *(now
covered)*
- termination of connection (transport level error):
https://cloud.google.com/load-balancing/docs/mtls
## Why
Better error feedback.
## References
VTI-6591 parent a200fb1 commit 0a60e46
File tree
3 files changed
+15
-2
lines changed- cmd/csaf_downloader
- csaf
- internal/httpext
3 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
490 | | - | |
| 491 | + | |
491 | 492 | | |
492 | 493 | | |
493 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | | - | |
| 236 | + | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments