deploymenttheory / terraform-provider-jamfpro

Jamf Pro Terraform Provider/Plugin written with the TF Provider SDK v2. Written in go
Mozilla Public License 2.0
34 stars 13 forks source link

Cannot use Header authentication with Webhooks resource #421

Open smithjw opened 1 month ago

smithjw commented 1 month ago

Looking at the webhooks resource code, while I can set authentication to HEADER, I don't have the ability to set the required header. If I try to create a webhook, I'll receive an error because the Header has not been added.

ShocOne commented 1 month ago

Hiya,

So the docs for api are like this:

{ "id": 1, "name": "Computer Enrolled Hook", "enabled": true, "url": "https://requestb.in/wsfasfws", "content_type": "text/xml", "event": "ComputerAdded", "connection_timeout": 5, "read_timeout": 2, "authentication_type": "NONE", "username": "webhook_admin", "password": "string", "enable_display_fields_for_group_object": false, "display_fields": [ { "size": 1, "display_field": { "name": "IP Address" } } ] }

Which means one of two things, either you can't by api define the headers for the webhook request as there's no field. Or, the field exists and doesn't exist in the docs. I'll ask a question on slack #jamf-api slack and see if anybody has any ideas 💡.

ShocOne commented 1 month ago

Update. It's been confirmed by Jamf to be a known issue with the api webhook api endpoint. It will require a feature request / support ticket with jamf.

ShocOne commented 1 month ago

Issue has been raised with jamf. It's currently unclear whether this will be fixed within the classic api, or, more likely will be rectified when the endpoint moves to the jamf pro api.