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: articles/mysql/flexible-server/concepts-azure-ad-authentication.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Microsoft Azure Active Directory (Azure AD) authentication is a mechanism of con
29
29
30
30
1. Select your preferred authentication method for accessing the MySQL flexible server. By default, the authentication selected will be MySQL authentication only. Select Azure Active Directory authentication only or MySQL and Azure Active Directory authentication to enabled Azure AD authentication.
31
31
2. Select the user managed identity (UMI) with the following privileges: _User.Read.All, GroupMember.Read.All_ and _Application.Read.ALL_, which can be used to configure Azure AD authentication.
32
-
3. Add Azure AD Admin. It can be Azure AD Users, Groups or security principles, which will have access to Azure Database for MySQL flexible server.
32
+
3. Add Azure AD Admin. It can be Azure AD Usersor Groups, which will have access to Azure Database for MySQL flexible server.
33
33
4. Create database users in your database mapped to Azure AD identities.
34
34
5. Connect to your database by retrieving a token for an Azure AD identity and logging in.
35
35
@@ -38,16 +38,16 @@ Microsoft Azure Active Directory (Azure AD) authentication is a mechanism of con
38
38
39
39
## Architecture
40
40
41
-
User-managed identities are required for Azure Active Directory authentication. When a User-Assigned Identity is linked to the flexible server, the Managed Identity Resource Provider (MSRP) issues a certificate internally to that identity, and when the managed identity is deleted, the corresponding service principal is automatically removed. The service then uses the managed identity to request access tokens for services that support Azure AD authentication. Only a User-assigned Managed Identity (UMI) is currently supported by Azure Database for MySQL-Flexible Server. For more information, see [Managed identity types](../../active-directory/managed-identities-azure-resources/overview.md#managed-identity-types) in Azure. Azure takes care of rolling the credentials that are used by the service instance.
41
+
User-managed identities are required for Azure Active Directory authentication. When a User-Assigned Identity is linked to the flexible server, the Managed Identity Resource Provider (MSRP) issues a certificate internally to that identity, and when the managed identity is deleted, the corresponding service principal is automatically removed. The service then uses the managed identity to request access tokens for services that support Azure AD authentication. Only a User-assigned Managed Identity (UMI) is currently supported by Azure Database for MySQL-Flexible Server. For more information, see [Managed identity types](../../active-directory/managed-identities-azure-resources/overview.md#managed-identity-types) in Azure.
42
42
43
43
The following high-level diagram summarizes how authentication works using Azure AD authentication with Azure Database for MySQL. The arrows indicate communication pathways.
44
44
45
45
:::image type="content" source="media/concepts-azure-ad-authentication/azure-ad-authentication-flow.jpg" alt-text="Diagram of how Azure ad authentication works.":::
46
46
47
47
1. Your application can request a token from the Azure Instance Metadata Service identity endpoint.
48
48
2. Using the client ID and certificate, a call is made to Azure AD to request an access token.
49
-
3. A JSON Web Token (JWT) access token is returned by Azure AD.
50
-
4.Your application sends the access token on a call to Azure Database for MySQL flexible server.
49
+
3. A JSON Web Token (JWT) access token is returned by Azure AD. Your application sends the access token on a call to Azure Database for MySQL flexible server.
50
+
4.MySQL flexible server validates the token with Azure AD.
51
51
52
52
## Administrator structure
53
53
@@ -56,24 +56,26 @@ When using Azure AD authentication, there are two Administrator accounts for the
56
56
:::image type="content" source="media/concepts-azure-ad-authentication/azure-ad-admin-structure.jpg" alt-text="Diagram of Azure ad admin structure.":::
57
57
58
58
Methods of authentication for accessing the MySQL flexible server include:
59
-
- MySQL Authentication only - Create a MySQL admin login and password to access your MySQL server with MySQL authentication.
60
-
- Only Azure AD authentication - Authenticate as an Azure AD admin using an existing Azure AD user or group; the server parameter **aad_auth_only** will be _enabled_.
61
-
- Authentication with MySQL and Azure AD - Authenticate using MySQL admin credentials or as an Azure AD admin using an existing Azure AD user or group; the server parameter **aad_auth_only** will be _disabled_.
59
+
- MySQL Authentication only - This is the default option. This is the default option. Only native MySQL Authentication with a MySQL login and password will be used to access Azure Database for MySQL flexible server.
60
+
- Only Azure AD authentication - MySQL Native authentication will be disabled, and users will be able to authenticate using only their Azure AD user and token. To enable this mode, the server parameter **aad_auth_only** will be _enabled_.
61
+
- Authentication with MySQL and Azure AD - Both native MySQL authentication and Azure AD authentication are supported. To enable this mode, the server parameter **aad_auth_only** will be _disabled_.
62
62
63
63
## Permissions
64
64
65
65
To allow the UMI to read from Microsoft Graph as the server identity, the following permissions are required. Alternatively, give the UMI the [Directory Readers](../../active-directory/roles/permissions-reference.md#directory-readers) role.
66
66
67
-
These permissions should be granted before you provision a logical server or managed instance. After you grant the permissions to the UMI, they're enabled for all servers or instances that are created with the UMI assigned as a server identity.
68
-
69
67
> [!IMPORTANT]
70
68
> Only a [Global Administrator](/azure/active-directory/roles/permissions-reference#global-administrator) or [Privileged Role Administrator](/azure/active-directory/roles/permissions-reference#privileged-role-administrator) can grant these permissions.
71
69
72
70
-[User.Read.All](/graph/permissions-reference#user-permissions): Allows access to Azure AD user information.
73
71
-[GroupMember.Read.All](/graph/permissions-reference#group-permissions): Allows access to Azure AD group information.
74
72
-[Application.Read.ALL](/graph/permissions-reference#application-resource-permissions): Allows access to Azure AD service principal (application) information.
75
73
76
-
To create a new Azure AD database user, you must connect as the Azure AD administrator. This is demonstrated in Configure and Login with Azure AD for Azure Database for MySQL.
74
+
For guidance about how to grant and use the permissions, refer [Microsoft Graph permissions](/graph/permissions-reference)
75
+
76
+
After you grant the permissions to the UMI, they're enabled for all servers or instances that are created with the UMI assigned as a server identity.
77
+
78
+
To create a new Azure AD database user, you must connect as the Azure AD administrator.
77
79
78
80
Any Azure AD authentication is only possible if the Azure AD admin was created for Azure Database for MySQL Flexible server. If the Azure Active Directory admin was removed from the server, existing Azure Active Directory users created previously can no longer connect to the database using their Azure Active Directory credentials.
79
81
@@ -117,4 +119,4 @@ Please note that management operations, such as adding new users, are only suppo
117
119
118
120
## Next steps
119
121
120
-
- To learn how to create and populate Azure AD, and then configure Azure AD with Azure Database for MySQL, see [Set up Azure Active Directory authentication for Azure Database for MySQL flexible server](how-to-azure-ad.md)
122
+
- To learn how to configure Azure AD with Azure Database for MySQL, see [Set up Azure Active Directory authentication for Azure Database for MySQL flexible server](how-to-azure-ad.md)
Copy file name to clipboardExpand all lines: articles/mysql/flexible-server/how-to-azure-ad.md
+18-11Lines changed: 18 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,33 +23,38 @@ In this tutorial, you learn how to:
23
23
24
24
## Configure the Azure AD Admin
25
25
26
-
Only an Azure AD Admin user can create/enable users for Azure AD-based authentication. To create an Azure AD Admin user, please follow the following steps.
26
+
To create an Azure AD Admin user, please follow the following steps.
27
27
28
28
- In the Azure portal, select the instance of Azure Database for MySQL Flexible server that you want to enable for Azure AD.
29
29
30
-
- Under Security pane, select Authentication:
30
+
- Under Security pane, select **Authentication**:
31
31
:::image type="content" source="media//how-to-azure-ad/azure-ad-configuration.jpg" alt-text="Diagram of how to configure Azure ad authentication.":::
32
32
33
33
- There are three types of authentication available:
34
34
35
-
- MySQL authentication only – By default, MySQL uses the built-in mysql_native_password authentication plugin, which performs authentication using the native password hashing method
35
+
-**MySQL authentication only** – By default, MySQL uses the built-in mysql_native_password authentication plugin, which performs authentication using the native password hashing method
36
36
37
-
- Azure Active Directory authentication only – Only allows authentication with an Azure AD account. Disables mysql_native_password authentication and turns _ON_ the server parameter **aad_auth_only**
37
+
-**Azure Active Directory authentication only** – Only allows authentication with an Azure AD account. Disables mysql_native_password authentication and turns _ON_ the server parameter aad_auth_only
38
38
39
-
- MySQL and Azure Active Directory authentication – Allows authentication using a native MySQL password or an Azure AD account. Turns _OFF_ the server parameter **aad_auth_only**
39
+
-**MySQL and Azure Active Directory authentication** – Allows authentication using a native MySQL password or an Azure AD account. Turns _OFF_ the server parameter aad_auth_only
40
40
41
-
- Select Identity – Select/Add User assigned managed identity. To allow the UMI to read from Microsoft Graph as the server identity, the following permissions are required. Alternatively, give the UMI the [Directory Readers](../../active-directory/roles/permissions-reference.md#directory-readers) role.
41
+
> [!NOTE]
42
+
> The server parameter aad_auth_only stays set to ON when the authentication type is changed to Azure Active Directory authentication only. We recommend disabling it manually when you opt for MySQL authentication only in the future.
43
+
44
+
-**Select Identity** – Select/Add User assigned managed identity. To allow the UMI to read from Microsoft Graph as the server identity, the following permissions are required. Alternatively, give the UMI the [Directory Readers](../../active-directory/roles/permissions-reference.md#directory-readers) role.
42
45
43
46
-[User.Read.All](/graph/permissions-reference#user-permissions): Allows access to Azure AD user information.
44
47
-[GroupMember.Read.All](/graph/permissions-reference#group-permissions): Allows access to Azure AD group information.
45
48
-[Application.Read.ALL](/graph/permissions-reference#application-resource-permissions): Allows access to Azure AD service principal (application) information.
46
49
47
-
These permissions should be granted before you provision a logical server or managed instance. After you grant the permissions to the UMI, they're enabled for all servers or instances that are created with the UMI assigned as a server identity.
50
+
For guidance about how to grant and use the permissions, refer [Microsoft Graph permissions](/graph/permissions-reference)
51
+
52
+
After you grant the permissions to the UMI, they're enabled for all servers or instances that are created with the UMI assigned as a server identity.
48
53
49
54
> [!IMPORTANT]
50
55
> Only a [Global Administrator](/azure/active-directory/roles/permissions-reference#global-administrator) or [Privileged Role Administrator](/azure/active-directory/roles/permissions-reference#privileged-role-administrator) can grant these permissions.
51
56
52
-
- Select a valid Azure AD user or an Azure AD group in the customer tenant to be Azure AD administrator. Once Azure AD authentication support has been enabled, Azure AD Admins can be added as security principals with permissions to add Azure AD Users to the MySQL server.
57
+
- Select a valid Azure AD user or an Azure AD group in the customer tenant to be **Azure AD administrator**. Once Azure AD authentication support has been enabled, Azure AD Admins can be added as security principals with permissions to add Azure AD Users to the MySQL server.
53
58
54
59
> [!NOTE]
55
60
> Only one Azure AD admin can be created per MySQL server and selection of another one will overwrite the existing Azure AD admin configured for the server.
@@ -141,6 +146,9 @@ The access token validity is anywhere between 5 minutes to 60 minutes. We recomm
141
146
142
147
When connecting you need to use the access token as the MySQL user password. When using GUI clients such as MySQLWorkbench, you can use the method described above to retrieve the token.
143
148
149
+
> [!NOTE]
150
+
> The newly restored server will also have the server parameter aad_auth_only set to ON if it was ON on the source server during failover. If you wish to use MySQL authentication on the restored server, you must manually disable this server parameter. Otherwise, an Azure AD Admin must be configured.
151
+
144
152
#### Using MySQL CLI
145
153
When using the CLI, you can use this short-hand to connect:
146
154
@@ -151,13 +159,12 @@ mysql -h mydb.mysql.database.azure.com \
* Launch MySQL Workbench and Click the Database option, then click "Connect to database"
159
166
* In the hostname field, enter the MySQL FQDN eg. mysql.database.azure.com
160
-
* In the username field, enter the MySQL Azure Active Directory administrator name and append this with MySQL server name, not the FQDN e.g. [email protected]@
167
+
* In the username field, enter the MySQL Azure Active Directory administrator name and append this with MySQL server name, not the FQDN e.g. [email protected]
161
168
* In the password field, click "Store in Vault" and paste in the access token from file e.g. C:\temp\MySQLAccessToken.txt
162
169
* Click the advanced tab and ensure that you check "Enable Cleartext Authentication Plugin"
Copy file name to clipboardExpand all lines: articles/mysql/flexible-server/whats-new.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,15 @@ This article summarizes new releases and features in Azure Database for MySQL -
28
28
29
29
The read replica feature allows you to replicate data from an Azure Database for MySQL flexible server to a read-only server. You can replicate the source server to up to 10 replicas. This functionality is now extended to support HA enabled servers within same region.[Learn more](concepts-read-replicas.md)
30
30
31
-
32
-
33
31
-**Azure Active Directory authentication for Azure Database for MySQL – Flexible Server (Public Preview)**
34
32
35
33
You can now authenticate to Azure Database for MySQL - Flexible server using Microsoft Azure Active Directory (Azure AD) using identities. With Azure AD authentication, you can manage database user identities and other Microsoft services in a central location, which simplifies permission management. [Learn More](concepts-azure-ad-authentication.md)
36
34
35
+
-**Known issues**
37
36
37
+
- The server parameter aad_auth_only stays set to ON when the authentication type is changed to Azure Active Directory authentication only. We recommend disabling it manually when you opt for MySQL authentication only in the future.
38
+
39
+
- The newly restored server will also have the server parameter aad_auth_only set to ON if it was ON on the source server during failover. If you wish to use MySQL authentication on the restored server, you must manually disable this server parameter. Otherwise, an Azure AD Admin must be configured.
38
40
39
41
-**Customer managed keys data encryption – Azure Database for MySQL – Flexible Server (Preview)**
40
42
@@ -43,6 +45,13 @@ This article summarizes new releases and features in Azure Database for MySQL -
43
45
-**Change Timezone of your Azure Database for MySQL - Flexible Server in a single step**
44
46
45
47
Previously to change time_zone of your Azure Database for MySQL - Flexible Server required two steps to take effect. Now you no longer need to call the procedure mysql.az_load_timezone() to populate the mysql.time_zone_name table. Flexible Server timezone can be changed directly by just changing the server parameter time_zone from [portal](./how-to-configure-server-parameters-portal.md#working-with-the-time-zone-parameter) or [CLI](./how-to-configure-server-parameters-cli.md#working-with-the-time-zone-parameter).
48
+
49
+
-**Known issues**
50
+
51
+
- The server parameter aad_auth_only stays set to ON when the authentication type is changed to Azure Active Directory authentication only. We recommend disabling it manually when you opt for MySQL authentication only in the future.
52
+
53
+
- The newly restored server will also have the server parameter aad_auth_only set to ON if it was ON on the source server during failover. If you wish to use MySQL authentication on the restored server, you must manually disable this server parameter. Otherwise, an Azure AD Admin must be configured.
54
+
46
55
## August 2022
47
56
48
57
-**Server logs for Azure Database for MySQL - Flexible Server**
0 commit comments