-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
engine/gRPC proxy: Fix mux regression and add test coverage #1456
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for actioning this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeppers! Pooshed f9ac86d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please continue to add HTTP CORS support, in order to better use it in the web (吴兴) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good one suggestion. tACK! 🚀
if !ok || username != s.Config.RemoteControl.Username || password != s.Config.RemoteControl.Password { | ||
w.Header().Set("WWW-Authenticate", `Basic realm="restricted"`) | ||
http.Error(w, "Access denied", http.StatusUnauthorized) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: It might be better to log an authentication failure server side as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added with a note: by default we bind to localhost so you'd be notified if something on your machine is trying to gain access to it (with ip reported being localhost). However, it would be good if someone changes the listen address and in that case the IP log would be more useful
@brook-w Good suggestion but out of scope for this as this will probably need a middleware handler and integration with config, PR's are welcome. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #1456 +/- ##
==========================================
+ Coverage 43.39% 43.83% +0.44%
==========================================
Files 367 363 -4
Lines 147096 145034 -2062
==========================================
- Hits 63829 63582 -247
+ Misses 75444 73723 -1721
+ Partials 7823 7729 -94
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rude tACK
[WARN] | GRPC | 30/01/2024 12:52:45 | gRPC proxy server unauthorised access attempt. IP: 127.0.0.1:59740 Path: /favicon.ico
PR Description
A user spotted a regression in Slack that the mux wasn't set for the gRPC proxy handler. This PR adds it back and adds test coverage.
Type of change
How has this been tested
Checklist