Announcing the stable release of Spring Cloud Azure 4.5.0
Published Dec 19 2022 06:28 PM 1,701 Views
Microsoft

We're pleased to announce that Spring Cloud Azure version 4.5.0 has been released and is available from Maven Central. This release is compatible with:

 

  • Spring Boot versions:
    • 2.5.0 through 2.5.14
    • 2.6.0 through 2.6.14
    • 2.7.0 through 2.7.6
  • Spring Cloud versions:
    • 2020.0.3 through 2020.0.6
    • 2021.0.0 through 2021.0.5

 

NOTE: Spring Boot 2.5.x (x > 14), 2.6.y (y > 14), and 2.7.z (z > 6) should be supported, but they weren't tested with this release.
Spring Cloud 2020.0.x (x > 6) and 2021.0.y (y > 5) should be supported, but they weren't tested with this release.

 

 The 4.5.0 release focused on improving support for passwordless connections. This release is our first stable version to support passwordless connections to Azure Database for MySQL and Azure Database for PostgreSQL. For a complete list of changes, see the release notes.

 

The Spring Cloud Azure team will continue to focus on passwordless features. Azure SQL Database, Azure Cosmos DB, Azure Redis, Azure Service Bus JMS, and other services will support passwordless connections in the future.

 

passwordless-connections-from-java-apps-to-data-services.jpg

 

Connect to Azure Database for MySQL and PostgreSQL via passwordless connections

 

NOTE: This feature is only available in version 4.5.0.

 

Both Azure Database for MySQL and Azure Database for PostgreSQL support integration with Azure Active Directory (Azure AD). This integration allows you to authenticate using Azure AD users, applications, or managed identities.

 

NOTE: This feature applies to both Single Server and Flexible Server variants of Azure Database for MySQL and PostgreSQL.

 

To authenticate in a passwordless manner, complete the following steps:

 

1. Add the dependencies:

 

MySQL:

 

<dependency>
    <groupId>com.azure.spring</groupId>
    <artifactId>spring-cloud-azure-starter-jdbc-mysql</artifactId>
    <version>4.5.0</version>
</dependency>

 

 

PostgreSQL:

 

<dependency>
    <groupId>com.azure.spring</groupId>
    <artifactId>spring-cloud-azure-starter-jdbc-postgresql</artifactId>
    <version>4.5.0</version>
</dependency>

 

NOTE: The dependencies will be automatically imported if you choose Azure Support and MySQL/PostgreSQL Driver dependency in Spring Initializr.

 

2. Configure the properties:

 

spring:
  datasource:
    url: jdbc:mysql://${AZ_DATABASE_SERVER_NAME}.mysql.database.azure.com:3306/${AZ_DATABASE_NAME}
    username: ${AZ_AD_USERNAME}
    azure:
      passwordless-enabled: true

 

NOTE: If you're using PostgreSQL, change the `spring.datasource.url` property value to something like `jdbc:postgresql://${AZ_DATABASE_SERVER_NAME}.postgres.database.azure.com:5432/${AZ_DATABASE_NAME}`.

 

In addition, we designed this Azure Developer CLI template. The template allows you to more easily experience the PostgreSQL passwordless feature on Azure. It uses the service's Flexible Server variant along with Azure Container Apps.

Other features added

 

  • Remove warning logs of Kafka passwordless autoconfiguration #31182
  • Enhance the token authentication converter and Azure AD Resource Server configurer adapter to accept the custom JWT granted authorities converter #28665

 

Dependency upgrades

 

In this release, the following dependencies were upgraded:

  • spring-security to 5.7.5 to address CVE-2022-31690
  • Azure SDK BOM to 1.2.8
  • Azure Identity to 1.7.1
  • Azure Identity Extensions to 1.0.0
  • Azure Spring Data Cosmos to 3.30.0
  • Azure Resource Manager to 2.21.0

 

Feedback

 

As always, we welcome feedback and contributions. Reach out to us on StackOverflow or GitHub.

 

Resources

 

Here's a list of links that are helpful to learn more about Spring Cloud Azure:

Co-Authors
Version history
Last update:
‎Dec 19 2022 06:22 PM
Updated by: