Skip to content
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

shell: Remove the "half-off" mode of the host switcher #20825

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mvollmer
Copy link
Member

@mvollmer mvollmer commented Jul 31, 2024

Cockpit should either not connect to remote machines at all, or trust the user to do it right. Also, the better place to explain the security implications of connecting to remote hosts is when actually connecting.

@mvollmer mvollmer force-pushed the host-switcher-no-mixed-mode branch from e570c8d to 18d3b87 Compare July 31, 2024 13:25
@martinpitt
Copy link
Member

Just FTR: My thought process was that the actual danger is about connecting to new unknown machines. Machines which you already have trusted/used in the past pose a much much lower threat. OTOH, disabling connecting to existing machines is a much bigger feature change/"regression" as new/unknown ones.

But if @garrett and you are fine with dropping this right away, then no veto from me. I planned it for the near future anyway (https://issues.redhat.com/browse/COCKPIT-1150), but wanted to give our users a little warning time.

What you do here is that you'd lose this feature entirely when upgrading from e.g. Fedora 40 to 41 or RHEL 9 to 10.

@mvollmer
Copy link
Member Author

What you do here is that you'd lose this feature entirely when upgrading from e.g. Fedora 40 to 41 or RHEL 9 to 10.

Yes. But I don't think we are actually helping people with a half-on, half-off mode. Its restrictions are just going to be annoying. Instead of connecting to a new host, we make them figure out that they can edit one of their existing entries to point to a different IP address. Or add hosts by hacking localStorage. Or finally putting the override into place to enable host switching properly.

If the OS has decided to switch the switcher off, but people rely on it, we should push them directly to enabling it again fully after upgrade, via the release notes.

Also, we should inform them of the security implications of connecting to remote hosts more loudly, immediately before it happens, and then let them do it if they want.

Imo. :-)

@garrett
Copy link
Member

garrett commented Jul 31, 2024

Right, we know for a fact that people — including our RHEL customers — do use and depend on this feature, and they also do not realize the implications (even according to that call we had a couple months back)... but removing features that people use is tricky and really needs to be rolled out over time, hence disabling the host switcher to off for RHEL-only for now (rawhide too is arguable) and making it clearer what's going on, with solutions that are mentioned within Cockpit, would be a better way of doing this.

We buy a little bit of time by changing the default config and dropping off the confusing half-off mode so we can design and implement more polished solutions for everyone (not just folks who will use RHEL10)... but we're still able to turn it completely off by default for RHEL10 (where it should also be mentioned in the release notes) in the immediate term, so we're still achieving the same main goal without breaking things for everyone else.

Outline with details @ #20823 (comment) (based on the meeting Marius and I had)

@martinpitt
Copy link
Member

@mvollmer yes, this wasn't a veto, just explaining my thought process and the (IMHO) inconsistency in between simultaneously being concerned about breaking user cases and pushing for making the transition faster.

If you deem this preferable, I'm fine with it!

@garrett
Copy link
Member

garrett commented Aug 1, 2024

but wanted to give our users a little warning time

Breaking the workflow isn't a "warning". Showing the warning a bit more obviously would be a better warning. Since it's been the status quo for years, we need to make sure we're not outright breaking things in a half-complete state.

Most people using the feature to connect to other machines will be doing so with their own machines on their own network. Connecting to and running apps on any remote machine has an inherent security risk to some degree in general, but when someone admins their own machine and uses trusted software from their distribution with containers and VMs on top, that risk is mitigated a lot. (And that's what people using Cockpit are going to almost always be doing.)

Connecting to "new" machines from within Cockpit will almost always be machines under their control as admins, not random "unknown" machines. The security risk of connecting to another machine that isn't on the list yet will be relatively the same as connecting to one of the ones they've already connected to, in practice. (That is: They control the machines already.)

I'm not saying we shouldn't handle this issue; I'm saying that we should stage the rollouts of changes in a better way without breaking the workflow in surprising ways inbetween.

We also shouldn't change things in unfinished ways across all distributions to address a RHEL-specific issue. (I consider the "half-off" switcher unfinished in both idea and implementation.)

Anyway, reverting this and changing the config file to be similar to what we already have across all distributions except RHEL is the way to gain some more time to have a more fully baked solution for everyone. Thankfully, having a config file and just turning it off for RHEL by default (with a way to enable it again if someone knows what they're doing) should fit the RHEL requirements and not leave it in a half-working state for everyone else meanwhile.

@mvollmer mvollmer added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Aug 1, 2024
@mvollmer mvollmer force-pushed the host-switcher-no-mixed-mode branch 2 times, most recently from 9bc6a20 to b160ed5 Compare August 1, 2024 11:44
@mvollmer mvollmer added blocked Don't land until something else happens first (see task list) and removed no-test For doc/workflow changes, or experiments which don't need a full CI run, labels Aug 1, 2024
@mvollmer mvollmer force-pushed the host-switcher-no-mixed-mode branch from b160ed5 to 66b5357 Compare August 1, 2024 12:33
@mvollmer mvollmer removed the blocked Don't land until something else happens first (see task list) label Aug 1, 2024
@mvollmer mvollmer force-pushed the host-switcher-no-mixed-mode branch 2 times, most recently from 032bea2 to dc8e4a0 Compare August 1, 2024 13:55
@mvollmer mvollmer marked this pull request as ready for review August 1, 2024 13:55
@mvollmer mvollmer force-pushed the host-switcher-no-mixed-mode branch 2 times, most recently from a80ea07 to ddb2f64 Compare August 2, 2024 11:55
@mvollmer mvollmer added the release-blocker Targetted for next release label Aug 2, 2024
@mvollmer mvollmer force-pushed the host-switcher-no-mixed-mode branch from ddb2f64 to 11e1480 Compare August 5, 2024 08:32
We will want to refer to that setting in more places than the shell,
so it's good to be prepared for that. At least the login page will
also needs it.

The default for the setting is now a ./configure option, with a
default default of "host switcher is on". It is explicitly switched
off only on RHEL 10 and Centos 10 for now.
@mvollmer mvollmer added the blocked Don't land until something else happens first (see task list) label Aug 5, 2024
Cockpit should either not connect to remote machines at all, or trust
the user to do it right.  Also, the better place to explain the
security implications of connecting to remote hosts is when actually
connecting.
...when the host switcher is disabled. Instead, redirect them to
localhost.

The tests that use multiple machines add those machines by navigating
to their URL and then logging into them via the trouble shooting
dialog. Those tests have to explicitly enable the host switcher for
this to continue to work.
@mvollmer mvollmer force-pushed the host-switcher-no-mixed-mode branch from 11e1480 to 225ad6e Compare August 5, 2024 11:13
// remote machines via URL bookmarks or similar that point to
// them.
if (!host_switcher_enabled)
state.host = "localhost";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This added line is not executed by any test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Don't land until something else happens first (see task list) release-blocker Targetted for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants