Project

General

Profile

Actions

action #174301

closed

Enable usual authentication methods for assets served by NGINX size:M

Added by mkittler about 2 months ago. Updated 14 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2024-12-12
Due date:
% Done:

0%

Estimated time:

Description

Motivation

This ticket is a concrete approach to cover the most crucial aspect of #174154. Checkout that ticket for details.

Acceptance criteria

  • AC1: It is possible to enable authentication for openQA tests assets served by NGINX.
  • AC2: NGINX accepts the usual authentication methods openQA provides.
  • AC2.1: basic auth via personal access token
  • AC2.2: API key/secret
  • AC2.3: web session

Acceptance tests

  • AT2.1: Invoke a command like curl -u Demo:…:… http://localhost/assets/other/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20230109-Media.iso.sha256 (or curl -i -u Demo:…:… 'http://localhost:9526/tests/4416/asset/other/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20250112-Media.iso.sha256') and see whether you get a correct 200 (or 302) response or a 403 response depending on whether the credentials are correct or wrong.
  • AT2.2: Invoke a command like MOJO_CLIENT_DEBUG=1 openqa-cli api http://localhost/assets/other/openSUSE-Tumbleweed-DVD-x86_64-Snapshot20230109-Media.iso.sha256 and see whether you get a correct 200 response or a 403 response depending on whether the credentials are correct or wrong.
  • AT2.3: Open a test details page, select "Logs and assets" and try to download an asset. When logged in, the download prompt should appear; otherwise a login is supposed be triggered (or one gets an auth-related error message).

Suggestions


Related issues 1 (0 open1 closed)

Related to openQA Project (public) - action #174154: Prevent unauthorized openQA asset downloadResolvedmkittler2025-01-31

Actions
Actions #1

Updated by mkittler about 2 months ago

  • Related to action #174154: Prevent unauthorized openQA asset download added
Actions #2

Updated by mkittler about 2 months ago

  • Parent task set to #166358
Actions #3

Updated by okurz about 2 months ago

  • Target version set to Tools - Next
Actions #4

Updated by jbaier_cz about 2 months ago

  • Subject changed from Enable usual authentication methods for assets served by NGINX to Enable usual authentication methods for assets served by NGINX size:M
  • Description updated (diff)
  • Status changed from New to Workable
  • Target version changed from Tools - Next to Ready
Actions #5

Updated by ybonatakis 22 days ago

  • Assignee set to ybonatakis
Actions #6

Updated by ybonatakis 18 days ago

  • Assignee deleted (ybonatakis)

I got already confused. As the description says AC2.1 is already implemented. But I dont know the details of the implementation. Reading https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-subrequest-authentication I thought that those changes would have to be reverted but I dont know what was the initial approach. The instructions seem to not work and I would expect changes in the WebAPI.pm.

Actions #7

Updated by mkittler 18 days ago

Just for clarification: The description links an example for AC2.1 https://github.com/Martchus/openQA/commit/b5950273aa4168b20a4c31f03ecc451465d466c9. It does not state that this commit is a final implementation and that it has been merged yet (it probably hasn't).

Actions #8

Updated by ybonatakis 18 days ago

  • Assignee set to mkittler
Actions #9

Updated by mkittler 18 days ago

  • Assignee deleted (mkittler)

I'm looking into an issue with higher prio right now.

Actions #10

Updated by mkittler 17 days ago

  • Status changed from Workable to In Progress
  • Assignee set to mkittler
Actions #11

Updated by mkittler 17 days ago

  • Description updated (diff)
Actions #12

Updated by mkittler 17 days ago

  • Description updated (diff)
Actions #14

Updated by ybonatakis 17 days ago

mkittler wrote in #note-7:

Just for clarification: The description links an example for AC2.1 https://github.com/Martchus/openQA/commit/b5950273aa4168b20a4c31f03ecc451465d466c9. It does not state that this commit is a final implementation and that it has been merged yet (it probably hasn't).

No but they were other changes than those. but it also possible I confused with something else in between. Nevermind, I am looking to your PR and looks good in a quick look.

Actions #15

Updated by openqa_review 16 days ago

  • Due date set to 2025-01-29

Setting due date based on mean cycle time of SUSE QE Tools

Actions #16

Updated by mkittler 16 days ago

  • Status changed from In Progress to Feedback

PR for the cache service and the user agent in general: https://github.com/os-autoinst/openQA/pull/6120

Actions #17

Updated by mkittler 14 days ago

  • Status changed from Feedback to Resolved

With https://github.com/os-autoinst/openQA/pull/6120 merged all ACs are fulfilled. It worked at least when I tested it locally. So I'm resolving the ticket now because before we can enable it in production the remaining points of #174154 need to be covered first (at least the point about openqa-clone-job for which I created https://github.com/os-autoinst/openQA/pull/6125).

Actions #18

Updated by okurz 14 days ago

  • Due date deleted (2025-01-29)
Actions

Also available in: Atom PDF