Did you already increase the log level for the Smart Proxy to debug? This may help as the service will give you then more details. At least it helped me when running into problems when testing the feature.
The issue is indeed in authentication, since your proxy runs on https anyway, could you check in the webhook form Proxy Authorization field to see if it fixes the issue? It will probably want to check Verify SSL as well.
When using shellhooks (which runs via smart-proxy), you do not want to use username/password, but SSL authentication. The smart-proxy only knows certificate based authentication.
In your Webhook settings, under “credentials”, enable both SSL validation and Proxy Authorization. With that everything should work as expected.
I have had a username/password in the config but that was not enough. After a bit of looking at guessing I set the following
Verify SSL: UNChecked
Proxy Authorization: Checked
X509 Certification Authorities: Set this to the Katello CA.
This all allowed the ShellHook to do all its HTTPs stuff. Then the script failed on other things. I needed a .hammer and .cache directory created in foreman-proxy directory. Which I created. Now I am getting permission denied running hammer commands. I can add SUDO in front of the hammer commands but the user foreman-proxy is a daemon user and does not have a password.
After a lot of playing around I found that you cannot copy in the .hammer directory into foreman-proxy home dir. This causes ruby to try to do an Interactive login which fails on the tty.
The only simple way I found was to pass the user / password in the hammer command. This sucks because a login is in clear text in the shellhook script but it works.