Skip to content

Commit b97e684

Browse files
Made tutorials a first class navigation item in IS and added improvements to agentic AI docs (#2)
* added the rest of the docs to tutorials
1 parent 650a919 commit b97e684

File tree

6 files changed

+44
-37
lines changed

6 files changed

+44
-37
lines changed

.vale/styles/Microsoft/Acronyms.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,7 @@ exceptions:
6262
- XSS
6363
- YAML
6464
- ZIP
65+
- AI
66+
- OIDC
67+
- SAML
68+
- JWT

.vale/styles/Microsoft/HeadingAcronyms.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ tokens:
77
- '[A-Z]{2,4}'
88
exceptions:
99
- IP
10+
- AI
11+
- SAML
12+
- OIDC
13+
- API
14+
- JWT

.vale/styles/config/ignore/words.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ middleware
2323
passwordless
2424
base_path
2525
Guardio
26+
agentic
27+
OAuth

.vale/styles/write-good/TooWordy.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ tokens:
4848
- at this time
4949
- attain
5050
- attributable to
51-
- authorize
5251
- because of the fact that
5352
- belated
5453
- benefit from

en/identity-server/next/mkdocs.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,11 @@ nav:
772772
- Recover super admin account: guides/your-is/recover-super-admin-account.md
773773
- Tutorials:
774774
- Tutorials - Overview: tutorials/index.md
775+
- Verifiable credentials with Microsoft Entra Verified ID: references/tutorials/connect-with-ms-entra.md
776+
- Verifiable credentials with MATTR: references/tutorials/connect-with-mattr.md
777+
- Send notifications through an external scheduled task: references/tutorials/send-notification-external-schedular.md
778+
- Configure Choreo for silent password migration: references/tutorials/configure-choreo-for-password-migration.md
779+
- Build your own push authenticator app: references/tutorials/build-your-own-push-authenticator-app.md
775780
- Secure Agentic AI Systems with WSO2 Identity Server: tutorials/secure-agentic-ai-systems.md
776781
- Setup:
777782
- Install:
@@ -1099,12 +1104,6 @@ nav:
10991104
- Error catalog: references/troubleshoot/error-codes.md
11001105
- API error catalog: references/troubleshoot/api-error-codes.md
11011106
- App-native error catalog: references/troubleshoot/app-native-error-codes.md
1102-
- Tutorials:
1103-
- Verifiable credentials with Microsoft Entra Verified ID: references/tutorials/connect-with-ms-entra.md
1104-
- Verifiable credentials with MATTR: references/tutorials/connect-with-mattr.md
1105-
- Send notifications through an external scheduled task: references/tutorials/send-notification-external-schedular.md
1106-
- Configure Choreo for silent password migration: references/tutorials/configure-choreo-for-password-migration.md
1107-
- Build your own push authenticator app: references/tutorials/build-your-own-push-authenticator-app.md
11081107
- IAM concepts:
11091108
- OAuth2 grant types: references/grant-types.md
11101109
- OAuth2 Pushed Authorization Requests: references/pushed-authorization-requests.md

en/includes/tutorials/secure-agentic-ai-systems.md

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
This tutorial guides you through setting up and running a sample application that demonstrates how to secure an agentic AI systems using {{ product_name }}.
44

5-
You will learn how to implement robust security measures for AI agents that operate autonomously or on users' behalf, ensuring all actions are governed by proper authentication, authorization, and fine-grained access control.
5+
You will learn how to set up robust security measures for AI agents that operate autonomously or on users' behalf, ensuring proper authentication, authorization, and fine-grained access control.
66

7-
## Learning Objectives
7+
## Learning objectives
88

99
By the end of this tutorial, you will understand how to:
1010

1111
* Configure AI agents as secure, first-class identities in {{ product_name }}.
12-
* Implement the On-Behalf-Of (OBO) flow for securely delegating user permissions to an agent.
12+
* Set up the On-Behalf-Of (OBO) flow for securely delegating user permissions to an agent.
1313
* Set up fine-grained, scope-based access control for all AI agent operations.
1414

15-
## System Overview
15+
## System overview
1616

17-
This tutorial uses a hotel booking system to demonstrate how AI agents can securely interact with users and APIs using {{ product_name }}'s identity and access management.
17+
This tutorial uses a hotel booking system to show how AI agents can securely interact with users and APIs using {{ product_name }}'s identity and access management.
1818

1919
### Components
2020

@@ -27,7 +27,7 @@ The system consists of four main components:
2727

2828
![System Overview]({{base_path}}/assets/img/tutorials/secure-agentic-ai-systems/system-overview.png){: width="800" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
2929

30-
## What You'll Need
30+
## What you'll need
3131

3232
* {% if product_name == "Asgardeo" %}An [**Asgardeo account**](https://wso2.com/asgardeo/docs/get-started/create-asgardeo-account/){% else %}An [**Identity Server**](https://wso2.com/identity-server/){% endif %}
3333
* **Gemini API key** (free from [Google AI Studio](https://aistudio.google.com/))
@@ -37,15 +37,15 @@ The system consists of four main components:
3737

3838
-----
3939

40-
## Configuration Steps
40+
## Configuration steps
4141

4242
Complete these setup steps in {{ product_name }} before starting the sample.
4343

4444
### Step 1: Register the components in {{ product_name }}
4545

4646
First, log in to the {{ product_name }} Console and configure the required identities, APIs, roles, and applications.
4747

48-
#### 1\. Create the AI agents
48+
#### 1. Create the AI agents
4949

5050
In the {{ product_name }} console, navigate to **Agents**. Create two **Agents**:
5151

@@ -54,7 +54,7 @@ In the {{ product_name }} console, navigate to **Agents**. Create two **Agents**
5454

5555
> **Note:** Store the generated agent credentials securely. These will be used for agent authentication in your services's environment configuration.
5656
57-
#### 2\. Define API resources and scopes
57+
#### 2. Define API resources and scopes
5858

5959
Navigate to **API Resources** to define the APIs the agents will interact with.
6060

@@ -63,7 +63,7 @@ Navigate to **API Resources** to define the APIs the agents will interact with.
6363
| **Hotel API** | `http://localhost:8001/api` | `read_bookings`, `create_bookings`, `admin_read_bookings`, `admin_update_bookings`, `admin_read_staff` |
6464
| **Staff Management Agent API** | `http://localhost:8002/v1/invoke` | `invoke` |
6565

66-
#### 3\. Set up users and roles
66+
#### 3. Set up users and roles
6767

6868
1. Navigate to **Users** and create a new test user.
6969
2. Navigate to **Roles** and create the following two **Organization** roles:
@@ -73,7 +73,7 @@ Navigate to **API Resources** to define the APIs the agents will interact with.
7373
| **Guest** | Assign the test user you created. | `read_bookings`, `create_bookings` |
7474
| **Staff** | Assign the **Gardeo Staff Management Agent**. | `admin_read_staff`, `admin_update_bookings`, `admin_read_bookings` |
7575

76-
#### 4\. Register the applications
76+
#### 4. Register the applications
7777

7878
You need to register two applications to represent the different clients interacting with your system.
7979

@@ -99,7 +99,7 @@ You need to register two applications to represent the different clients interac
9999

100100
Now that you have configured {{ product_name }}, set up and run the sample application on your local machine.
101101

102-
#### 1\. Download the sample
102+
#### 1. Download the sample
103103

104104
Clone the project repository from GitHub to your local machine and navigate into the project directory.
105105

@@ -108,13 +108,13 @@ git clone https://github.com/shashimalcse/iam-ai-samples.git
108108
cd iam-ai-samples/hotel-booking-agent-autogen-agent-iam
109109
```
110110

111-
#### 2\. Configure environment variables
111+
#### 2. Configure environment variables
112112

113113
Create a `.env` file in each service directory (for example `assistant-agent`, `backend`, `frontend`). Copy the contents from the corresponding `.env.example` file and update the values with your {{ product_name }} configurations and Gemini API key.
114114

115115
-----
116116

117-
#### 3\. Run the application
117+
#### 3. Run the application
118118

119119
With the configuration complete, start all services using the provided bash script.
120120

@@ -126,30 +126,28 @@ This starts all four components on their respective ports. Once the services are
126126

127127
-----
128128

129-
## Test the flows
129+
## Try it out
130130

131131
Interact with the application to see the security flows in action. This scenario walks you through booking a room with the assistant agent's help and triggering the autonomous agent.
132132

133-
### Example Booking Flow
134-
135-
1. **Open the AI Assistant**
133+
1. **Open the AI assistant**
136134
Open the application at `http://localhost:3000` and open the AI assistant chat window in the bottom right of the screen.
137135

138136
![Open the AI Assistant]({{base_path}}/assets/img/tutorials/secure-agentic-ai-systems/flow-1.png){: width="800" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
139137

140-
2. **Search for a Room**
141-
Type a natural language query. The agent is designed to understand dates and locations. For example:
138+
2. **Search for a room**
139+
Type a natural language query. The agent can understand dates and locations. For example:
142140
`I want to book a single room for myself near Colombo from September 2 to 10, 2025.`
143141

144142
The agent will search for options and present you with suitable rooms directly in the chat.
145143

146144
![Search for a Room]({{base_path}}/assets/img/tutorials/secure-agentic-ai-systems/flow-2.png){: width="800" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
147145

148-
3. **Confirm the Booking**
146+
3. **Confirm the booking**
149147
After reviewing the options, confirm that you want to book a room by typing:
150148
`That looks great, please confirm the booking.`
151149

152-
4. **Provide Consent for the Agent**
150+
4. **Provide consent for the agent**
153151
Once you confirm, the agent will prompt for your approval to make the booking on your behalf. This is a critical security step where the agent requests your explicit permission. Click the **Approve** button that appears in the chat.
154152

155153
![Provide Consent for the Agent]({{base_path}}/assets/img/tutorials/secure-agentic-ai-systems/flow-3.png){: width="800" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
@@ -159,12 +157,12 @@ Interact with the application to see the security flows in action. This scenario
159157

160158
![Authenticate with {{ product_name }}]({{base_path}}/assets/img/tutorials/secure-agentic-ai-systems/flow-4.png){: width="800" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
161159

162-
6. **Verify the Completed Booking**
160+
6. **Verify the completed booking**
163161
After successful authentication, you'll be redirected back to the chat UI, where you will see a confirmation message that your booking is complete.
164162

165163
![Authenticate with {{ product_name }}]({{base_path}}/assets/img/tutorials/secure-agentic-ai-systems/flow-5.png){: width="800" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
166164

167-
7. **Observe the Autonomous Agent**
165+
7. **Observe the autonomous agent**
168166
The booking has now triggered the autonomous **Staff Management Agent** in the background. Using its own secure identity, this agent analyzes your profile, checks staff availability, and assigns the most suitable contact person for your stay. You can now see the assigned contact person in your booking details.
169167

170168
![Observe the Autonomous Agent]({{base_path}}/assets/img/tutorials/secure-agentic-ai-systems/flow-6.png){: width="800" style="display: block; margin: 0; border: 0.3px solid lightgrey;"}
@@ -175,25 +173,25 @@ Interact with the application to see the security flows in action. This scenario
175173

176174
Let's break down the two distinct security models you just experienced.
177175

178-
### Guest Assistant Agent Flow (On-Behalf-Of)
176+
### Guest assistant agent flow (On-Behalf-Of)
179177

180178
When you asked the agent to book a room, it acted as your delegate.
181179

182180
1. **Permission Check:** The agent identified it needed the `create_bookings` scope to fulfill the request.
183-
2. **Consent Request:** Because it was acting for you, it asked for your explicit permission.
181+
2. **Consent Request:** As the agent acted on your behalf, it asked for your explicit permission.
184182
3. **OBO Flow Initiation:** Your approval redirected you to {{ product_name }} to authenticate and formally grant consent. {{ product_name }} then generated a *delegated access token*.
185183
4. **Secure API Call:** The agent used this delegated token to call the Hotel API.
186184
5. **Token Validation:** The Hotel API validated the token with {{ product_name }}, confirming that the token represents you (`testuser`) and has the required `create_bookings` scope for this specific action. All actions are attributed to your identity for auditing.
187185

188-
### Staff Management Agent Flow (Autonomous)
186+
### Staff management agent flow (Autonomous)
189187

190188
After the booking, the staff agent acted independently.
191189

192190
1. **Trigger:** The booking creation event automatically triggered the agent.
193191
2. **Independent Authentication:** The Staff Agent authenticated with {{ product_name }} using its *own* credentials (the ones you configured in Step 1) to get an access token.
194192
3. **Admin Operations:** Using its token with admin scopes (`admin_read_staff`, `admin_update_bookings`), the agent read your user profile and staff data to assign a contact person.
195193

196-
### Token Comparison: A Look Inside the JWT
194+
### Token comparison: A look inside the JWT
197195

198196
The fundamental difference between these flows is encoded directly within the JWT access tokens. By examining key claims, we can see precisely how {{ product_name }} represents identity and delegation.
199197

@@ -205,9 +203,9 @@ Here is a detailed comparison:
205203
| :--- | :--- | :--- | :--- |
206204
| **Identity Represented** | The User | The User (delegated to Agent) | The Agent itself |
207205
| **Primary Subject (`sub`)** | User's ID | User's ID | Agent's ID |
208-
| **Delegation (`act`)** | Not present | **Present.** Contains Agent's ID (`act.sub`) | Not present |
206+
| **Delegation (`act`)** | Not present | Present. Contains Agent's ID (`act.sub`) | Not present |
209207
| **Auth Type (`aut`)**| `APPLICATION_USER` | `APPLICATION_USER` | `AGENT` |
210-
| **Scopes** | User's full allowed scopes (for example `read_bookings`) | Subset of user scopes consented to (for example `create_bookings`) | Agent's own scopes (for example `admin_read_staff`) |
208+
| **Scopes** | User's full allowed scopes (for example `read_bookings`) | Subset of consented user scopes (for example `create_bookings`) | Agent's own scopes (for example `admin_read_staff`) |
211209
| **Obtained via** | Authorization Code Flow | On-Behalf-Of Flow (with consent) | Client Credentials Grant |
212210
| **User Control** | Full control | Explicit consent required | No user involvement |
213211

0 commit comments

Comments
 (0)