You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/integrations/azure/landing-zones.md
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,38 +171,56 @@ In order for meshStack to fetch the right token, it needs to know the unique ID
171
171
172
172
#### Required Platform Configuration
173
173
174
+
Before configuring Azure Function invocation, ensure you have:
175
+
- An Azure Function App deployed and running
176
+
- The meshStack replicator Service Principal already created in your Azure tenant
177
+
- Appropriate permissions to modify Enterprise Applications and API permissions in Azure
178
+
174
179
In order to make an Azure Function only accessible via the replicator's Service Principal, follow these steps:
175
180
176
181
> If these steps are automated via Terraform you end up with a non working Azure Function. Until Terraform solves this problem, please perform the setup steps manually in the Azure panel.
177
182
178
-
1. Create a SAMI or UAMI for your function (this is only required if you need the function to have permissions for Azure based resources like starting VMs, connecting Log Workspaces etc).
183
+
1. Create a SAMI or UAMI for your function. This managed identity is used by the function to authenticate and perform operations on Azure resources.
> **Important:** After creating the managed identity, assign it the necessary Azure RBAC permissions based on what your function needs to do. Common permissions include:
188
+
> -`Contributor` or `Owner` role on the target subscription or resource group (if the function creates or modifies resources)
189
+
> -`User Access Administrator` role (if the function assigns RBAC roles to users or groups)
190
+
> - Specific permissions like `Microsoft.Resources/tags/write` for tagging operations
191
+
> -`Reader` role at minimum for read-only operations
192
+
>
193
+
> You can assign these roles in the Azure Portal under the subscription's or resource group's "Access control (IAM)" section, using the managed identity's Object ID.
194
+
182
195
2. Lock down your function to only allow assigned users in the `Properties` section of the Enterprise Application created for the SAMI or UAMI in step 1.
3. Modify the Manifest of the Enterprise Application from step 2. Create a custom [Application Role](https://docs.microsoft.com/en-us/azure/architecture/multitenant-identity/app-roles). It's only possible to assign real users and unfortunatly no Service Principals directly to the function so this additional steps are required. Edit the Application Roles manifest like in this JSON:
199
+
3. Create a custom Application Role in the Enterprise Application manifest. This role will allow the replicator Service Principal to authenticate and invoke your function.
200
+
201
+
In the Enterprise Application from step 2, navigate to the Manifest and add a new entry to the `appRoles` array. You can choose any name for the `displayName` and `value` fields (we use "SPP-Access" and "Access" as examples here):
187
202
188
203
```json
189
204
{
190
205
"allowedMemberTypes": [
191
206
"Application"
192
207
],
193
-
"description": "Allows an SPP to get a token to a restricted application",
208
+
"description": "Allows the replicator Service Principal to invoke this Azure Function",
194
209
"displayName": "SPP-Access",
195
-
"id": "<RANDOM_UUID>",
210
+
"id": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
196
211
"isEnabled": true,
197
-
"lang": null,
198
-
"origin": "Application",
199
212
"value": "Access"
200
213
}
201
214
```
202
215
216
+
> **Note:** Replace the `id` value with a newly generated UUID/GUID. You can generate one using:

204
222
205
-
4. Now modify the API permissions of the **App Registration** belonging to the **replicator Service Principal**. This will allow meshStack's replicator to invoke the Azure Function. Open the `API permissions` screen and add the newly created `SPP-Access` Application Role. Don't forget to grant admin consent again afterwards.
223
+
4. Grant the replicator Service Principal permission to use the Application Role you just created. Open the **App Registration** for your **replicator Service Principal**, navigate to `API permissions`, and add the Application Role you created in step 3 (e.g., `SPP-Access` if you used that name). Don't forget to grant admin consent afterwards.
206
224
207
225

0 commit comments