Skip to content

Commit 77ea340

Browse files
authored
Merge pull request #5509 from ashanthamara/actions
Add actions docs for sub organizations
2 parents 6f1531d + 2467c88 commit 77ea340

File tree

7 files changed

+252
-3
lines changed

7 files changed

+252
-3
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% include "../../../../../includes/guides/organization-management/service-extensions/service-extensions.md" %}

en/asgardeo/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,8 @@ nav:
454454
- Organization discovery:
455455
- Organization discovery: guides/organization-management/organization-discovery/index.md
456456
- Email domain based organization discovery: guides/organization-management/organization-discovery/email-domain-based-organization-discovery.md
457+
- Customizations:
458+
- Extend with service extensions: guides/organization-management/service-extensions/service-extensions.md
457459
- Notification Channels:
458460
- Configure Email Provider: guides/notification-channels/configure-email-provider.md
459461
- Configure SMS Provider: guides/notification-channels/configure-sms-provider.md
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% include "../../../../../../includes/guides/organization-management/service-extensions/service-extensions.md" %}

en/identity-server/next/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,8 @@ nav:
720720
- Organization discovery:
721721
- Organization discovery: guides/organization-management/organization-discovery/index.md
722722
- Email domain based organization discovery: guides/organization-management/organization-discovery/email-domain-based-organization-discovery.md
723+
- Customizations:
724+
- Extend with service extensions: guides/organization-management/service-extensions/service-extensions.md
723725
- Notification Channels:
724726
- Configure Email Provider: guides/notification-channels/configure-email-provider.md
725727
- Configure SMS Provider: guides/notification-channels/configure-sms-provider.md
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
# Service extensions
2+
3+
Service extensions at the organization level let you extend {{product_name}} to meet the specific requirements of your sub-organizations.
4+
5+
To learn how it works, refer to the [How service extensions work]({{base_path}}/guides/service-extensions/understanding-service-extensions/#how-service-extensions-work).
6+
7+
You can use the following extension capabilities available in {{product_name}} for your sub organizations:
8+
9+
## In-flow extensions
10+
11+
These extensions run directly within authentication or registration flows.
12+
13+
### Custom authentication
14+
15+
You can develop custom authentication logic by creating a custom authenticator as an external web service. This provides greater flexibility in handling diverse authentication requirements beyond the built-in authenticators in your organization.
16+
17+
To learn more, refer to the [Custom authentication]({{base_path}}/guides/service-extensions/in-flow-extensions/custom-authentication).
18+
19+
## Pre-flow extensions (actions)
20+
21+
These extensions execute specific actions before a particular event or flow within {{product_name}}.
22+
23+
To set up pre-flow extensions, refer to [Pre-flow extensions]({{base_path}}/guides/service-extensions/pre-flow-extensions/setting-up-actions) or [Action Management Rest API]({{base_path}}/apis/organization-apis/action-management-rest-api).
24+
25+
### Pre update password action
26+
27+
The pre update password action in {{product_name}} lets you check a password during password update flows.
28+
29+
To learn more, refer to the [Pre update password action]({{base_path}}/guides/service-extensions/pre-flow-extensions/pre-update-password-action).
30+
31+
Behavior by user type:
32+
33+
- Organization users: The pre update password action executes in all password update flows for users created in the organization.
34+
35+
The following example shows a request sent to an external service configured as a pre update password action, triggered when an administrator updates the organization user’s password.
36+
37+
```http
38+
POST /password-update-action HTTP/1.1
39+
Host: localhost
40+
Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
41+
Content-Type: application/json
42+
43+
{
44+
"actionType": "PRE_UPDATE_PASSWORD",
45+
"event": {
46+
"tenant": {
47+
"id": "12402",
48+
"name": "bar.com"
49+
},
50+
"organization": {
51+
"id": "eb1115f6-274f-4bb7-9b6d-d31f678e81f7",
52+
"name": "Builders",
53+
"orgHandle": "builders.com",
54+
"depth": 1
55+
},
56+
"user": {
57+
"id": "8eebb941-51e1-4d13-9d5a-81da190383ae",
58+
"claims": [
59+
{
60+
"uri": "http://wso2.org/claims/username",
61+
"value": "[email protected]"
62+
},
63+
{
64+
"uri": "http://wso2.org/claims/emailAddresses",
65+
"value": [
66+
67+
68+
]
69+
}
70+
],
71+
"groups": [
72+
"employee",
73+
"manager"
74+
],
75+
"organization": {
76+
"id": "eb1115f6-274f-4bb7-9b6d-d31f678e81f7",
77+
"name": "Builders",
78+
"orgHandle": "builders.com",
79+
"depth": 1
80+
}
81+
"updatingCredential": {
82+
"type": "PASSWORD",
83+
"format": "HASH",
84+
"value": "h3bxCOJHqx4rMjBCwEnCZkB8gfutQb3h6N/Bu2b9Jn4=",
85+
"additionalData": {
86+
"algorithm": "SHA256"
87+
}
88+
}
89+
},
90+
"userStore": {
91+
"id": "UFJJTUFSWQ==",
92+
"name": "PRIMARY"
93+
},
94+
"initiatorType": "ADMIN",
95+
"action": "UPDATE"
96+
}
97+
}
98+
```
99+
100+
- Shared/ invited users: The pre update password action doesn't execute because the parent organization manages the credentials for the shared/ invited users.
101+
102+
### Pre update profile action
103+
104+
The pre-update profile action in WSO2 Identity Server lets you verify user attributes during profile update processes.
105+
106+
To learn more, refer to the [Pre update profile action]({{base_path}}/guides/service-extensions/pre-flow-extensions/pre-update-profile-action).
107+
108+
Behavior by user type:
109+
110+
- Organization users: The pre update profile action runs during all profile update flows for users created in the organization.
111+
112+
The following example shows a request sent to an external service configured as a pre update profile action, triggered when an administrator updates the organization user’s profile.
113+
114+
```http
115+
POST /profile-update-action HTTP/1.1
116+
Host: localhost
117+
Authorization: Bearer czZCaGRSa3F0MzpnWDFmQmF0M2JW
118+
Content-Type: application/json
119+
120+
{
121+
"actionType": "PRE_UPDATE_PROFILE",
122+
"event": {
123+
"request": {
124+
"claims": [
125+
{
126+
"uri": "http://wso2.org/claims/emailaddress",
127+
"value": "[email protected]"
128+
}
129+
]
130+
},
131+
"tenant": {
132+
"id": "12402",
133+
"name": "bar.com"
134+
},
135+
"organization": {
136+
"id": "eb1115f6-274f-4bb7-9b6d-d31f678e81f7",
137+
"name": "ABC Builders",
138+
"orgHandle": "builders.com",
139+
"depth": 1
140+
},
141+
"user": {
142+
"id": "ab49e1b8-2d1b-424d-b136-debdca67bfcc",
143+
"organization": {
144+
"id": "eb1115f6-274f-4bb7-9b6d-d31f678e81f7",
145+
"name": "ABC Builders",
146+
"orgHandle": "builders.com",
147+
"depth": 1
148+
},
149+
"claims": [
150+
{
151+
"uri": "http://wso2.org/claims/emailaddress",
152+
"value": "[email protected]",
153+
"updatingValue": "[email protected]"
154+
},
155+
],
156+
"groups": [
157+
"gold-tier"
158+
]
159+
},
160+
"userStore": {
161+
"id": "REVGQVVMVA==",
162+
"name": "DEFAULT"
163+
},
164+
"initiatorType": "ADMIN",
165+
"action": "UPDATE"
166+
}
167+
}
168+
```
169+
170+
- Shared/ invited users: The pre update profile action only executes for the profile updates that happen for the attributes mentioned in [Customize user attributes in shared user profiles]({{base_path}}/guides/organization-management/share-user-profiles/#customize-user-attributes-in-shared-user-profiles).
171+
172+
The following example shows a request sent to an external service configured as a pre update profile action, triggered when an administrator updates the shared user’s profile.
173+
174+
```http
175+
POST /profile-update-action HTTP/1.1
176+
Host: localhost
177+
Authorization: Bearer czZCaGRSa3F0MzpnWDFmQmF0M2JW
178+
Content-Type: application/json
179+
180+
{
181+
"actionType": "PRE_UPDATE_PROFILE",
182+
"event": {
183+
"request": {
184+
"claims": [
185+
{
186+
"uri": "http://wso2.org/claims/customAttribute1",
187+
"value": "customValue1"
188+
},
189+
{
190+
"uri": "http://wso2.org/claims/customAttribute2",
191+
"value": [
192+
"1234566234",
193+
"1234566235",
194+
"1234566236"
195+
]
196+
}
197+
]
198+
},
199+
"tenant": {
200+
"id": "12402",
201+
"name": "bar.com"
202+
},
203+
"organization": {
204+
"id": "eb1115f6-274f-4bb7-9b6d-d31f678e81f7",
205+
"name": "ABC Builders",
206+
"orgHandle": "builders.com",
207+
"depth": 1
208+
},
209+
"user": {
210+
"id": "ab49e1b8-2d1b-424d-b136-debdca67bfcc",
211+
"claims": [
212+
{
213+
"uri": "http://wso2.org/claims/identity/accountState",
214+
"value": "UNLOCKED"
215+
},
216+
{
217+
"uri": "http://wso2.org/claims/customAttribute1",
218+
"value": "customValue1",
219+
"updatingValue": "customValue99"
220+
},
221+
],
222+
"groups": [
223+
"gold-tier"
224+
],
225+
"organization": {
226+
"id": "2fb1115f5-244f-4bc7-4b6e-d314178e81f7",
227+
"name": "Bar",
228+
"orgHandle": "bar.com",
229+
"depth": 0
230+
},
231+
"sharedUserId": "efa47311-ce77-4c19-9501-e872de6924ab"
232+
},
233+
"userStore": {
234+
"id": "REVGQVVMVA==",
235+
"name": "DEFAULT"
236+
},
237+
"initiatorType": "ADMIN",
238+
"action": "UPDATE"
239+
}
240+
}
241+
```
242+
243+
!!! note
244+
The `sharedUserId` in `event.user` denotes the unique identifier for the user in the shared organization.

en/includes/guides/service-extensions/pre-flow-extensions/pre-update-password-action.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ The {{product_name}} triggers this action during the following flows involving p
1414
- User Self-Registration: The user creates their own account and sets a password through the self-registration portal.
1515
{% endif %}
1616

17+
{% if is_version == "7.1.0" %}
1718
!!! note
1819
Currently, only the root organization can apply this action, and the {{product_name}} triggers it during any of the flows listed earlier.
20+
{% endif %}
1921

2022
## How pre-update password action works
2123

en/includes/guides/service-extensions/pre-flow-extensions/pre-update-profile-action.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ The following profile update flows trigger this action:
77
- Self-Service Profile Update: When an end-user modifies their profile through a self-service portal like the My Account application.
88
- Administrator-Initiated Profile Update: When an administrator updates a user's profile through a user management portal, such as the Console application.
99

10-
!!! note
11-
Currently, you can configure this action only at the root organization level.
12-
1310
## How pre-update profile action works
1411

1512
Configure a pre-update profile action with your external service endpoint.

0 commit comments

Comments
 (0)