1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/plugins
Pino Toscano e939cd07ef
redhat_subscription: use D-Bus for registration if possible (#6122)
subscription-manager currently does not have a way to get credentials
(username, password, activation keys, organization ID) in a secure way:
the existing command line parameters can be easily spotted when running
a process listing while 'subscription-manager register' runs.
There is a D-Bus service, which is used by e.g. cockpit and Anaconda to
interface with RHSM (at least for registration and common queries).

Try to perform the registration using D-Bus, in a way very similar to
the work done in convert2rhel [1] (with my help):
- try to do a simple signal test to check whether the system bus works;
  inspired by the login in the dconf module
- pass most of the options as registration options; for the few that are
  not part of the registration, execute 'subscription-manager' manually
- add quirks for differently working (or not) registration options for
  the D-Bus Register*() methods depending on the version of RHEL
- 'subscription-manager register' is used only in case the signal test
  is not working; silent fallback in case of D-Bus errors during the
  registration is not done on purpose to avoid silent fallback to a less
  secure registration

[1] https://github.com/oamg/convert2rhel/pull/540/
2023-03-14 22:52:51 +01:00
..
action Unflatmap community.general (#5461) 2022-11-02 20:42:29 +00:00
become Make pfexec become usable for illumos (#3889) 2022-10-05 08:26:40 +02:00
cache Remove unneccessary imports (#5940) 2023-02-12 19:48:39 +01:00
callback Remove unneccessary imports (#5940) 2023-02-12 19:48:39 +01:00
connection Add 'inventory_hostname' to the jail plugin documentation (#6118) 2023-03-03 22:56:24 +01:00
doc_fragments add xorder_discovery parameter (#6109) 2023-02-27 20:26:01 +01:00
filter JC: Add plugin parser functionality to JC Filter Plugin (#6043) 2023-02-23 16:54:38 +01:00
inventory Suppress urllib3 InsecureRequestWarnings when validate_certs option is false (#5931) 2023-02-13 21:36:09 +01:00
lookup stop passing loader/dataloader since it has been deprecated by ansible (#6074) 2023-02-25 15:29:27 +01:00
module_utils Removes dependency on StormSSH (#6117) 2023-03-12 12:39:42 +01:00
modules redhat_subscription: use D-Bus for registration if possible (#6122) 2023-03-14 22:52:51 +01:00
test Fix more copyright lines, add more default copyright lines (#5095) 2022-08-08 14:24:58 +02:00