fix: validate SDS URL - #9030
Conversation
✅ Deploy Preview for cerulean-figolla-1f9435 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5fcdb4439
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #9030 +/- ##
==========================================
- Coverage 75.59% 75.58% -0.01%
==========================================
Files 252 253 +1
Lines 41713 41744 +31
==========================================
+ Hits 31531 31552 +21
- Misses 8057 8066 +9
- Partials 2125 2126 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| # /var/run/secrets/workload-spiffe-uds/socket | ||
| url: L3Zhci9ydW4vc2VjcmV0cy93b3JrbG9hZC1zcGlmZmUtdWRzL3NvY2tldA== | ||
| # unix:///var/run/secrets/workload-spiffe-uds/socket | ||
| url: dW5peDovLy92YXIvcnVuL3NlY3JldHMvd29ya2xvYWQtc3BpZmZlLXVkcy9zb2NrZXQ= |
There was a problem hiding this comment.
This would break upgrades from v1.8.0 to v1.9.0. Would it make sense to default to UDS for url without scheme?
There was a problem hiding this comment.
it's experimental, it should be fine.
I'm fine to add compatibility in v1.9, cc @envoyproxy/gateway-maintainers WDYT?
There was a problem hiding this comment.
If this breaking change is acceptable, it's better to cp this into v1.8.1 to break early.
|
internal/utils/net/url.go (line 25) accepts unix://host/path values but silently drops the host by returning only u.Path. For example unix://var/run/app.sock becomes /run/app.sock, which can point Envoy at the wrong socket while still passing validation. The validator should reject non-empty u.Host for unix URLs, or normalize it intentionally with tests. |
|
is |
e413ba5 to
30e5b8d
Compare
|
this should be rejected, the implement updated. |
c8fd664 to
29387ac
Compare
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
Signed-off-by: zirain <zirain2009@gmail.com>
42a3495 to
e69cfad
Compare
|
arkodg
left a comment
There was a problem hiding this comment.
LGTM thanks
non blocking: does the IR validation failure error trickle into resource status to let the user know of the issue ?
…envoyproxy#9184/envoyproxy#9030 SDS changes main's new TLSRoute dynamic-resolver support referenced a destSettings variable that doesn't exist on this branch, which renamed it to allDs/backendClusterRefs earlier in this branch's own history. git's 3-way merge combined the two without a textual conflict, silently producing code that failed to compile. Adapt the check to use allDs (a dynamic resolver is never merge-eligible, so it can only appear there) while counting both allDs and backendClusterRefs for the single-destination requirement. Signed-off-by: Muhammad Waqar <mwaqar@confluent.io>
…envoyproxy#9184/envoyproxy#9030 SDS changes main's new TLSRoute dynamic-resolver support referenced a destSettings variable that doesn't exist on this branch, which renamed it to allDs/backendClusterRefs earlier in this branch's own history. git's 3-way merge combined the two without a textual conflict, silently producing code that failed to compile. Adapt the check to use allDs (a dynamic resolver is never merge-eligible, so it can only appear there) while counting both allDs and backendClusterRefs for the single-destination requirement. Signed-off-by: Muhammad Waqar <mwaqar@confluent.io>
* fix: add validation for SDS URL Signed-off-by: zirain <zirain2009@gmail.com> * fix Signed-off-by: zirain <zirain2009@gmail.com> * lint Signed-off-by: zirain <zirain2009@gmail.com> * fix test Signed-off-by: zirain <zirain2009@gmail.com> * reject UDS with host Signed-off-by: zirain <zirain2009@gmail.com> * fix lint Signed-off-by: zirain <zirain2009@gmail.com> * fix related path check Signed-off-by: zirain <zirain2009@gmail.com> * release notes Signed-off-by: zirain <zirain2009@gmail.com> * fix Signed-off-by: zirain <zirain2009@gmail.com> --------- Signed-off-by: zirain <zirain2009@gmail.com>
fixes: #9018