An Azure managed PostgreSQL database service for app development and deployment.
Hi @Kanhaiya Sharma,
Thank you for the update.
To connect your on-premises Java application to an Azure Database for PostgreSQL - Flexible Server using managed identity, you can follow these steps:
- Create a User-Assigned Managed Identity: Since system-assigned managed identities are only available for Azure resources, you need to create a user-assigned managed identity for your on-premises application.
- Assign the Managed Identity to the PostgreSQL Server: Grant the managed identity the necessary permissions to access the Azure Database for PostgreSQL. This can be done through the Azure portal or using Azure CLI.
- Configure Your Java Application: Update your Java application to use the managed identity for authentication. This involves configuring the application to obtain an access token from Azure AD and using it to connect to the PostgreSQL database.
Authentication Process: The Java application will use the managed identity to obtain an access token from Azure AD. This token is then used to authenticate and connect to the PostgreSQL database.
Please refer to the below mentioned links for more information.
I hope this information helps. Please do let us know if you have any further queries.