Skip to content

Commit 70cbed5

Browse files
committed
Various details improved
1 parent 8e9546b commit 70cbed5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

articles/spring-cloud/spring-cloud-github-actions-key-vault.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ ms.date: 01/20/2019
99
---
1010

1111
# Authenticate Azure Spring Cloud with Key Vault in Github Actions
12-
Key vault is a secure place to store keys. Enterprise users need to store credentials for CI/CD environments in scope that they control. The key to get credentials in the key vault should be limited to resource scope. It has access to only the key vault scope, not the entire Azure scope. It's like a key that can only open a strong box not a master key that can open all doors in a building. It's a way to get a key with another key, but useful in a CICD workflow.
12+
Key vault is a secure place to store keys. Enterprise users need to store credentials for CI/CD environments in scope that they control. The key to get credentials in the key vault should be limited to resource scope. It has access to only the key vault scope, not the entire Azure scope. It's like a key that can only open a strong box not a master key that can open all doors in a building. It's a way to get a key with another key, which is useful in a CICD workflow.
1313

1414
## Generate Credential
1515
To generate a key to access the key vault, execute command below on your local machine:
1616
```
1717
az ad sp create-for-rbac --role contributor --scopes /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.KeyVault/vaults/<KEY_VAULT> --sdk-auth
1818
```
19-
Note the scope specified by the `--scopes` parameter, which limits the key access to the resource. It can only access the strong box.
19+
The scope specified by the `--scopes` parameter limits the key access to the resource. It can only access the strong box.
2020

2121
With results:
2222
```
@@ -36,20 +36,20 @@ With results:
3636
Then save the results to GitHub **secrets** as described in [Set up your GitHub repository and authenticate with Azure](./spring-cloud-howto-github-actions.md#set-up-github-repository-and-authenticate).
3737

3838
## Add Access Policies for the Credential
39-
The credential you created above can only get general information about the Key Vault, not the contents it stores. To get secrets stored in the Key Vault, you need set access policies for the credential.
39+
The credential you created above can get only general information about the Key Vault, not the contents it stores. To get secrets stored in the Key Vault, you need set access policies for the credential.
4040

41-
Go to the **Key Vault** dashboard in Azure portal, click the **Access control** menu, then open the **Role assignments** tab. Select **Apps** for **Type**, `This resource` for **scope**. You should see the credential you created in previous step:
41+
Go to the **Key Vault** dashboard in Azure portal, click the **Access control** menu, then open the **Role assignments** tab. Select **Apps** for **Type** and `This resource` for **scope**. You should see the credential you created in previous step:
4242

4343
![Set access policy](./media/github-actions/key-vault1.png)
4444

45-
Copy the credential name, for example, `azure-cli-2020-01-19-04-39-02`. Open the **Access policies** menu, click +Add Access Policy link. Select `Secret Management` for **Template**, then select **Principal**. Paste the credential name in **Principal**/**Select** input box:
45+
Copy the credential name, for example, `azure-cli-2020-01-19-04-39-02`. Open the **Access policies** menu, click **+Add Access Policy** link. Select `Secret Management` for **Template**, then select **Principal**. Paste the credential name in **Principal**/**Select** input box:
4646

4747
![Select](./media/github-actions/key-vault2.png)
4848

49-
Click the Add button in the **Add access policy** dialog, then click **Save**.
49+
Click the **Add** button in the **Add access policy** dialog, then click **Save**.
5050

5151
## Generate full-scope Azure Credential
52-
This is the master key to open all doors in the building. The procedure is similar to the first step, but now we change the scope to generate the master key:
52+
This is the master key to open all doors in the building. The procedure is similar to the previous step, but here we change the scope to generate the master key:
5353

5454
```
5555
az ad sp create-for-rbac --role contributor --scopes /subscriptions/<SUBSCRIPTION_ID> --sdk-auth

articles/spring-cloud/spring-cloud-howto-github-actions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ The command should output a JSON object:
3535
}
3636
```
3737

38-
This example uses the [Piggy Metrics](https://github.com/Azure-Samples/piggymetrics) sample on GitHub. Fork the sample, open GitHub repository page, and click Settings tab. Open Secrets menu, and click Add a new secret:
38+
This example uses the [Piggy Metrics](https://github.com/Azure-Samples/piggymetrics) sample on GitHub. Fork the sample, open GitHub repository page, and click **Settings** tab. Open **Secrets** menu, and click **Add a new secret**:
3939

4040
![Add new secret](./media/github-actions/actions1.png)
4141

42-
Set the secret name to `AZURE_CREDENTIALS` and its value to the JSON string that you found under the heading *Set up your GitHub repository and authenticate with Azure*.
42+
Set the secret name to `AZURE_CREDENTIALS` and its value to the JSON string that you found under the heading *Set up your GitHub repository and authenticate*.
4343

4444
![Set secret data](./media/github-actions/actions2.png)
4545

@@ -54,7 +54,7 @@ az spring-cloud create -n <service instance name> -g <resource group name>
5454
az spring-cloud config-server git set -n <service instance name> --uri https://github.com/xxx/piggymetrics --label config
5555
```
5656
## Build the workflow
57-
The workflow can be defined using the following options.
57+
The workflow is defined using the following options.
5858

5959
### Prepare for deployment with Azure CLI
6060
The command `az spring-cloud app create` is currently not idempotent. We recommend this workflow on existing Azure Spring Cloud apps and instances.
@@ -114,7 +114,7 @@ jobs:
114114
The az `run` command will use the latest version of Azure CLI. If there are breaking changes, you can also use a specific version of Azure CLI with azure/CLI `action`.
115115

116116
> [!Note]
117-
> This command will run all the az command in a new container, so `env` will not work, and cross action file access may have extra restrictions.
117+
> This command will run in a new container, so `env` will not work, and cross action file access may have extra restrictions.
118118
119119
Create the .github/workflow/main.yml file in the repository:
120120
```
@@ -189,13 +189,13 @@ jobs:
189189
```
190190

191191
## Run the workflow
192-
GitHub Actions should be enabled automatically after you push `.github/workflow/main.yml` to GitHub. The action will be triggered when you push a new commit. If you create this file in the browser, your action should have already run.
192+
GitHub **Actions** should be enabled automatically after you push `.github/workflow/main.yml` to GitHub. The action will be triggered when you push a new commit. If you create this file in the browser, your action should have already run.
193193

194194
To verify that the action has been enabled, click **Actions** tab on the GitHub repository page:
195195

196196
![Verify action enabled](./media/github-actions/actions3.png)
197197

198-
If your action runs in error, for example, if you haven't set Azure credential, you can rerun checks after fixing the error. On the GitHub repository page, click **Actions**, select the specific workflow task, and then click Rerun checks button to rerun checks:
198+
If your action runs in error, for example, if you haven't set the Azure credential, you can rerun checks after fixing the error. On the GitHub repository page, click **Actions**, select the specific workflow task, and then click the **Rerun checks** button to rerun checks:
199199

200200
![Rerun checks](./media/github-actions/actions4.png)
201201

0 commit comments

Comments
 (0)