Skip to content

Commit 350800f

Browse files
Added Azure deployment troubleshooting solution (#1853)
Added troubleshooting steps to a common problem when deploying to Azure (Deployment Permissions Error).
1 parent 8308775 commit 350800f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/troubleshooting.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ First of all, check [this](https://github.com/trailofbits/algo#features) and ens
1616
* [AWS: "Deploy the template" fails with CREATE_FAILED](#aws-deploy-the-template-fails-with-create_failed)
1717
* [AWS: not authorized to perform: cloudformation:UpdateStack](#aws-not-authorized-to-perform-cloudformationupdatestack)
1818
* [DigitalOcean: error tagging resource 'xxxxxxxx': param is missing or the value is empty: resources](#digitalocean-error-tagging-resource)
19+
* [Azure: The client xxx with object id xxx does not have authorization to perform action Microsoft.Resources/subscriptions/resourcegroups/write' over scope](#azure-deployment-permissions-error)
1920
* [Windows: The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid](#windows-the-value-of-parameter-linuxconfigurationsshpublickeyskeydata-is-invalid)
2021
* [Docker: Failed to connect to the host via ssh](#docker-failed-to-connect-to-the-host-via-ssh)
2122
* [Error: Failed to create symlinks for deploying to localhost](#error-failed-to-create-symlinks-for-deploying-to-localhost)
@@ -241,6 +242,23 @@ See stdout/stderr for the exact error", "rc": 1}
241242

242243
It happens when your machine is not authenticated in the azure cloud, follow this [guide](https://trailofbits.github.io/algo/cloud-azure.html) to configure your environment
243244

245+
### Azure: Deployment Permissions Error
246+
247+
The AAD Application Registration (aka, the 'Service Principal', where you got the ClientId) needs permission to create the resources for the subscription. Otherwise, you will get the following error when you run the Ansible deploy script:
248+
249+
```
250+
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Resource group create_or_update failed with status code: 403 and message: The client 'xxxxx' with object id 'THE_OBJECT_ID' does not have authorization to perform action 'Microsoft.Resources/subscriptions/resourcegroups/write' over scope '/subscriptions/THE_SUBSCRIPTION_ID/resourcegroups/algo' or the scope is invalid. If access was recently granted, please refresh your credentials."}
251+
```
252+
253+
The solution for this is to open the Azure CLI and run the following command to grant contributor role to the Service Principal:
254+
255+
```
256+
az role assignment create --assignee-object-id THE_OBJECT_ID --scope subscriptions/THE_SUBSCRIPTION_ID --role contributor
257+
```
258+
259+
After this is applied, the Service Principal has permissions to create the resources and you can re-run `ansible-playbook main.yml` to complete the deployment.
260+
261+
244262
### Windows: The value of parameter linuxConfiguration.ssh.publicKeys.keyData is invalid
245263

246264
You tried to deploy Algo from Windows and you received an error like this one:

0 commit comments

Comments
 (0)