From cc1d5338791bb5ab2dae7a5e92fa5d8a58aebc8f Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Mon, 12 Oct 2020 08:26:20 -0600 Subject: [PATCH 1/4] Adding in doc about application specific webhooks. Pulling from https://github.com/FusionAuth/fusionauth-issues/issues/169 comments. --- site/docs/v1/tech/events-webhooks/events.adoc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/site/docs/v1/tech/events-webhooks/events.adoc b/site/docs/v1/tech/events-webhooks/events.adoc index 9bf8090843..ed4eff67ad 100644 --- a/site/docs/v1/tech/events-webhooks/events.adoc +++ b/site/docs/v1/tech/events-webhooks/events.adoc @@ -27,6 +27,24 @@ These are the events that FusionAuth generates that can be optionally consumed b * <> - when an access token is refreshed using a refresh token * <> - when a refresh token (or multiple tokens) are revoked +=== Application Scoped Events + +There are some events which can be sent for only one or more specified applications. + +The events that are considered "application" events and can be scoped to an application based up the Webhook config: + +* `user.action` +* `jwt.refresh-token.revoke` +* `jwt.refresh` +* `jwt.public-key.update` + +=== Tenant Scoped Events + +Any events which are not application scoped events are tenant scoped. + +Tenant scoped events can't be limited to a certain application. These either fire for all applications in a tenant or none of them. + +All user events are tenant scoped. For example, the `user.delete`, `user.create`, `user.update`, and `user.deactivate` events are all non-application specific. == User Actions From 31654d4425bec5dd95c78eed1421089ad4028b95 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Mon, 12 Oct 2020 08:29:06 -0600 Subject: [PATCH 2/4] wordsmithing. --- site/docs/v1/tech/events-webhooks/events.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/site/docs/v1/tech/events-webhooks/events.adoc b/site/docs/v1/tech/events-webhooks/events.adoc index ed4eff67ad..41b5662b39 100644 --- a/site/docs/v1/tech/events-webhooks/events.adoc +++ b/site/docs/v1/tech/events-webhooks/events.adoc @@ -29,7 +29,7 @@ These are the events that FusionAuth generates that can be optionally consumed b === Application Scoped Events -There are some events which can be sent for only one or more specified applications. +Some events can be generated for one or more specified applications. These events may also be generated for all applications within a tenant. The events that are considered "application" events and can be scoped to an application based up the Webhook config: @@ -40,11 +40,11 @@ The events that are considered "application" events and can be scoped to an appl === Tenant Scoped Events -Any events which are not application scoped events are tenant scoped. +Any events which are not application scoped events are by tenant scoped. -Tenant scoped events can't be limited to a certain application. These either fire for all applications in a tenant or none of them. +Tenant scoped events can't be limited to a certain application. These are either generated for all applications in a tenant or for none of them. -All user events are tenant scoped. For example, the `user.delete`, `user.create`, `user.update`, and `user.deactivate` events are all non-application specific. +All user events are tenant scoped because a user is a tenant scoped entity. For example, the `user.delete`, `user.create`, `user.update`, and `user.deactivate` events are all tenant scoped. == User Actions From 1ba105cb6bd29d8eba19c54b9e7f7c6bb1c158c3 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Tue, 13 Oct 2020 16:06:23 -0600 Subject: [PATCH 3/4] Reworked based on Daniel's feedback. Make it more clear that you probably want to use tenant scoped events. --- site/docs/v1/tech/events-webhooks/events.adoc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/site/docs/v1/tech/events-webhooks/events.adoc b/site/docs/v1/tech/events-webhooks/events.adoc index 41b5662b39..b7715aa5a2 100644 --- a/site/docs/v1/tech/events-webhooks/events.adoc +++ b/site/docs/v1/tech/events-webhooks/events.adoc @@ -29,9 +29,14 @@ These are the events that FusionAuth generates that can be optionally consumed b === Application Scoped Events -Some events can be generated for one or more specified applications. These events may also be generated for all applications within a tenant. +A few events can be generated for one or more specified applications, or for all applications within a tenant. -The events that are considered "application" events and can be scoped to an application based up the Webhook config: +[WARNING] +==== +The ability to limit the generation of an event for only certain applications is legacy functionality and may be modified in the future. You almost certainly want to use a tenant scoped event and filter on the `applicationId` in the event. +==== + +These events can be application scoped: * `user.action` * `jwt.refresh-token.revoke` @@ -40,12 +45,14 @@ The events that are considered "application" events and can be scoped to an appl === Tenant Scoped Events -Any events which are not application scoped events are by tenant scoped. +Any events which are not application scoped events are tenant scoped. -Tenant scoped events can't be limited to a certain application. These are either generated for all applications in a tenant or for none of them. +Tenant scoped events can't be limited to fire only for a certain application. These events are either generated for all applications in a tenant or for none of them. All user events are tenant scoped because a user is a tenant scoped entity. For example, the `user.delete`, `user.create`, `user.update`, and `user.deactivate` events are all tenant scoped. +A tenant scoped event can, however contain an `applicationId` which can be used to filter events when received. One example is `user.registration.create`. + == User Actions This event is generated when a User Action is taken on a user and when temporal actions transition between phases. From 7d02b2e5fc373fc69b5739becfc934fabd41c1a8 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Tue, 13 Oct 2020 16:07:40 -0600 Subject: [PATCH 4/4] Wordsmithing. --- site/docs/v1/tech/events-webhooks/events.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/docs/v1/tech/events-webhooks/events.adoc b/site/docs/v1/tech/events-webhooks/events.adoc index b7715aa5a2..9d1e81c259 100644 --- a/site/docs/v1/tech/events-webhooks/events.adoc +++ b/site/docs/v1/tech/events-webhooks/events.adoc @@ -33,7 +33,7 @@ A few events can be generated for one or more specified applications, or for all [WARNING] ==== -The ability to limit the generation of an event for only certain applications is legacy functionality and may be modified in the future. You almost certainly want to use a tenant scoped event and filter on the `applicationId` in the event. +The ability to limit the generation of an event for only certain applications is legacy functionality and may be modified in the future. You almost certainly want to use a tenant scoped event and optionally filter on the `applicationId` when consuming the event. ==== These events can be application scoped: