Bug 2112093

Summary: GUI shows "Capsule Authorization" disabled even if it was enabled during the creation of the webhook in Satellite 6.10
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: Hooks and WebhooksAssignee: Oleh Fedorenko <ofedoren>
Status: CLOSED ERRATA QA Contact: Griffin Sullivan <gsulliva>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.7CC: mhulan, ofedoren, pcreech, tdockendorf, zhunting
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: foreman_webhooks-2.0.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:35:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sayan Das 2022-07-28 19:08:51 UTC
Description of problem:

We can easily create an webhook in Satellite UI but whether we enable of disable the "Capsule Authorization" option, It does not matter. Revisiting the webhook will always show "Capsule Authorization" as disabled.


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

Satellite 6.10.7


How reproducible:

Always

Steps to Reproduce:
1. Install a Satellite 6.10

2. Go to Administer --> Webhooks --> Create a Webhook by name "Test" where in the Credentials tab:

 Verify SSL --> Should be unchecked

 Capsule Authorization --> Should be checked\enabled


3. Save the hook.

4. Reopen the "Test" webhook and check the "Credentials" tab


Actual results:

The "Capsule Authorization" option is unselected\unchecked


Expected results:

It should not show inconsistent data


Additional info:


From foreman-rake console, We can see that at DB level the "proxy_authorization" is enabled but it's the UI only that is showing the glitch

irb(main):008:0> pp Webhook.find(1)
#<Webhook:0x0000000014664b80
 id: 1,
 name: "Test",
 target_url: "https://webhook.site/a2a0cceb-5f72-426d-9e0d-7cad2be1221c",
 events: ["actions.katello.repository.sync_succeeded.event.foreman"],
 created_at: Thu, 28 Jul 2022 18:57:44 UTC +00:00,
 updated_at: Thu, 28 Jul 2022 19:01:05 UTC +00:00,
 webhook_template_id: 199,
 http_method: "POST",
 http_content_type: "application/json",
 enabled: true,
 verify_ssl: false,
 ssl_ca_certs: "",
 user: "",
 password: "[FILTERED]",
 http_headers: "",
 proxy_authorization: true>

Comment 1 Sayan Das 2022-07-28 19:19:59 UTC
The same problem exists on Satellite 6.11 as well.

Comment 2 Oleh Fedorenko 2022-07-29 14:01:59 UTC
Connecting redmine issue https://projects.theforeman.org/issues/34316 from this bug

Comment 3 Bryan Kearney 2022-07-29 16:05:17 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34316 has been resolved.

Comment 4 Zach Huntington-Meath 2022-08-01 16:27:16 UTC
Hello Oleh, what version of foreman_webhooks should we use for this, or do we need a new upstream version released?

Comment 7 Griffin Sullivan 2022-09-07 13:40:38 UTC
Verified in 6.12 snap 8

Capsule Authorization stays checked when reading a Webhook in the UI.

Steps to Reproduce:

1. Create a webhook with:
   a) Verify SSL unchecked
   b) Capsule Auth checked
2. Click on the webhook and go to Credentials

Expected Results:
Capsule Auth is still checked.

Actual Results:
Capsule Auth is still checked.

Comment 11 errata-xmlrpc 2022-11-16 13:35:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506