Add webhook_key parameter to workflow_job_template#178
Merged
cigamit merged 1 commit intoJul 10, 2026
Conversation
The controller API added a writable webhook_key field to /api/v2/workflow_job_templates/ for setting the shared secret the webhook service uses to sign requests. This adds support for it in the workflow_job_template module, following the existing webhook_service/webhook_credential pattern.
cigamit
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/v2/workflow_job_templates/endpoint has a writablewebhook_keyfield ("Shared secret that the webhook service will use to sign requests. Leave blank to generate a new one when the webhook service is set.") that theworkflow_job_templatemodule did not expose yet.webhook_keyoption (type: str,no_log=True), following the same optional-field pattern already used forwebhook_service.Verification
I verified this against a live Ascender dev server (OPTIONS/GET/POST/PATCH against
/api/v2/workflow_job_templates/) before and after the change:webhook_keyistype: string,write_only: True, matching the description in this PR.webhook_keyis never echoed back by the API in POST, PATCH, or GET responses, confirmed by creating a workflow job template withwebhook_keyset and inspecting the raw JSON body each time: the key is absent in all three.zz-test-wfjt-webhook-key) withwebhook_service: githuband an explicitwebhook_key, which succeeded (changed=true).ControllerAPIModuledefaultsupdate_secretstoTruefor exactly this class of field, so re-running the module with identical parameters (includingwebhook_key) still reportschanged=trueand re-sends the PATCH, with a warning that the field has encrypted/write-only data and may inaccurately report the task as changed. This is the same behavior already accepted for other write-only secret fields in this collection, not a regression introduced here.state=absent,changed=true) and confirmed via a direct GET that it no longer exists (404).I intentionally left
tests/unit/test_completeness.pyuntouched. Once this PR and #165 both merge, theworkflow_job_templateentry inneeds_param_development(currently['webhook_key']) can be dropped since the module will be feature-complete for that field.