Skip to content

Commit a8def7f

Browse files
authored
Merge pull request #5666 from piraveena/ctl-tool
Update IAM CLI docs with b2b content and new scope changes
2 parents 5ebf1d6 + 66d1b70 commit a8def7f

File tree

1 file changed

+113
-28
lines changed

1 file changed

+113
-28
lines changed

en/includes/deploy/promote-configurations.md

Lines changed: 113 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,95 @@ The [IAM-CTL](https://github.com/wso2-extensions/identity-tools-cli){:target="_b
1313

1414
### Supported Resource Types
1515

16-
IAM-CTL currently supports the following resource types:
16+
IAM-CTL provides support for propagating the following resource types:
1717

18-
- **Applications**
19-
- **Identity Providers**
20-
- **Claims**
21-
- **User Stores**
18+
<table>
19+
<thead>
20+
<tr>
21+
<th>Organization Type</th>
22+
<th>Supported Resources</th>
23+
</tr>
24+
</thead>
25+
<tbody>
26+
<tr>
27+
<td>Root Organization</td>
28+
<td>Applications, Identity Providers, Claims, User Stores</td>
29+
</tr>
30+
<tr>
31+
<td>Child Organization</td>
32+
<td>Applications, Identity Providers, User Stores</td>
33+
</tr>
34+
</tbody>
35+
</table>
2236

2337
## Getting Started
2438

25-
### Setting up
39+
Before using IAM-CTL, you need to register Machine-to-Machine (M2M) applications in your target environments. If you are propagating resources between root orgs, you need to create M2M apps in root organizations. If you are propagating resources between child organization, you need to create application in the root organization and share it with the relevant child organization. These applications will be used by IAM-CTL to authenticate and perform operations on your behalf.
40+
41+
### Register an application for resource propagation across root organizations
42+
43+
Follow the steps below to register an M2M application.
44+
45+
1. [Register an M2M application]({{base_path}}/guides/applications/register-machine-to-machine-app/){:target="_blank"} with the following API authorization.
46+
47+
<table>
48+
<tr>
49+
<td>Management --> Application Management API</td>
50+
<td>Create Application, Update Application, Delete Application, View Application, Update authorized business APIs of an Application, Update authorized internal APIs of an Application, View application client secret, Regenerate Application Secret</td>
51+
</tr>
52+
<tr>
53+
<td>Management --> Application Authentication Script Management API</td>
54+
<td>Update Application Authentication Script</td>
55+
</tr>
56+
<tr>
57+
<td>Management --> Claim Management API</td>
58+
<td>Create Claim, Update Claim, Delete Claim, View Claim</td>
59+
</tr>
60+
<tr>
61+
<td>Management --> Identity Provider Management API</td>
62+
<td>Create Identity Provider, Update Identity Provider, Delete Identity Provider, View Identity Provider</td>
63+
</tr>
64+
<tr>
65+
<td>Management --> Userstore Management API</td>
66+
<td>Create Userstore, Update Userstore, Delete Userstore, View Userstore</td>
67+
</tr>
68+
</table>
69+
70+
Take note of the **Client ID** and **Client Secret** of the M2M application you created.
71+
72+
### Register an application for resource propagation across child organizations
73+
74+
If the target environment is a child organization, ensure that a Standard-Based Application is created within the root organization and shared with that specific child organization.
75+
76+
1. Register a Standard-Based Application in the root organization.
77+
2. Share the application with the relevant child organization (e.g., wso2.com).
78+
3. Allow following grant types in the newly created Standard-Based Application:
79+
- Client Credentials
80+
- Organization Switch
81+
4. Grant the following API authorizations under Organization APIs.
82+
83+
<table>
84+
<tr>
85+
<td>Organization --> Application Management API</td>
86+
<td>Create Application, Update Application, Delete Application, View Application, Update authorized business APIs of an Application, Update authorized internal APIs of an Application, View application client secret, Regenerate Application Secret</td>
87+
</tr>
88+
<tr>
89+
<td>Organization --> Application Authentication Script Management API</td>
90+
<td>Update Application Authentication Script</td>
91+
</tr>
92+
<tr>
93+
<td>Organization --> Identity Provider Management API</td>
94+
<td>Create Identity Provider, Update Identity Provider, Delete Identity Provider, View Identity Provider</td>
95+
</tr>
96+
<tr>
97+
<td>Organization --> Userstore Management API</td>
98+
<td>Create Userstore, Update Userstore, Delete Userstore, View Userstore</td>
99+
</tr>
100+
</table>
101+
102+
Take note of the **Client ID** and **Client Secret** of the application you created.
103+
104+
### Setting up IAM-CTL
26105

27106
Follow the steps below to learn how you can configure IAM-CTL.
28107

@@ -49,27 +128,6 @@ Follow the steps below to learn how you can configure IAM-CTL.
49128
iamctl -h
50129
```
51130

52-
5. [Register an M2M application]({{base_path}}/guides/applications/register-machine-to-machine-app/){:target="_blank"} with the following API authorization and take note of client ID and client secret.
53-
54-
<table>
55-
<tr>
56-
<td>Management --> Application Management API</td>
57-
<td>Create Application, Update Application, Delete Application, View Application</td>
58-
</tr>
59-
<tr>
60-
<td>Management --> Claim Management API</td>
61-
<td>Create Claim, Update Claim, Delete Claim, View Claim</td>
62-
</tr>
63-
<tr>
64-
<td>Management --> Identity Provider Management API</td>
65-
<td>Create Identity Provider, Update Identity Provider, Delete Identity Provider, View Identity Provider</td>
66-
</tr>
67-
<tr>
68-
<td>Management --> Userstore Management API</td>
69-
<td>Create Userstore, Update Userstore, Delete Userstore, View Userstore</td>
70-
</tr>
71-
</table>
72-
73131
### Running the tool
74132

75133
1. Create a new folder and navigate to it from your terminal.
@@ -85,8 +143,10 @@ Follow the steps below to learn how you can configure IAM-CTL.
85143
!!! note
86144
If you have multiple environments, get a copy of the `env` folder and rename it according to the environments you have.
87145

88-
4. Open the **serverConfig.json** file and provide the client ID and client secret of the M2M application you created earlier.
146+
4. Open the **serverConfig.json** file and provide the client ID and client secret of the application you created earlier.
89147

148+
To propagate resources between root organizations, provide the details of the M2M application created in the root organization and the organization details.
149+
90150
=== "serverConfig.json"
91151

92152
```json
@@ -109,6 +169,31 @@ Follow the steps below to learn how you can configure IAM-CTL.
109169
}
110170
```
111171

172+
To propagate resources between child organizations, provide the details of the application created in the child organization and the child organization details.
173+
174+
=== "serverConfig.json"
175+
176+
```json
177+
{
178+
"SERVER_URL" : "{server_url}",
179+
"CLIENT-ID" : "{client_id}",
180+
"CLIENT-SECRET" : "{client_secret}",
181+
"TENANT-DOMAIN" : "{tenant_domain}",
182+
"ORGANIZATION": "{organization_id}"
183+
}
184+
```
185+
=== "Example"
186+
187+
```json
188+
{
189+
"SERVER_URL" : "{{server_url}}",
190+
"CLIENT-ID" : "bsjhjlb64crOL58bKV3UQmwA9QQa",
191+
"CLIENT-SECRET" : "TC45TBkLaZ6kFxqZuSmhOgelSG2ZBvFYKFlUFmfhKlYa",
192+
"TENANT-DOMAIN" : "{{tenant_domain}}",
193+
"ORGANIZATION": "b833d7de-264c-4c4e-8d52-61f9c57e84ca"
194+
}
195+
```
196+
112197
5. Run the following commands to export and import configurations.
113198

114199
a. **Export**

0 commit comments

Comments
 (0)