-
Notifications
You must be signed in to change notification settings - Fork 77
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
Support restricting device connections to the web endpoint #1881
base: main
Are you sure you want to change the base?
Conversation
527cc55
to
274bad9
Compare
274bad9
to
b3c1205
Compare
@@ -1,12 +1,19 @@ | |||
defmodule NervesHub.Helpers.WebsocketConnectionError do | |||
import Plug.Conn | |||
|
|||
@message "no certificate pair or shared secrets connection settings were provided" | |||
@no_auth_message "no certificate pair or shared secrets connection settings were provided" | |||
@check_uri_message "incorrect uri used, please contact support" |
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.
can we get some configured URL info into this message so we can actually tell them the fix?
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.
Sure. Although, just so you know, slipstream doesn't show this message by default, which is a pity
@@ -188,6 +198,14 @@ defmodule NervesHubWeb.DeviceSocket do | |||
end | |||
end | |||
|
|||
defp check_source_enabled(source) do |
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.
I wonder if we should have an in-between mode for the transition that just throws a "wrong-endpoint" key in the device connection metadata or similar. And then we could show it to people.
Though we have few enough people that will be hit by it that we can essentially tell them and give them a deadline?
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.
Yeah, I wouldn't want to add too much extra complexity to this. Instead we can just send out a warning to current users, check our logs to make sure people are off, and then turn it off. I have no intention to turn this off yet.
This allows installations to disable shared secret device connections to web endpoints.
This is ideal for cases where you are running a devices endpoint and want to make sure all connections go there.