Skip to content

feat: expose passwords and drop autologin#2005

Merged
imobachgs merged 8 commits intorework-usersfrom
expose-passwords
Feb 18, 2025
Merged

feat: expose passwords and drop autologin#2005
imobachgs merged 8 commits intorework-usersfrom
expose-passwords

Conversation

@imobachgs
Copy link
Contributor

Problem

The users API does not expose the passwords. Initially, we implemented like that for security
reasons, but giving that the password is send over an authenticated HTTPS connection, we do not
think it is relevant. After all, you are sending/receiving the password using the same channel.

Moreover, the D-Bus API is kind of inconsistent. The "first user" is exposed as a single "object",
while the root data are separate D-Bus properties.

Solution

  • Make user/root passwords visible.
  • Drop the autologin property, as it is not wanted anymore.

About the D-Bus API, this PR puts all the root information together using a RootUser property.
Ideally, we should have a SetRootUser method too, but it will have to wait a bit.

Testing

  • Added a new unit test
  • Tested manually

@imobachgs imobachgs force-pushed the expose-passwords branch 2 times, most recently from a37f69e to 3777730 Compare February 17, 2025 18:18
* Additionally, group the root data in a single D-Bus property.
@imobachgs imobachgs force-pushed the expose-passwords branch 2 times, most recently from f1360bb to 87c7b43 Compare February 17, 2025 18:25
@imobachgs imobachgs changed the title feat: improve users API feat: expose passwords and drop autologin Feb 17, 2025
Copy link
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

LGTM

@imobachgs imobachgs merged commit 97bada9 into rework-users Feb 18, 2025
5 checks passed
@imobachgs imobachgs deleted the expose-passwords branch February 18, 2025 10:14
imobachgs added a commit that referenced this pull request Feb 18, 2025
Apart from **eliminating the step introduced in #1821 to force users to
enter a password for root**, this PR significantly revamps the interface
of the Authentication page (formerly the Users page) to reduce its
complexity and make interactions more intuitive.

Summarizing a lot, the key changes include improving the first user form
and moving the root user authentication methods to a new form. This
allows users to easily set or clear authentication methods without
having to navigate complex actions. I.e., tables and most dynamic
actions have been eliminated, making the page much easier to interact
with and enabling users to quickly find the options they need.


| Authentication page | Root user form |
|-|-|
|![localhost_8080_
(21)](https://github.com/user-attachments/assets/d3eb877f-77c1-4b65-a425-6f46918a2ca1)
| ![localhost_8080_
(22)](https://github.com/user-attachments/assets/e486bf0b-c6a6-4d82-a780-3cde6d9cfbbc)
|

However, there are still areas for improvement:

* Enhance validations and the underlying code that supports them.
* Decouple the input with suggestions from the FirstUserForm (move it to
the core namespace).
* Use a simpler widget/input for adding public SSH keys. While the
current one works, it is somewhat complex and not well-suited for these
form’s use cases.
* Enable the ability to add more than one public SSH key.

## Note for reviewers

> [!WARNING]  
> After commit
c7c424c
this PR needs changes done at
#2005 (not merged at the time
of writing).

Please jump into the branch and use the interface as part of the review
process.

If interested in the details, check commits.

---

Related to https://trello.com/c/7ewFvR0X (internal link)
imobachgs added a commit that referenced this pull request Feb 18, 2025
@imobachgs imobachgs mentioned this pull request Feb 26, 2025
imobachgs added a commit that referenced this pull request Feb 26, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Feb 26, 2025
https://build.opensuse.org/request/show/1248595
by user IGonzalezSosa + dimstar_suse
- Version 12

- Add the missing shebang line to the agama-scripts.sh shell script
  (gh#agama-project/agama#2077).
- Save logs after running post installation scripts
  (gh#agama-project/agama#2078).

- Keep the encoding when storing the locale (gh#agama-project/agama#2062).

- Extend storage model schema to support global encryption
  (gh#agama-project/agama#2031).

- Introduce the storage model to support the new storage user
  interface (gh#agama-project/agama#2033)

- Expose root and first user passwords (gh#agama-project/agama#2005).
- Remove support for auto-login.

- Added reboot command to the CLI (gh#agama-project/agama#1970)

- Set console and X11 keymaps when changing the installer keymap
  (bsc#1236174).
- Use the "dashed" form of the keymap identifier when calling
  systemd-firstboo
imobachgs added a commit that referenced this pull request Jun 4, 2025
Drop the "autologin" schema from the property because it was dropped a
few months ago. See #2005.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments