New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tenant PATCH request may lose webhook configuration for non-global Webhooks #2411
Comments
PUT also has the same effect if retrieving the tenant using GET and then including it in the next PUT call (with any other data that you want to update). This is happening because when you retrieve a tenant, it does not have a JSON key for the tenant's webhook configuration. Although patch/put tenant does accept a |
Thanks for the additional detail @itstriolink this is helpful. This is perhaps a confusing feature of this API. However, we do document the https://fusionauth.io/docs/v1/tech/apis/tenants#update-a-tenant Maybe we should consider adding a flag to this API to indicate if you are trying to update the webhook config on a Tenant Update. |
I opened a separate issue to track this request @itstriolink thanks! |
Tenant PATCH request may lose webhook configuration for non-global Webhooks
Description
If you have one or more webhooks configured with
global: false
which means you have to assign one or more tenants to the webhook instead of just receiving events for all tenants - callingPATCH
w/out providing thewebhookIds
in the JSON body will remove this tenant from all webhooks.Observed in version
1.46.1
Affects versions
TBD
Steps to reproduce
global: false
with this tenant configured.PATCH
request and change onlytenant.name.
.Expected behavior
The webhook configuration should not be modified on a
PATCH
request unlesswebhookIds
are specified in the JSON request body.Workaround
Various options:
webhookIds
in the request body just as you would with aPUT
request.PUT
instead ofPATCH
global
instead.Community guidelines
All issues filed in this repository must abide by the FusionAuth community guidelines.
Additional context
Add any other context about the problem here.
Release Notes
When using the
PATCH
method on the Tenant API, if you previously had any explicit webhooks configured for this tenant, the association between the tenant and the webhook was lost. If you are not using webhooks, or all of your webhooks are configured forAll tenants
(webhook.global
), this bug would not affect you.The text was updated successfully, but these errors were encountered: