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

greetd.service hardening #924

Merged
merged 2 commits into from
Dec 17, 2024
Merged

Conversation

gngram
Copy link
Contributor

@gngram gngram commented Dec 9, 2024

Description of changes

  • Hardened service config for greetd
  • Exposure level after hardening: 3.5

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • Author has run make-checks and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status
  • Change requires full re-installation
  • Change can be updated with nixos-rebuild ... switch

Instructions for Testing

  • List all targets that this applies to:
    - Lenovo x1
  • Is this a new feature
    • List the test steps to verify:
      • Boot the system and login, check if the system behaves normal.
  • If it is an improvement how does it impact existing functionality?

@gngram gngram temporarily deployed to internal-build-workflow December 9, 2024 08:13 — with GitHub Actions Inactive
@brianmcgillion brianmcgillion added the Needs Testing CI Team to pre-verify label Dec 9, 2024
@gngram gngram force-pushed the pr__greetd_service branch from 353a446 to f1afd68 Compare December 10, 2024 06:25
@gngram gngram temporarily deployed to internal-build-workflow December 10, 2024 06:25 — with GitHub Actions Inactive
@milva-unikie
Copy link

milva-unikie commented Dec 10, 2024

Tested on Lenovo-X1 (nixos-rebuild switch)

Issues:

  • Changing volume with F1, F2 and F3 keys does not work.
  • Can not enroll an fingerprint
[ghaf@gui-vm:~]$ fprintd-enroll -f right-index-finger
Using device /net/reactivated/Fprint/Device/0
failed to claim device: GDBus.Error:net.reactivated.Fprint.Error.PermissionDenied: Not Authorized: net.reactivated.fprint.device.setusername
  • Can not load the falcon model
[ghaf@gui-vm:~]$ load-falcon 
Error: Head "http://127.0.0.1:11434/": dial tcp 127.0.0.1:11434: socket: address family not supported by protocol
Error: Head "http://127.0.0.1:11434/": dial tcp 127.0.0.1:11434: socket: address family not supported by protocol

Working:

  • Can login
  • Apps work
  • Test-automation passes

Notes:

Ssh connection to host or to other vm:s does not work from the gui-vm. Is this intended behavior? Is there some other way to connect to host and vm:s?

[ghaf@gui-vm:~]$ ssh ghaf-host-debug 
socket: Address family not supported by protocol
ssh: connect to host ghaf-host-debug port 22: failure
[ghaf@gui-vm:~]$ ssh comms-vm-debug 
socket: Address family not supported by protocol
ssh: connect to host comms-vm-debug port 22: failure

Ssh connections still work through net-vm. EDIT: I tried ssh to net-vm from gui-vm again and now it is not working for some reason. I don't understand what changed.
EDIT2: Checked with new installation that it does not infact work. I blame nixos-rebuild switch for the confusion.

@milva-unikie milva-unikie added bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR and removed Needs Testing CI Team to pre-verify labels Dec 10, 2024
@milva-unikie
Copy link

I tested again with a new installation and noticed that some of the issues I pointed out yesterday are probably related to nixos-rebuild switch. I updated my comment above.

Please check the box "Change requires full re-installation" in the description of this pr.

@gngram gngram force-pushed the pr__greetd_service branch from f1afd68 to e05abdb Compare December 11, 2024 14:09
@gngram gngram temporarily deployed to internal-build-workflow December 11, 2024 14:09 — with GitHub Actions Inactive
@gngram
Copy link
Contributor Author

gngram commented Dec 11, 2024

@milva-unikie Please verify it again. I have updated the PR with fix.
In my setup, it works without full re-installation, however I mentioned it.

@milva-unikie
Copy link

Tested on Lenovo-X1 (full re-installation)

Issues:

  • Log Out does not work. Same issue with Power menu and with lock-screen button. I believe it did work when I was testing this pr lat time.

Working:

  • Previous issues have been fixed (F1, F2, F3, fingerprint enrollment and loading falcon)
  • Apps work
  • Test-automation passes (expect logging out after gui tests)

@milva-unikie Please verify it again. I have updated the PR with fix. In my setup, it works without full re-installation, however I mentioned it.
Thanks. I did have some weird problems when using rebuild-switch. Might have something to do with the specific version I was using. This time used a clean installation to be sure no extra issues are reported.

@gngram gngram force-pushed the pr__greetd_service branch from e05abdb to 67b41e0 Compare December 12, 2024 13:54
@gngram gngram temporarily deployed to internal-build-workflow December 12, 2024 13:54 — with GitHub Actions Inactive
@gngram gngram requested a deployment to external-build-workflow December 12, 2024 13:54 — with GitHub Actions Waiting
@gngram
Copy link
Contributor Author

gngram commented Dec 12, 2024

@milva-unikie Power menu and lock screen works fine for me I faced issue with logoff only. This issue was there from the first push, in the last push I had removed some restrictions.

I have fixed the logoff issue, please verify again.

- Hardened service config for greetd
- Exposure level after hardening: 3.5

Signed-off-by: Ganga Ram <[email protected]>
- Increase disko memsize to avoid oom.

Signed-off-by: Ganga Ram <[email protected]>
@gngram gngram force-pushed the pr__greetd_service branch from 67b41e0 to c3dc729 Compare December 13, 2024 09:35
@gngram gngram temporarily deployed to internal-build-workflow December 13, 2024 09:35 — with GitHub Actions Inactive
@gngram gngram deployed to external-build-workflow December 13, 2024 09:35 — with GitHub Actions Active
@milva-unikie
Copy link

Tested on Lenovo-X1 ( full re-installation)

I think everything is good now!

  • Log Out works from Power menu and from Lock screen.
  • Test-automation passes when excluding the fixes that were added for Ghaf user accounts #827
  • I did not do a full regression testing anymore after the latest changes, but with quick testing could not see anything broken. (Cameras are not working, but that is not caused by this pr).

@milva-unikie Power menu and lock screen works fine for me I faced issue with logoff only. This issue was there from the first push, in the last push I had removed some restrictions.

I have fixed the logoff issue, please verify again.

Sorry if I was a bit unclear. Only the Log Out was broken, but it was broken from the both menus mentioned. Now fixed!

@milva-unikie milva-unikie added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon and removed bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR labels Dec 16, 2024
@brianmcgillion brianmcgillion merged commit 40e5ba6 into tiiuae:main Dec 17, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants