Skip to content

extensionSystem: Allow extensions to run on the login screen

Ray Strode requested to merge wip/rstrode/login-screen-extensions into main

At the moment it's not realy possible to extend the login screen to do things it doesn't have built-in support for. This means in order to support niche use cases, those cases have to change the main code base. For instance, oVirt and Vmware deployments want to be able to automaticaly log in guest VMs when a user pre-authenticates through a console on a management host. To support those use cases, we added code to the login screen directly, even though most machines will never be associated with oVirt or Vmware management hosts. nicedv will want similar changes as well.

We also get requests from e.g. government users that need certain features at the login screen that wouldn't get used much outside of government deployments. For instance, we've gotten requests that a machine contains prominently displays that it has "Top Secret" information.

All of these use cases seem like they would better handled via extensions that could be installed in the specific deployments. The problem is extensions only run in the user session, and get disabled at the login screen automatically.

This commit changes that. Now extensions can specify in their metadata via a new sessionModes property, which modes that want to run in. For backward compatibility, if an extension doesn't specify which session modes it works in, its assumed the extension only works in the user session.

cc @icq @yun341

It's still Draft because I need to do a bit more testing (it's a forward ported RHEL patch I haven't tested in main yet)

Edited by Ray Strode

Merge request reports