-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds documentation to add service principal #248
base: master
Are you sure you want to change the base?
Conversation
|
||
- If you're having problems on `az login` as below | ||
`AADSTS7000222: The provided client secret keys for app '********************' are expired....` | ||
Then there is a problem related to service principal that is being used in CircleCI azure-cli orb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then there is a problem related to service principal that is being used in CircleCI azure-cli orb | |
Then there is a problem related to service principal that is being used in CircleCI azure-cli orb. |
`AADSTS7000222: The provided client secret keys for app '********************' are expired....` | ||
Then there is a problem related to service principal that is being used in CircleCI azure-cli orb | ||
|
||
There are three CircleCI environment variables being used by azure-cli plugin to login |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are three CircleCI environment variables being used by azure-cli plugin to login | |
There are three CircleCI environment variables being used by azure-cli plugin to login: |
- AZURE_SP_TENANT | ||
|
||
These three variables are defined by the service principal parameters app_id, client secret and tenant_id respectively. | ||
You can see the definition of the service principal we are using is defined in the link below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see the definition of the service principal we are using is defined in the link below | |
You can see the definition of the service principal we are using in the link below: |
If you get the error above, you need to add a new certificate using Certificates & Secrets blade | ||
and change the value of the AZURE_SP_PASSWORD value with the new secret value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you get the error above, you need to add a new certificate using Certificates & Secrets blade | |
and change the value of the AZURE_SP_PASSWORD value with the new secret value. | |
If you get the error above, you need to add a new certificate using Certificates & Secrets blade | |
and change the value of the AZURE_SP_PASSWORD value with the new secret value. |
In some cases you may not access the Service Principal since owners could be removed by admins. | ||
In that case you need to add another service principal using the command below after logged in using your credentials | ||
|
||
`az ad sp create-for-rbac --name <new_service_provider_name> --role contributor --scope /subscriptions/88abe223-c630-4f2c-8782-00bb5be874f6` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's not hardcode subscription id:
`az ad sp create-for-rbac --name <new_service_provider_name> --role contributor --scope /subscriptions/88abe223-c630-4f2c-8782-00bb5be874f6` | |
`az ad sp create-for-rbac --name <new_service_provider_name> --role contributor --scope /subscriptions/<subscription_id>` |
If you have permission to create service principle, you will get a json string as below | ||
|
||
`"appId": "<app_id>", | ||
"displayName": "<new_service_provider_name>", | ||
"password": "<password>", | ||
"tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have permission to create service principle, you will get a json string as below | |
`"appId": "<app_id>", | |
"displayName": "<new_service_provider_name>", | |
"password": "<password>", | |
"tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47"` | |
If you have permission to create service principle, you will get a json string as such: | |
`"appId": "<app_id>", | |
"displayName": "<new_service_provider_name>", | |
"password": "<password>", | |
"tenant": "<tenant_id>"` |
https://ms.portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps | ||
|
||
Then you need to add a client secret using Clients & Secrets. You need to get the appId and client secret value | ||
and update AZURE_SP and AZURE_SP_PASSWORD environment variables on CircleCI with the new appId and client secret value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and update AZURE_SP and AZURE_SP_PASSWORD environment variables on CircleCI with the new appId and client secret value | |
and update AZURE_SP and AZURE_SP_PASSWORD environment variables on CircleCI with the new appId and client secret value |
Please also not forget to check the preview of the README using the link below, to see how it would look like after merging your pr: |
No description provided.