Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-2485

Invalid signature error not reported to playbook dispatcher

Linking RHIVOS CVEs to...Migration: Automation ...Sync from "Extern...XMLWordPrintable

    • None
    • Moderate
    • ZStream
    • subs-client-tools
    • 13
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Approved Blocker
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      It may happen that rhc-worker-playbook receives a playbook that fails the signature check. In that case, the worker raises an exception, execution never starts, and nothing is reported to console.redhat.com.

      This happens despite the fact that infrastructure for reporting these types of problems to console.redhat.com is present, and is used in other situations. For example, should playbook execution fail due Ansible not being installed on the connected hosts, this error is reported back to console.redhat.com and presented to the user (https://github.com/RedHatInsights/rhc-worker-playbook/blob/main/rhc_worker_playbook/server.py#L262)

      rhc-worker-playbook should use this same mechanism to report signature validation failures, instead of failing silently.

      Version-Release number of selected component (if applicable):

      All known versions of rhc and rhc-worker-playbook, including at least:

      # rpm -q rhc rhc-worker-playbook
      rhc-0.2.5-1.el9_5.x86_64
      rhc-worker-playbook-0.1.10-1.el9_5.x86_64
      

      How reproducible:

      100%

      Steps to Reproduce:

      Create a remediation plan:

      curl -sSH "Authorization:Bearer ${access_token}" \
          -X POST \
          -H "content-type:application/json" \
          --data-raw "$(jq < req-body.json)" \
          https://console.redhat.com/api/remediations/v1/remediations
      
      {
        "name": "invalid-signature",
        "auto_reboot": true,
        "archived": false,
        "add": {
          "issues": [
              {
              "id": "test:invalidSignatureTasks",
              "resolution": "fix",
              "systems": ["37322c13-c257-4f8a-a129-d0c8acbe109c"]
              }
          ]
        }
      }
      

      Actual results:

      The client will not report an error to console.redhat.com. When log-level = "trace" in /etc/rhc/config.toml, rhcd.service will log something like this: rhcd.log

      Expected results:

      An error is reported to console.redhat.com.

      Additional info:

      n/a

        1. ansible-playbook-absent.png
          141 kB
          Jeremy Audet
        2. invalid-signature.png
          140 kB
          Jeremy Audet
        3. jaudet-test-invalidSignatureTasks.png
          135 kB
          Jeremy Audet
        4. jaudet-test-ping.png
          173 kB
          Jeremy Audet
        5. no-ansible-playbook.png
          148 kB
          Jeremy Audet
        6. remediation9.7.png
          28 kB
          Pavlina Bartikova
        7. rhcd.log
          8 kB
          Jeremy Audet

              jvlcek@redhat.com Joe VLcek
              jharting.osdfleetmanager Jozef Hartinger (Inactive)
              Archana Pandey, Pavlina Bartikova
              Link Dupont Link Dupont
              Jeremy Audet Jeremy Audet
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated: