Skip to content

Commit afdc02c

Browse files
committed
Documentation updates for APIs related to webhook changes.
1 parent a16e203 commit afdc02c

File tree

6 files changed

+41
-37
lines changed

6 files changed

+41
-37
lines changed
Loading
-86.8 KB
Loading
Loading

site/assets/img/docs/webhook-settings.png

100755100644
-49.3 KB
Loading

site/docs/v1/tech/events-webhooks/index.adoc

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -131,38 +131,18 @@ The password to be used for HTTP Basic Authentication.
131131
The SSL certificate in PEM format to be used when connecting to the webhook. When provided an in memory keystore will be generated in order to complete the `https` connection to the webhook.
132132

133133

134-
=== Applications
135-
include::docs/v1/tech/events-webhooks/_application-webhooks-warning.adoc[]
136-
137-
image::webhook-settings-applications.png[Webhook Settings - All applications,width=1200,role=shadowed bottom-cropped top-cropped]
138-
139-
image::webhook-settings-applications-selection.png[Webhook Settings - Select Applications,width=1200,role=shadowed bottom-cropped top-cropped]
140-
141-
142-
==== Form Fields
143-
144-
[.api]
145-
All applications::
146-
When this toggle is enabled, all events will be sent to this webhook, events for a specific application.
147-
148-
Applications::
149-
When the [field]#All applications# is disabled, this field will be exposed. Select the application for which you would like to receive events.
150-
+
151-
Not all events are considered application specific and selecting an application will limit you to only receiving application events. The following events are considered Application events:
152-
+
153-
- `jwt.public-key.update`
154-
- `jwt.refresh-token.revoke`
155-
- `user.action`
156-
+
157-
In most cases you will want to use the [field]#All applications# configuration.
158-
159134
=== Tenants
135+
[NOTE.since]
136+
====
160137
Available since 1.37.0
138+
====
161139

162140
Here's the configuration when a webhook will be sent for all tenants.
141+
163142
image::webhook-settings-tenants.png[Webhook Settings - All applications,width=1200,role=shadowed bottom-cropped top-cropped]
164143

165144
Here's the configuration when a webhook should be sent for certain tenants.
145+
166146
image::webhook-settings-tenants-selection.png[Webhook Settings - Select Applications,width=1200,role=shadowed bottom-cropped top-cropped]
167147

168148

@@ -187,7 +167,7 @@ These events are configured at the instance level and cannot be limited to a cer
187167

188168
=== Headers
189169

190-
image::webhook-settings-headers.png[Webhook Settings - HTTP Headers,width=1200,role=shadowed top-cropped]
170+
image::webhook-settings-headers.png[Webhook Settings - HTTP Headers,width=1200,role=top-cropped]
191171

192172
==== Form Fields
193173

@@ -197,6 +177,30 @@ The name of the header to add to the HTTP request when sending the event to the
197177
Value::
198178
The header value to add to the HTTP request when sending the event to the webhook
199179

180+
=== Applications
181+
include::docs/v1/tech/events-webhooks/_application-webhooks-warning.adoc[]
182+
183+
image::webhook-settings-applications.png[Webhook Settings - All applications,width=1200,role=shadowed bottom-cropped top-cropped]
184+
185+
image::webhook-settings-applications-selection.png[Webhook Settings - Select Applications,width=1200,role=shadowed bottom-cropped top-cropped]
186+
187+
==== Form Fields
188+
189+
[.api]
190+
All applications::
191+
When this toggle is enabled, all events will be sent to this webhook, events for a specific application.
192+
193+
Applications::
194+
When the [field]#All applications# is disabled, this field will be exposed. Select the application for which you would like to receive events.
195+
+
196+
Not all events are considered application specific and selecting an application will limit you to only receiving application events. The following events are considered Application events:
197+
+
198+
- `jwt.public-key.update`
199+
- `jwt.refresh-token.revoke`
200+
- `user.action`
201+
+
202+
In most cases you will want to use the [field]#All applications# configuration.
203+
200204
== Test a Webhook
201205

202206
Once you have a webhook up and running and configured to receive JSON events from FusionAuth you may wish to test it by sending different events. FusionAuth has built in a test capability to allow you to construct any event and send it to your webhook.

site/docs/v1/tech/events-webhooks/writing-a-webhook.adoc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Additional headers may be added to the request by adding headers to the Webhook
1818
* <<Configuration>>
1919
** <<Application Scoped Events>>
2020
** <<Tenant Scoped Events>>
21-
** <<Example Configuration Before 1.37.0>>
2221
** <<Example Configuration After 1.37.0>>
22+
** <<Example Configuration Before 1.37.0>>
2323
* <<Retries>>
2424
** <<Retry Examples>>
2525
* <<Calling FusionAuth APIs In Webhooks>>
@@ -55,27 +55,27 @@ As of version 1.37.0, all events can be tenant scoped except instance events:
5555

5656
If you want to get events for certain applications, the preferred method is to send events for a tenant. Filter on the `applicationId` when consuming the event and discard events from any applications not of interest.
5757

58-
=== Example Configuration Before 1.37.0
58+
=== Example Configuration After 1.37.0
5959

60-
Here's an example scenario. You have two tenants, Pied Piper and Hooli. You have configured two webhooks listening for `user.create` events. One updates a separate user database, the other records information in an analytics system. Both the Pied Piper and Hooli tenants have the `user.create` event enabled in their webhook configurations.
60+
Here's an example scenario. You have two tenants, Pied Piper and Hooli. You have configured two webhooks listening for `user.create` events. One updates a separate user database, the other records information in an analytics system. Both the Pied Piper and Hooli tenants have the `user.create` event enabled in their webhook configurations and both webhooks are selected to receive events from both tenants.
6161

6262
In this scenario, each webhook will receive data when a user is created in either tenant, Pied Piper or Hooli.
6363

64-
Transaction settings can be managed at the tenant level, but the webhooks receiving an event are not. Any webhook that is configured to receive the `user.create` event will play a role in the transaction. It is not possible, for example, to require only the analytics webhook to succeed for the Pied Piper tenant and only the user database sync to succeed for the Hooli tenant. If you need this level of granularity, run different FusionAuth instances.
65-
66-
If you are separating your staging and production environments using tenants, webhooks will cross those boundaries. While you can filter on the tenant in the webhook itself, if you register both a production webhook and a staging webhook for the same event, the production webhook will receive staging data and the staging webhook will receive production data. In addition, webhook transactions will depend on both. The workaround is to run separate FusionAuth instances.
64+
Transaction settings can be managed at the tenant level. It is possible, for example, to require only the analytics webhook to succeed for the Pied Piper tenant and only the user database sync to succeed for the Hooli tenant.
6765

68-
Please review this issue for additional information about https://github.com/FusionAuth/fusionauth-issues/issues/1543[future webhook improvements].
66+
If you are separating your staging and production environments using tenants, webhooks will not cross those boundaries except for the instance scoped events.
6967

70-
=== Example Configuration After 1.37.0
68+
=== Example Configuration Before 1.37.0
7169

72-
Here's an example scenario. You have two tenants, Pied Piper and Hooli. You have configured two webhooks listening for `user.create` events. One updates a separate user database, the other records information in an analytics system. Both the Pied Piper and Hooli tenants have the `user.create` event enabled in their webhook configurations and both webhooks are selected to receive events from both tenants.
70+
Here's an example scenario. You have two tenants, Pied Piper and Hooli. You have configured two webhooks listening for `user.create` events. One updates a separate user database, the other records information in an analytics system. Both the Pied Piper and Hooli tenants have the `user.create` event enabled in their webhook configurations.
7371

7472
In this scenario, each webhook will receive data when a user is created in either tenant, Pied Piper or Hooli.
7573

76-
Transaction settings can be managed at the tenant level. It is possible, for example, to require only the analytics webhook to succeed for the Pied Piper tenant and only the user database sync to succeed for the Hooli tenant.
74+
Transaction settings can be managed at the tenant level, but the webhooks receiving an event are not. Any webhook that is configured to receive the `user.create` event will play a role in the transaction. It is not possible, for example, to require only the analytics webhook to succeed for the Pied Piper tenant and only the user database sync to succeed for the Hooli tenant. If you need this level of granularity, run different FusionAuth instances.
7775

78-
If you are separating your staging and production environments using tenants, webhooks will not cross those boundaries except for the instance scoped events.
76+
If you are separating your staging and production environments using tenants, webhooks will cross those boundaries. While you can filter on the tenant in the webhook itself, if you register both a production webhook and a staging webhook for the same event, the production webhook will receive staging data and the staging webhook will receive production data. In addition, webhook transactions will depend on both. The workaround is to run separate FusionAuth instances.
77+
78+
Please review this issue for additional information about https://github.com/FusionAuth/fusionauth-issues/issues/1543[future webhook improvements].
7979

8080
== Retries
8181

0 commit comments

Comments
 (0)