Skip to content

Commit 893efe4

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/azure-docs-pr into fixEncHost
2 parents 5d60d27 + cc35b14 commit 893efe4

File tree

7 files changed

+57
-82
lines changed

7 files changed

+57
-82
lines changed

articles/aks/control-kubeconfig-access.md

Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,50 @@ title: Limit access to kubeconfig in Azure Kubernetes Service (AKS)
33
description: Learn how to control access to the Kubernetes configuration file (kubeconfig) for cluster administrators and cluster users
44
ms.topic: article
55
ms.custom: devx-track-azurecli
6-
ms.date: 05/06/2020
6+
ms.date: 03/28/2023
77
---
88

99
# Use Azure role-based access control to define access to the Kubernetes configuration file in Azure Kubernetes Service (AKS)
1010

11-
You can interact with Kubernetes clusters using the `kubectl` tool. The Azure CLI provides an easy way to get the access credentials and configuration information to connect to your AKS clusters using `kubectl`. To limit who can get that Kubernetes configuration (*kubeconfig*) information and to limit the permissions they then have, you can use Azure role-based access control (Azure RBAC).
11+
You can interact with Kubernetes clusters using the `kubectl` tool. The Azure CLI provides an easy way to get the access credentials and *kubeconfig* configuration file to connect to your AKS clusters using `kubectl`. You can use Azure role-based access control (Azure RBAC) to limit who can get access to the *kubeconfig* file and the permissions they have.
1212

1313
This article shows you how to assign Azure roles that limit who can get the configuration information for an AKS cluster.
1414

1515
## Before you begin
1616

17-
This article assumes that you have an existing AKS cluster. If you need an AKS cluster, see the AKS quickstart [using the Azure CLI][aks-quickstart-cli], [using Azure PowerShell][aks-quickstart-powershell], or [using the Azure portal][aks-quickstart-portal].
17+
* This article assumes that you have an existing AKS cluster. If you need an AKS cluster, create one using [Azure CLI][aks-quickstart-cli], [Azure PowerShell][aks-quickstart-powershell], or [the Azure portal][aks-quickstart-portal].
18+
* This article also requires that you're running Azure CLI version 2.0.65 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
1819

19-
This article also requires that you are running the Azure CLI version 2.0.65 or later. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][azure-cli-install].
20+
## Available permissions for cluster roles
2021

21-
## Available cluster roles permissions
22+
When you interact with an AKS cluster using the `kubectl` tool, a configuration file, called *kubeconfig*, defines cluster connection information. This configuration file is typically stored in *~/.kube/config*. Multiple clusters can be defined in this *kubeconfig* file. You can switch between clusters using the [`kubectl config use-context`][kubectl-config-use-context] command.
2223

23-
When you interact with an AKS cluster using the `kubectl` tool, a configuration file is used that defines cluster connection information. This configuration file is typically stored in *~/.kube/config*. Multiple clusters can be defined in this *kubeconfig* file. You switch between clusters using the [kubectl config use-context][kubectl-config-use-context] command.
24+
The [`az aks get-credentials`][az-aks-get-credentials] command lets you get the access credentials for an AKS cluster and merges these credentials into the *kubeconfig* file. You can use Azure RBAC to control access to these credentials. These Azure roles let you define who can retrieve the *kubeconfig* file and what permissions they have within the cluster.
2425

25-
The [az aks get-credentials][az-aks-get-credentials] command lets you get the access credentials for an AKS cluster and merges them into the *kubeconfig* file. You can use Azure role-based access control (Azure RBAC) to control access to these credentials. These Azure roles let you define who can retrieve the *kubeconfig* file, and what permissions they then have within the cluster.
26+
There are two Azure roles you can apply to an Azure Active Directory (Azure AD) user or group:
2627

27-
The two built-in roles are:
28+
- **Azure Kubernetes Service Cluster Admin Role**
2829

29-
* **Azure Kubernetes Service Cluster Admin Role**
30-
* Allows access to *Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action* API call. This API call [lists the cluster admin credentials][api-cluster-admin].
31-
* Downloads *kubeconfig* for the *clusterAdmin* role.
32-
* **Azure Kubernetes Service Cluster User Role**
33-
* Allows access to *Microsoft.ContainerService/managedClusters/listClusterUserCredential/action* API call. This API call [lists the cluster user credentials][api-cluster-user].
34-
* Downloads *kubeconfig* for *clusterUser* role.
30+
* Allows access to `Microsoft.ContainerService/managedClusters/listClusterAdminCredential/action` API call. This API call [lists the cluster admin credentials][api-cluster-admin].
31+
* Downloads *kubeconfig* for the *clusterAdmin* role.
3532

36-
These Azure roles can be applied to an Azure Active Directory (AD) user or group.
33+
- **Azure Kubernetes Service Cluster User Role**
34+
35+
* Allows access to `Microsoft.ContainerService/managedClusters/listClusterUserCredential/action` API call. This API call [lists the cluster user credentials][api-cluster-user].
36+
* Downloads *kubeconfig* for *clusterUser* role.
3737

3838
> [!NOTE]
39-
> On clusters that use Azure AD, users with the *clusterUser* role have an empty *kubeconfig* file that prompts a log in. Once logged in, users have access based on their Azure AD user or group settings. Users with the *clusterAdmin* role have admin access.
39+
> On clusters that use Azure AD, users with the *clusterUser* role have an empty *kubeconfig* file that prompts a login. Once logged in, users have access based on their Azure AD user or group settings. Users with the *clusterAdmin* role have admin access.
4040
>
41-
> On clusters that do not use Azure AD, the *clusterUser* role has same effect of *clusterAdmin* role.
41+
> On clusters that don't use Azure AD, the *clusterUser* role has same effect of *clusterAdmin* role.
4242
4343
## Assign role permissions to a user or group
4444

45-
To assign one of the available roles, you need to get the resource ID of the AKS cluster and the ID of the Azure AD user account or group. The following example commands:
45+
To assign one of the available roles, you need to get the resource ID of the AKS cluster and the ID of the Azure AD user account or group using the following steps:
4646

47-
* Get the cluster resource ID using the [az aks show][az-aks-show] command for the cluster named *myAKSCluster* in the *myResourceGroup* resource group. Provide your own cluster and resource group name as needed.
48-
* Use the [az account show][az-account-show] and [az ad user show][az-ad-user-show] commands to get your user ID.
49-
* Finally, assign a role using the [az role assignment create][az-role-assignment-create] command.
47+
1. Get the cluster resource ID using the [`az aks show`][az-aks-show] command for the cluster named *myAKSCluster* in the *myResourceGroup* resource group. Provide your own cluster and resource group name as needed.
48+
2. Use the [`az account show`][az-account-show] and [`az ad user show`][az-ad-user-show] commands to get your user ID.
49+
3. Assign a role using the [`az role assignment create`][az-role-assignment-create] command.
5050

5151
The following example assigns the *Azure Kubernetes Service Cluster Admin Role* to an individual user account:
5252

