Skip to content

SSL auth and user GPG key support for user templates repos #353

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

Merged
merged 1 commit into from
May 18, 2025

Conversation

Guiiix
Copy link
Member

@Guiiix Guiiix commented Apr 23, 2025

This commit adds the support of user defined GPG keys and SSL authentication for user templates repositories.
GPG keys and SSL cert/key must be configured in DNF repositories files using the well-known options
(gpgkey, sslclientcert, sslclientkey).
If the keys are stored in /etc/qubes/repo-templates/keys/, they will be added to the payload sent to proxy in base64 and will be written to the Proxy VM before DNF command execution

QubesOS/qubes-issues#9850

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 94.59459% with 2 lines in your changes missing coverage. Please review.

Project coverage is 75.76%. Comparing base (02a9b4f) to head (9dd5910).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
qubesadmin/tools/qvm_template.py 94.59% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #353      +/-   ##
==========================================
+ Coverage   75.66%   75.76%   +0.09%     
==========================================
  Files          52       52              
  Lines        9028     9064      +36     
==========================================
+ Hits         6831     6867      +36     
  Misses       2197     2197              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qubesos-bot
Copy link

qubesos-bot commented Apr 28, 2025

OpenQA test summary

Complete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025051703-4.3&flavor=pull-requests

Test run included the following:

New failures, excluding unstable

Compared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025031804-4.3&flavor=update

  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died)
      # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_extra

    • TC_00_InputProxy_fedora-41-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_fedora-41-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_debian-12-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/dcWzE-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_gui_tools@hw7

    • qui_widgets_devices: unnamed test (unknown)
    • qui_widgets_devices: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qui-devices-opened' m...
  • system_tests_guivm_gpu_gui_interactive@hw13

    • guivm_startup: unnamed test (unknown)
    • guivm_startup: Failed (test died)
      # Test died: no candidate needle with tag(s) 'desktop' matched...

Failed tests

