|
| 1 | +--- |
| 2 | +title: Configure Passwordless Database Connections for Java Apps on Red Hat JBoss EAP |
| 3 | +titleSuffix: Azure |
| 4 | +description: Configure passwordless datasource connections for Java apps on Red Hat JBoss EAP. |
| 5 | +author: KarlErickson |
| 6 | +ms.author: karler |
| 7 | +ms.reviewer: haiche |
| 8 | +ms.topic: how-to |
| 9 | +ms.date: 07/01/2025 |
| 10 | +ms.custom: devx-track-azurecli, devx-track-java, devx-track-javaee, devx-track-javaee-wls, devx-track-javaee-wls-aks, devx-track-javaee-wls-vm, has-azure-ad-ps-ref, passwordless-java |
| 11 | +--- |
| 12 | + |
| 13 | +# Configure passwordless database connections for Java apps on Red Hat JBoss EAP |
| 14 | + |
| 15 | +This article shows you how to configure passwordless database connections for Java apps on Red Hat JBoss EAP offers with the Azure portal. |
| 16 | + |
| 17 | +In this guide, you accomplish the following tasks: |
| 18 | + |
| 19 | +> [!div class="checklist"] |
| 20 | +> - Provision database resources using Azure CLI. |
| 21 | +> - Enable the Microsoft Entra administrator in the database. |
| 22 | +> - Provision a user-assigned managed identity and create a database user for it. |
| 23 | +> - Configure a passwordless database connection in Red Hat JBoss EAP offers with the Azure portal. |
| 24 | +> - Validate the database connection. |
| 25 | +
|
| 26 | +The offers support passwordless connections for Azure database for PostgreSQL and Azure SQL databases. |
| 27 | + |
| 28 | +[!INCLUDE [how-to-configure-passwordless-datasource-non-appserver](includes/how-to-configure-passwordless-datasource-non-appserver.md)] |
| 29 | + |
| 30 | +## Configure a passwordless database connection for Red Hat JBoss EAP on Azure VMs |
| 31 | + |
| 32 | +Before proceeding, ensure that the Azure identity you use to sign in and complete this article has either the [Owner](/azure/role-based-access-control/built-in-roles#owner) role in the current subscription or the [Contributor](/azure/role-based-access-control/built-in-roles#contributor) and [User Access Administrator](/azure/role-based-access-control/built-in-roles#user-access-administrator) roles in the current subscription. For an overview of Azure roles, see [What is Azure role-based access control (Azure RBAC)?](/azure/role-based-access-control/overview) For details on the specific roles required by Oracle WebLogic marketplace offer, see [Azure built-in roles](/azure/role-based-access-control/built-in-roles). |
| 33 | + |
| 34 | +This section shows you how to configure the passwordless data source connection using the Azure Marketplace offers for Red Hat JBoss EAP. |
| 35 | + |
| 36 | +First, begin the process of deploying an offer. The following offers support passwordless database connections: |
| 37 | + |
| 38 | +- [JBoss EAP Standalone on RHEL VM](https://aka.ms/eap-vm-single-portal) |
| 39 | +- [JBoss EAP Cluster on RHEL VMs](https://aka.ms/eap-vm-cluster-portal). For more information, see [Quickstart: Deploy a JBoss EAP cluster on Azure Virtual Machines (VMs)](/azure/virtual-machines/workloads/redhat/jboss-eap-azure-vm). |
| 40 | + |
| 41 | +Enter the required information in the **Basics** pane and other panes if you want to enable the features. When you reach the **Database** pane, enter the passwordless configuration as shown in the following steps: |
| 42 | + |
| 43 | +1. For **Connect to database?**, select **Yes**. |
| 44 | +1. Under **Connection settings**, for **Choose database type**, open the dropdown menu and then select **Azure SQL (with support for passwordless connection)**. |
| 45 | +1. For **JNDI Name**, enter **testpasswordless** or your expected value. |
| 46 | +1. For **DataSource Connection String**, input the connection string you obtained in last section. |
| 47 | +1. Select **Use passwordless datasource connection**. |
| 48 | +1. For **User assigned managed identity**, select the managed identity you created in previous step. In this example, its name is **myManagedIdentity**. |
| 49 | +1. Select **Add**. |
| 50 | + |
| 51 | +The **Connection settings** section should look like the following screenshot: |
| 52 | + |
| 53 | +:::image type="content" source="media/how-to-configure-passwordless-datasource-websphere/azure-portal-azure-sql-configuration.png" alt-text="Screenshot of the Azure portal that shows the Choose database type page." lightbox="media/how-to-configure-passwordless-datasource-websphere/azure-portal-azure-sql-configuration.png"::: |
| 54 | + |
| 55 | +## Verify the database connection |
| 56 | + |
| 57 | +The database connection is configured successfully if the offer deployment completes without error. |
| 58 | + |
| 59 | +After the deployment completes, follow these steps in the Azure portal to find the Admin console URL. |
| 60 | + |
| 61 | +1. Find the resource group in which you deployed WebSphere. |
| 62 | +1. Under **Settings**, select **Deployments**. |
| 63 | +1. Select the deployment with the longest **Duration**. This deployment should be at the bottom of the list. |
| 64 | +1. Select **Outputs**. |
| 65 | +1. The URL of the Integrated Solutions Console is the value of the **adminSecuredConsole** output. |
| 66 | +1. Copy the value of the output variable **adminSecuredConsole**. |
| 67 | +1. Paste the value into your browser address bar and press <kbd>Enter</kbd> to open the sign-in page of the Integrated Solutions Console. |
| 68 | + |
| 69 | +Use the following steps to verify the database connection: |
| 70 | + |
| 71 | +1. Sign in to the Integrated Solutions Console with the username and password you provided on the **Basics** pane. |
| 72 | +1. In the navigation pane, expand **Resources** then **JDBC**. |
| 73 | +1. Select **Data sources**. |
| 74 | +1. Select the check box next to the row with the **JNDI name** value matching the value you entered in the **Database** tab. |
| 75 | +1. Select **Test connection**. |
| 76 | +1. You should see a message stating something similar to `The test connection operation for data source dataSource-sqlserver on server server1 at node was0aef4a-vmNode01 was successful.` |
| 77 | + |
| 78 | +The following screenshot highlights the relevant user interface elements: |
| 79 | + |
| 80 | +:::image type="content" source="media/how-to-configure-passwordless-datasource-websphere/screenshot-twas-console-successful-database.png" alt-text="Screenshot of the Integrated solutions console that shows the test database page." lightbox="media/how-to-configure-passwordless-datasource-websphere/screenshot-twas-console-successful-database.png"::: |
| 81 | + |
| 82 | +## Clean up resources |
| 83 | + |
| 84 | +If you don't need these resources, you can delete them by using the following commands: |
| 85 | + |
| 86 | +```azurecli-interactive |
| 87 | +az group delete --name ${RESOURCE_GROUP_NAME} |
| 88 | +az group delete --name <resource-group-name-that-deploys-the-offer> |
| 89 | +``` |
| 90 | + |
| 91 | +## Next steps |
| 92 | + |
| 93 | +Learn more about running WebSphere Application Server on AKS, Azure RedHat OpenShift, or virtual machines by following these links: |
| 94 | + |
| 95 | +> [!div class="nextstepaction"] |
| 96 | +> [Explore IBM WebSphere products on Azure](websphere-family.md) |
| 97 | +
|
| 98 | +> [!div class="nextstepaction"] |
| 99 | +> [Migrate WebSphere applications to AKS](../migration/migrate-websphere-to-azure-kubernetes-service.md?toc=/azure/developer/java/ee/toc.json&bc=/azure/developer/java/breadcrumb/toc.json) |
| 100 | +
|
| 101 | +> [!div class="nextstepaction"] |
| 102 | +> [Migrate WebSphere applications to Azure Red Hat OpenShift](../migration/migrate-websphere-to-azure-redhat-openshift.md?toc=/azure/developer/java/ee/toc.json&bc=/azure/developer/java/breadcrumb/toc.json) |
| 103 | +
|
| 104 | +> [!div class="nextstepaction"] |
| 105 | +> [Migrate WebSphere applications to Azure Virtual Machines](../migration/migrate-websphere-to-virtual-machines.md?toc=/azure/developer/java/ee/toc.json&bc=/azure/developer/java/breadcrumb/toc.json) |
0 commit comments