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/service-connector/includes/code-postgres-me-id.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,6 +100,7 @@ For more tutorials, see [Use Spring Data JDBC with Azure Database for PostgreSQL
100
100
```bash
101
101
pip install azure-identity
102
102
pip install psycopg2-binary
103
+
pip freeze > requirements.txt # Save the dependencies to a file
103
104
```
104
105
1. Get access token using `azure-identity` library and use the token as password. Get connection information from the environment variables added by Service Connector. When using the code below, uncomment the part of the code snippet for the authentication type you want to use.
Copy file name to clipboardExpand all lines: articles/service-connector/includes/install-passwordless-extension.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,11 @@ ms.date: 05/21/2023
6
6
ms.author: xiaofanzhou
7
7
---
8
8
9
-
Install the Service Connector passwordless extension for the Azure CLI:
9
+
Install the latest Service Connector passwordless extension for the Azure CLI:
10
10
11
11
```azurecli-interactive
12
12
az extension add --name serviceconnector-passwordless --upgrade
13
13
```
14
+
15
+
> [!NOTE]
16
+
> Please check the extension "serviceconnector-passwordless" version is "2.0.2" higher by running `az version`. You may need to upgrade Azure CLI first to upgrade the extension version.
Copy file name to clipboardExpand all lines: articles/service-connector/includes/passwordless-tutorial-snippet.md
+30-4Lines changed: 30 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ If you use:
25
25
26
26
::: zone pivot="postgresql"
27
27
28
-
The following Azure CLI command uses a `--client-type` parameter. Run the `az webapp connection create postgres-flexible -h` to get the supported client types, and choose the one that matches your application.
28
+
The following Azure CLI command uses a `--client-type` parameter, it can be java, dotnet, python, etc. Run the `az webapp connection create postgres-flexible -h` to get the supported client types, and choose the one that matches your application.
29
29
30
30
### [User-assigned managed identity](#tab/user)
31
31
@@ -37,7 +37,7 @@ az webapp connection create postgres-flexible \
@@ -50,7 +50,7 @@ az webapp connection create postgres-flexible \
50
50
--server $POSTGRESQL_HOST \
51
51
--database $DATABASE_NAME \
52
52
--system-identity \
53
-
--client-type java
53
+
--client-type $CLIENT_TYPE
54
54
```
55
55
56
56
### [Service principal](#tab/sp)
@@ -63,7 +63,7 @@ az webapp connection create postgres-flexible \
63
63
--server $POSTGRESQL_HOST \
64
64
--database $DATABASE_NAME \
65
65
--service-principal client-id=XX secret=XX\
66
-
--client-type java
66
+
--client-type $CLIENT_TYPE
67
67
```
68
68
69
69
::: zone-end
@@ -191,6 +191,32 @@ This Service Connector command completes the following tasks in the background:
191
191
* For App Service, the configurations are set in the **App Settings** blade.
192
192
* For Spring Apps, the configurations are set when the application is launched.
193
193
* For Container Apps, the configurations are set to the environment variables. You can get all configurations and their values in the **Service Connector** blade in the Azure portal.
194
+
195
+
196
+
Service Connector will assign the following privileges to the user, you can revoke them and adjust the privileges based on your requirements.
197
+
198
+
::: zone pivot="postgresql"
199
+
```
200
+
GRANT ALL PRIVILEGES ON DATABASE "$DATABASE_NAME" TO "username";
201
+
202
+
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "username";
203
+
204
+
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO "username";
205
+
```
206
+
::: zone-end
207
+
208
+
::: zone pivot="mysql"
209
+
```
210
+
211
+
GRANT ALL PRIVILEGES ON $DATABASE_NAME.* TO 'username'@'%';
212
+
```
213
+
::: zone-end
214
+
215
+
::: zone pivot="sql"
216
+
```
217
+
GRANT CONTROL ON DATABASE::"$DATABASE_NAME" TO "username";
218
+
```
219
+
::: zone-end
194
220
195
221
## Connect to a database with Microsoft Entra authentication
Copy file name to clipboardExpand all lines: articles/service-connector/tutorial-passwordless.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ In this tutorial, you use the Azure CLI to complete the following tasks:
28
28
29
29
## Prerequisites
30
30
31
-
*[Azure CLI](/cli/azure/install-azure-cli) version 2.48.1 or higher.
31
+
*[Azure CLI](/cli/azure/install-azure-cli) version 2.61.0 or higher.
32
32
* An Azure account with an active subscription. [Create an Azure account for free](https://azure.microsoft.com/free).
33
33
* An app deployed to [Azure App Service](../app-service/overview.md) in a [region supported by Service Connector](./concept-region-support.md).
34
34
@@ -47,15 +47,16 @@ Finally, deploy your application to an Azure hosting service. That source servic
47
47
48
48
### [App Service](#tab/appservice)
49
49
50
-
For Azure App Service, you can deploy the application code via the `az webapp deploy` command. For more information, see [Quickstart: Deploy an ASP.NET web app](../app-service/quickstart-dotnetcore.md).
50
+
For Azure App Service, you can check the document to choose a way to deploy, see [Quickstart: Deploy an ASP.NET web app](../app-service/quickstart-dotnetcore.md).
51
51
52
52
### [Spring Apps](#tab/springapp)
53
53
54
-
For Azure Spring Apps, you can deploy the application code via the `az spring app deploy` command. For more information, see [Quickstart: Deploy your first application to Azure Spring Apps](../spring-apps/enterprise/quickstart.md).
54
+
For Azure Spring Apps, you can check the document for more details about building app and deployment, see [Build and deploy the app](/azure/developer/java/spring-framework/deploy-passwordless-spring-database-app?#build-and-deploy-the-app).
55
+
55
56
56
57
### [Container Apps](#tab/containerapp)
57
58
58
-
For Azure Container Apps, you can deploy the application code via the `az containerapp create` command. For more information, see [Quickstart: Deploy your first container app](../container-apps/get-started.md).
59
+
For Azure Container Apps, you can check the document about how to deploy your app, see [Quickstart: Deploy your first container app](../container-apps/get-started.md).
0 commit comments