@@ -65,55 +65,48 @@ az role assignment create \
6565
--role "Azure Kubernetes Service Cluster Admin Role"
6666
```
6767

68+
If you want to assign permissions to an Azure AD group, update the `--assignee` parameter shown in the previous example with the object ID for the *group* rather than the *user*.
69+
70+
To get the object ID for a group, use the [`az ad group show`][az-ad-group-show] command. The following command gets the object ID for the Azure AD group named *appdev*:
71+
72+
```azurecli-interactive
73+
az ad group show --group appdev --query objectId -o tsv
74+
```
75+
6876
> [!IMPORTANT]
69-
> In some cases, the *user.name* in the account is different than the *userPrincipalName*, such as with Azure AD guest users:
77+
> In some cases, such as Azure AD guest users, the *user.name* in the account is different than the *userPrincipalName*.
7078
>
71-
> ```output
79+
> ```azurecli-interactive
7280
> $ az account show --query user.name -o tsv
7381
82+
>
7483
> $ az ad user list --query "[?contains(otherMails,'[email protected]')].{UPN:userPrincipalName}" -o tsv
7584
> user_contoso.com#EXT#@contoso.onmicrosoft.com
7685
> ```
7786
>
78-
> In this case, set the value of *ACCOUNT_UPN* to the *userPrincipalName* from the Azure AD user. For example, if your account *user.name* is *user\@contoso.com*:
79-
>
87+
> In this case, set the value of *ACCOUNT_UPN* to the *userPrincipalName* from the Azure AD user. For example, if your account *user.name* is *user\@contoso.com*, this action would look like the following example:
88+
>
8089
> ```azurecli-interactive
8190
> ACCOUNT_UPN=$(az ad user list --query "[?contains(otherMails,'[email protected]')].{UPN:userPrincipalName}" -o tsv)
8291
> ```
8392
84-
> [!TIP]
85-
> If you want to assign permissions to an Azure AD group, update the `--assignee` parameter shown in the previous example with the object ID for the *group* rather than a *user*. To obtain the object ID for a group, use the [az ad group show][az-ad-group-show] command. The following example gets the object ID for the Azure AD group named *appdev*: `az ad group show --group appdev --query objectId -o tsv`
86-
87-
You can change the previous assignment to the *Cluster User Role* as needed.
88-
89-
The following example output shows the role assignment has been successfully created:
90-
91-
```
92-
{
93-
"canDelegate": null,
94-
"id": "/subscriptions/<guid>/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myAKSCluster/providers/Microsoft.Authorization/roleAssignments/b2712174-5a41-4ecb-82c5-12b8ad43d4fb",
95-
"name": "b2712174-5a41-4ecb-82c5-12b8ad43d4fb",
96-
"principalId": "946016dd-9362-4183-b17d-4c416d1f8f61",
97-
"resourceGroup": "myResourceGroup",
98-
"roleDefinitionId": "/subscriptions/<guid>/providers/Microsoft.Authorization/roleDefinitions/0ab01a8-8aac-4efd-b8c2-3ee1fb270be8",
99-
"scope": "/subscriptions/<guid>/resourcegroups/myResourceGroup/providers/Microsoft.ContainerService/managedClusters/myAKSCluster",
100-
"type": "Microsoft.Authorization/roleAssignments"
101-
}
102-
```
103-
10493
## Get and verify the configuration information
10594
106-
With Azure roles assigned, use the [az aks get-credentials][az-aks-get-credentials] command to get the *kubeconfig* definition for your AKS cluster. The following example gets the *--admin* credentials, which work correctly if the user has been granted the *Cluster Admin Role*:
95+
Once the roles are assigned, use the [`az aks get-credentials`][az-aks-get-credentials] command to get the *kubeconfig* definition for your AKS cluster. The following example gets the *--admin* credentials, which works correctly if the user has been granted the *Cluster Admin Role*:
10796
10897
```azurecli-interactive
10998
az aks get-credentials --resource-group myResourceGroup --name myAKSCluster --admin
11099
```
111100
112-
You can then use the [kubectl config view][kubectl-config-view] command to verify that the *context* for the cluster shows that the admin configuration information has been applied:
101+
You can then use the [`kubectl config view`][kubectl-config-view] command to verify that the *context* for the cluster shows that the admin configuration information has been applied.
113102

114-
```
103+
```azurecli-interactive
115104
$ kubectl config view
105+
```
116106

107+
Your output should look similar to the following example output:
108+
109+
```azurecli-interactive
117110
apiVersion: v1
118111
clusters:
119112
- cluster:
@@ -138,7 +131,7 @@ users:
138131

139132
## Remove role permissions
140133

141-
To remove role assignments, use the [az role assignment delete][az-role-assignment-delete] command. Specify the account ID and cluster resource ID, as obtained in the previous commands. If you assigned the role to a group rather than a user, specify the appropriate group object ID rather than account object ID for the `--assignee` parameter:
134+
To remove role assignments, use the [`az role assignment delete`][az-role-assignment-delete] command. Specify the account ID and cluster resource ID that you obtained in the previous steps. If you assigned the role to a group rather than a user, specify the appropriate group object ID rather than account object ID for the `--assignee` parameter.
142135

143136
```azurecli-interactive
144137
az role assignment delete --assignee $ACCOUNT_ID --scope $AKS_CLUSTER
@@ -158,7 +151,6 @@ For enhanced security on access to AKS clusters, [integrate Azure Active Directo
158151
[aks-quickstart-powershell]: ./learn/quick-kubernetes-deploy-powershell.md
159152
[azure-cli-install]: /cli/azure/install-azure-cli
160153
[az-aks-get-credentials]: /cli/azure/aks#az_aks_get_credentials
161-
[azure-rbac]: ../role-based-access-control/overview.md
162154
[api-cluster-admin]: /rest/api/aks/managedclusters/listclusteradmincredentials
163155
[api-cluster-user]: /rest/api/aks/managedclusters/listclusterusercredentials
164156
[az-aks-show]: /cli/azure/aks#az_aks_show

articles/app-service/quickstart-html-uiex.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,11 @@ The page is running as an Azure App Service web app.
103103

104104
## 4. Update and redeploy the app
105105

106-
In the Cloud Shell, **type** `nano index.html` to open the nano text editor.
106+
In the Cloud Shell, use `sed` to change "Azure App Service - Sample Static HTML Site" to "Azure App Service".
107107

108-
In the `<h1>` heading tag, change "Azure App Service - Sample Static HTML Site" to "Azure App Service".
109-
110-
![Nano index.html](media/quickstart-html/nano-index-html.png)
111-
112-
**Save** your changes by using command `^O`.
113-
114-
**Exit** nano by using command `^X`.
108+
```bash
109+
sed -i 's/Azure App Service - Sample Static HTML Site/Azure App Service/' index.html
110+
```
115111

116112
Redeploy the app with `az webapp up` command.
117113

articles/app-service/quickstart-html.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ The page is running as an Azure App Service web app.
9696

9797
## Update and redeploy the app
9898

99-
In the Cloud Shell, type `nano index.html` to open the nano text editor. In the `<h1>` heading tag, change "Azure App Service - Sample Static HTML Site" to "Azure App Service", as shown below.
99+
In the Cloud Shell, use `sed` to change "Azure App Service - Sample Static HTML Site" to "Azure App Service".
100100

101-
![Nano index.html](media/quickstart-html/nano-index-html.png)
102-
103-
Save your changes and exit nano. Use the command `^O` to save and `^X` to exit.
101+
```bash
102+
sed -i 's/Azure App Service - Sample Static HTML Site/Azure App Service/' index.html
103+
```
104104

105105
You'll now redeploy the app with the same `az webapp up` command.
106106

articles/app-service/quickstart-ruby.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,7 @@ The Ruby sample code is running in an Azure App Service Linux web app.
263263

264264
### [Azure CLI](#tab/cli)
265265

266-
1. From Azure Cloud Shell, launch a text editor - such as `nano` or `vim` - to edit the file in `app/controllers/application_controller.rb`.
267-
268-
```bash
269-
nano app/controllers/application_controller.rb
270-
```
271-
272-
1. Edit the *ApplicationController* class so that it shows "Hello world from Azure App Service on Linux!" instead of "Hello from Azure App Service on Linux!".
266+
1. From Azure Cloud Shell, launch a text editor and edit the file `app/controllers/application_controller.rb`. Edit the *ApplicationController* class so that it shows "Hello world from Azure App Service on Linux!" instead of "Hello from Azure App Service on Linux!".
273267

274268
```ruby
275269
class ApplicationController < ActionController::Base

articles/app-service/tutorial-multi-container-app.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ The following changes have been made for Redis (to be used in a later section):
257257
* [Adds Redis Object Cache 1.3.8 WordPress plugin.](https://github.com/Azure-Samples/multicontainerwordpress/blob/5669a89e0ee8599285f0e2e6f7e935c16e539b92/docker-entrypoint.sh#L74)
258258
* [Uses App Setting for Redis host name in WordPress wp-config.php.](https://github.com/Azure-Samples/multicontainerwordpress/blob/5669a89e0ee8599285f0e2e6f7e935c16e539b92/docker-entrypoint.sh#L162)
259259

260-
To use the custom image, you'll update your docker-compose-wordpress.yml file. In Cloud Shell, type `nano docker-compose-wordpress.yml` to open the nano text editor. Change the `image: wordpress` to use `image: mcr.microsoft.com/azuredocs/multicontainerwordpress`. You no longer need the database container. Remove the `db`, `environment`, `depends_on`, and `volumes` section from the configuration file. Your file should look like the following code:
260+
To use the custom image, you'll update your docker-compose-wordpress.yml file. In Cloud Shell, open a text editor and change the `image: wordpress` to use `image: mcr.microsoft.com/azuredocs/multicontainerwordpress`. You no longer need the database container. Remove the `db`, `environment`, `depends_on`, and `volumes` section from the configuration file. Your file should look like the following code:
261261

262262
```yaml
263263
version: '3.3'
@@ -270,8 +270,6 @@ services:
270270
restart: always
271271
```
272272
273-
Save your changes and exit nano. Use the command `^O` to save and `^X` to exit.
274-
275273
### Update app with new configuration
276274
277275
In Cloud Shell, reconfigure your multi-container [web app](overview.md) with the [az webapp config container set](/cli/azure/webapp/config/container#az-webapp-config-container-set) command. Don't forget to replace _\<app-name>_ with the name of the web app you created earlier.
@@ -329,7 +327,7 @@ When the app setting has been created, Cloud Shell shows information similar to
329327

330328
### Modify configuration file
331329

332-
In the Cloud Shell, type `nano docker-compose-wordpress.yml` to open the nano text editor.
330+
In the Cloud Shell, opne the file `docker-compose-wordpress.yml` in a text editor.
333331

334332
The `volumes` option maps the file system to a directory within the container. `${WEBAPP_STORAGE_HOME}` is an environment variable in App Service that is mapped to persistent storage for your app. You'll use this environment variable in the volumes option so that the WordPress files are installed into persistent storage instead of the container. Make the following modifications to the file:
335333

articles/applied-ai-services/form-recognizer/concept-insurance-card.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ monikerRange: 'form-recog-3.0.0'
1313
recommendations: false
1414
---
1515

16-
# Azure Form Recognizer health insurance card model (preview)
16+
# Azure Form Recognizer health insurance card model
1717

1818
**This article applies to:** ![Form Recognizer v3.0 checkmark](media/yes-icon.png) **Form Recognizer v3.0**.
1919

20-
> [!IMPORTANT]
21-
>
22-
> * The Form Recognizer Studio health insurance card model is currently in gated preview. Features, approaches and processes may change, prior to General Availability (GA), based on user feedback.
23-
> * Complete and submit the [**Form Recognizer private preview request form**](https://aka.ms/form-recognizer/preview/survey) to request access.
24-
2520
The Form Recognizer health insurance card model combines powerful Optical Character Recognition (OCR) capabilities with deep learning models to analyze and extract key information from US health insurance cards. A health insurance card is a key document for care processing and can be digitally analyzed for patient onboarding, financial coverage information, cashless payments, and insurance claim processing. The health insurance card model analyzes health card images; extracts key information such as insurer, member, prescription, and group number; and returns a structured JSON representation. Health insurance cards can be presented in various formats and quality including phone-captured images, scanned documents, and digital PDFs.
2621

2722
***Sample health insurance card processed using Form Recognizer Studio***

0 commit comments

Comments
 (0)