24 failures
  • system_tests_whonix

    • whonix_torbrowser: unnamed test (unknown)
    • whonix_torbrowser: Failed (test died)
      # Test died: no candidate needle with tag(s) 'anon-whonix-tor-brows...
  • system_tests_extra

    • TC_00_InputProxy_fedora-41-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_fedora-41-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_fedora-41-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_000_simple_mouse (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_010_mouse_deny_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_020_mouse_keyboard_mouse_only (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_030_simple_keyboard (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

    • TC_00_InputProxy_debian-12-xfce: test_040_mouse_keyboard (failure)
      AssertionError: unexpectedly None : Device 'pointer:test-inst-input...

    • TC_00_InputProxy_debian-12-xfce: test_050_mouse_late_attach (failure)
      AssertionError: unexpectedly None : Device 'test-inst-input: Test i...

  • system_tests_kde_gui_interactive

    • gui_keyboard_layout: wait_serial (wait serial expected)
      # wait_serial expected: "echo -e '[Layout]\nLayoutList=us,de' | sud...

    • gui_keyboard_layout: Failed (test died)
      # Test died: command 'test "$(cd ~user;ls e1*)" = "$(qvm-run -p wor...

  • system_tests_qwt_win10_seamless@hw13

    • windows_clipboard_and_filecopy: unnamed test (unknown)
    • windows_clipboard_and_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'windows-Edge-address-...
  • system_tests_qwt_win11@hw13

    • windows_install: wait_serial (wait serial expected)
      # wait_serial expected: qr/dcWzE-\d+-/...

    • windows_install: Failed (test died + timed out)
      # Test died: command 'script -e -c 'bash -x /usr/bin/qvm-create-win...

  • system_tests_gui_tools@hw7

    • qui_widgets_devices: unnamed test (unknown)
    • qui_widgets_devices: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qui-devices-opened' m...
  • system_tests_guivm_gpu_gui_interactive@hw13

    • guivm_startup: unnamed test (unknown)
    • guivm_startup: Failed (test died)
      # Test died: no candidate needle with tag(s) 'desktop' matched...

Fixed failures

Compared to: https://openqa.qubes-os.org/tests/132953#dependencies

14 fixed
  • system_tests_whonix

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

  • system_tests_suspend

    • suspend: unnamed test (unknown)
    • suspend: Failed (test died)
      # Test died: no candidate needle with tag(s) 'SUSPEND-FAILED' match...
  • system_tests_basic_vm_qrexec_gui

  • system_tests_qrexec

  • system_tests_kde_gui_interactive

    • clipboard_and_web: unnamed test (unknown)

    • clipboard_and_web: Failed (test died)
      # Test died: no candidate needle with tag(s) 'qubes-website' matche...

    • clipboard_and_web: wait_serial (wait serial expected)
      # wait_serial expected: "lspci; echo 2E8vz-\$?-"...

  • system_tests_guivm_vnc_gui_interactive

    • gui_filecopy: unnamed test (unknown)
    • gui_filecopy: Failed (test died)
      # Test died: no candidate needle with tag(s) 'files-work' matched...
  • system_tests_audio

  • system_tests_whonix@hw7

    • whonixcheck: fail (unknown)
      Whonixcheck for sys-whonix failed...

    • whonixcheck: unnamed test (unknown)

Unstable tests

  • system_tests_update

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw1

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw7

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...
  • system_tests_update@hw13

    update2/Failed (1/5 times with errors)
    • job 139051 # Test died: command 'script -c 'qubes-vm-update --force-update --l...

Performance Tests

Performance degradation:

1 performance degradations
  • debian-12-xfce_exec: 8.59 :small_red_triangle_up: ( previous job: 7.12, degradation: 120.63%)

Remaining performance tests:

15 tests
  • debian-12-xfce_exec-root: 29.43 :small_red_triangle_up: ( previous job: 28.65, degradation: 102.69%)
  • debian-12-xfce_socket: 8.90 :small_red_triangle_up: ( previous job: 8.60, degradation: 103.41%)
  • debian-12-xfce_socket-root: 8.35 🟢 ( previous job: 8.52, improvement: 97.92%)
  • debian-12-xfce_exec-data-simplex: 76.23 :small_red_triangle_up: ( previous job: 71.62, degradation: 106.43%)
  • debian-12-xfce_exec-data-duplex: 75.71 :small_red_triangle_up: ( previous job: 70.34, degradation: 107.63%)
  • debian-12-xfce_exec-data-duplex-root: 85.71 :small_red_triangle_up: ( previous job: 82.72, degradation: 103.61%)
  • debian-12-xfce_socket-data-duplex: 166.48 :small_red_triangle_up: ( previous job: 156.96, degradation: 106.07%)
  • fedora-41-xfce_exec: 9.20 🟢 ( previous job: 9.27, improvement: 99.25%)
  • fedora-41-xfce_exec-root: 61.37 🟢 ( previous job: 61.51, improvement: 99.78%)
  • fedora-41-xfce_socket: 8.19 🟢 ( previous job: 8.63, improvement: 94.89%)
  • fedora-41-xfce_socket-root: 8.36 🟢 ( previous job: 8.71, improvement: 95.99%)
  • fedora-41-xfce_exec-data-simplex: 64.07 🟢 ( previous job: 75.53, improvement: 84.82%)
  • fedora-41-xfce_exec-data-duplex: 69.18 🟢 ( previous job: 71.56, improvement: 96.68%)
  • fedora-41-xfce_exec-data-duplex-root: 92.75 🟢 ( previous job: 109.13, improvement: 85.00%)
  • fedora-41-xfce_socket-data-duplex: 155.63 :small_red_triangle_up: ( previous job: 150.61, degradation: 103.33%)

@marmarek
Copy link
Member

marmarek commented May 6, 2025

Generally looks good, but it could use an unit test. See test_110_qrexec_payload_refresh_success in qubesadmin/tests/tools/qvm_template.py for similar case.

@marmarek
Copy link
Member

marmarek commented May 6, 2025

Looks like $releasever needs to be supported in the path - at least the default repo config uses it. As said on the chat, this one qvm-template knows.

@Guiiix Guiiix force-pushed the ssl-repos branch 3 times, most recently from 0da6be5 to 3658b5b Compare May 12, 2025 19:20
This commit adds the support of user defined GPG keys and SSL
authentication for user templates repositories.
GPG keys and SSL cert/key must be configured in DNF
repositories files using the well-known options
(gpgkey, sslclientcert, sslclientkey).
If the keys are stored in /etc/qubes/repo-templates/keys/,
they will be added to the payload sent to proxy in base64
and will be written to the Proxy VM before DNF command execution
@marmarek marmarek merged commit 9611126 into QubesOS:main May 18, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants