Skip to content

Spring Cloud Azure 4.0.0

Compare
Choose a tag to compare
@saragluna saragluna released this 01 Apr 12:14
· 8331 commits to main since this release
ffb7f70
  • This release is compatible with Spring Boot 2.5.0-2.5.11, 2.6.0-2.6.5. (Note: 2.5.x (x>11) and 2.6.y (y>5) should be supported, but they aren't tested with this release.)
  • This release is compatible with Spring Cloud 2020.0.3-2020.0.5, 2021.0.0-2021.0.1. (Note: 2020.0.x (x>5) and 2021.0.y (y>1) should be supported, but they aren't tested with this release.)

Dependency Updates

  • Upgrade dependency according to spring-boot-dependencies:2.6.3 and spring-cloud-dependencies:2021.0.0.

Features Added

  • Add Automatic-Module-Name for all Spring Cloud Azure modules and change the root pacakge names to match the module names #27350, #27420.

Spring Cloud Azure Dependencies (BOM)

Dependency Updates

  • Delete the direct reference of following Azure SDKs #27850:
    • azure-core
    • azure-core-management
    • azure-core-amqp
    • azure-cosmos
    • azure-data-appconfiguration
    • azure-identity
    • azure-messaging-eventhubs
    • azure-messaging-eventhubs-checkpointstore-blob
    • azure-messaging-servicebus
    • azure-security-keyvault-certificates
    • azure-security-keyvault-secrets
    • azure-storage-blob
    • azure-storage-file-share
    • azure-storage-queue
    • azure-core-serializer-json-jackson
  • Import azure-sdk-bom:1.2.0 #27850.
  • Use azure-cosmos:4.28.0 instead of the version 4.27.0 in azure-sdk-bom #27850.
  • Upgrade azure-resourcemanager to 2.13.0.
  • Upgrade azure-spring-data-cosmos to 3.19.0.

Spring Cloud Azure Starter Active Directory

This section includes changes in spring-cloud-azure-starter-active-directory module.

Breaking Changes

  • Delete the AAD conditional access filter. #27727
  • Rename classes and methods #27273, #27579:
    • Rename classes from AAD/AADB2C to Aad/AadB2c.
    • Rename method in UserPrincipal from getKid to getKeyId.
    • Rename methods in AADAuthenticationProperties from allowedGroupIdsConfigured/allowedGroupNamesConfigured to isAllowedGroupIdsConfigured/isAllowedGroupNamesConfigured.
    • Rename methods in AADAuthorizationServerEndpoints from authorizationEndpoint/endSessionEndpoint/jwkSetEndpoint/tokenEndpoint to getAuthorizationEndpoint/getEndSessionEndpoint/getJwkSetEndpoint/getTokenEndpoint.
    • Rename method in UserGroupProperties from getUseTransitiveMembers to isUseTransitiveMembers.
  • Improve AadJwt*Validator and AadTokenClaim #27365:
    • Delete AadJwtClaimValidator and use JwtClaimValidator instead.
    • Delete AadJwtAudienceValidator and use JwtClaimValidator instead.
    • Rename AadTokenClaim to AadJwtClaimNames.

Features Added

  • Support constructing AadOAuth2AuthorizationRequestResolver with authorizationRequestBaseUri #26494.
  • Make AadWebSecurityConfigurerAdapter more configurable #27802.

Dependency Updates

  • Delete the dependencies org.springframework.boot:spring-boot-starter-webflux, com.fasterxml.jackson.core:jackson-databind, io.projectreactor.netty:reactor-netty #27727.

Spring Cloud Azure Autoconfigure

This section includes changes in spring-cloud-azure-autoconfigure module.

Breaking Changes

  • Refactor retry options #27332, #27586.
    • Delete properties spring.cloud.azure.retry.timeout and spring.cloud.azure.<azure-service>.retry.timeout.
    • Add properties spring.cloud.azure.retry.amqp.try-timeout and spring.cloud.azure.<azure-amqp-service>.retry.try-timeout instead. (<azure-amqp-service> means this option only applies to AMQP-based service clients).
    • Delete properties spring.cloud.azure.retry.back-off.max-attempts, spring.cloud.azure.retry.back-off.delay, spring.cloud.azure.retry.back-off.max-delay, and spring.cloud.azure.retry.backoff.multiplier.
    • Delete properties spring.cloud.azure.<azure-service>.retry.back-off.max-attempts, spring.cloud.azure.<azure-service>.retry.back-off.delay, spring.cloud.azure.<azure-service>.retry.back-off..max-delay, and spring.cloud.azure.<azure-service>.retry.backoff.multiplier.
    • Add properties spring.cloud.azure.retry.mode, spring.cloud.azure.<azure-service>.retry.mode, spring.cloud.azure.retry.exponential.*, spring.cloud.azure.<azure-service>.retry.exponential.*, spring.cloud.azure.retry.fixed*, and spring.cloud.azure.<azure-service>.retry.fixed.* instead:
      • spring.cloud.azure.retry.exponential.base-delay.
      • spring.cloud.azure.retry.exponential.max-delay.
      • spring.cloud.azure.retry.exponential.max-retries.
      • spring.cloud.azure.retry.fixed.delay.
      • spring.cloud.azure.retry.fixed.max-retries.
  • Refactor proxy options #27402:
    • Change spring.cloud.azure.<azure-service>.proxy.authentication-type to spring.cloud.azure.<azure-amqp-service>.proxy.authentication-type. (<azure-amqp-service> means this property only applies to AMQP-based service clients).
    • Delete spring.cloud.azure.proxy.authentication-type and add spring.cloud.azure.proxy.amqp.authentication-type instead.
  • Refactor client options #27402:
    • Change spring.cloud.azure.<azure-service>.client.headers to spring.cloud.azure.<azure-http-service>.client.headers. (<azure-http-service> means this property only applies to HTTP-based service clients).
    • Delete spring.cloud.azure.client.headers and add spring.cloud.azure.client.http.headers instead.
  • Rename properties spring.cloud.azure.profile.cloud and spring.cloud.azure.<azure-service>.cloud to spring.cloud.azure.profile.cloud-type and spring.cloud.azure.<azure-service>.cloud-type #27258.
  • Delete properties spring.cloud.azure.credential.managed-identity-client-id and spring.cloud.azure.<azure-service>.credential.managed-identity-client-id. Add spring.cloud.azure.credential.managed-identity-enabled and spring.cloud.azure.<azure-service>.credential.managed-identity-enabled instead #27118, #27258.
  • Change type of JWK/JWT time duration properties from int/long to Duration #27579:
    • spring.cloud.azure.active-directory.jwt-connect-timeout and spring.cloud.azure.active-directory.b2c.jwt-connect-timeout.
    • spring.cloud.azure.active-directory.jwt-read-timeout and spring.cloud.azure.active-directory.b2c.jwt-read-timeout.
    • spring.cloud.azure.active-directory.jwk-set-cache-lifespan.
    • spring.cloud.azure.active-directory.jwk-set-cache-refresh-time.
  • Delete deprecated properties for AAD #26598:
    • spring.cloud.azure.active-directory.allow-telemetry.
    • spring.cloud.azure.active-directory.active-directory-groups.
    • spring.cloud.azure.active-directory.authorization-clients.graph.on-demand
    • spring.cloud.azure.active-directory.user-group.allowed-groups.
    • spring.cloud.azure.active-directory.user-group.enable-full-list.
  • Delete deprecated properties for AAD B2C #26598:
    • spring.cloud.azure.active-directory.b2c.allow-telemetry.
    • spring.cloud.azure.active-directory.b2c.tenant.
  • Delete properties spring.cloud.azure.cosmos.permissions. Please use the builder customizer instead. #27236.
  • Delete properties spring.cloud.azure.cosmos.gateway-connection.proxy. Please use spring.cloud.azure.cosmos.proxy instead #27241.
  • Rename property spring.cloud.azure.eventhubs.processor.partition-ownership-expiration-interval to spring.cloud.azure.eventhubs.processor.load-balancing.partition-ownership-expiration-interval #27331.
  • Change KeyVaultPropertySource's configuration properties 27651:
    • Property spring.cloud.azure.keyvault.secret.enabled only used to disable autoconfigure SecretClient bean, it can't be used to disable inserting KeyVaultPropertySource. Use spring.cloud.azure.keyvault.secret.property-source-enabled to disable inserting KeyVaultPropertySource.
    • Property spring.cloud.azure.keyvault.secret.endpoint only used to autoconfigure SecretClient bean, it can't be used to configure KeyVaultPropertySource. Use spring.cloud.azure.keyvault.secret.property-sources[].endpoint to configure KeyVaultPropertySource.
    • For properties like credential, profile, client, proxy, retry, if spring.cloud.azure.keyvault.secret.property-sources[].xxx is not configured, it will only take value from spring.cloud.azure.xxx, not take value from spring.cloud.azure.keyvault.secret.xxx anymore.
    • Conclusion:
      • Here are all SecretClient bean related properties: spring.cloud.azure.keyvault.secret.enabled, spring.cloud.azure.keyvault.secret.xxx, spring.cloud.azure.xxx.
      • Here are all KeyVaultPropertySource related properties: spring.cloud.azure.keyvault.secret.property-source-enabled, spring.cloud.azure.keyvault.secret.property-sources[].xxx, spring.cloud.azure.xxx.
  • Enhance autoconfiguration for a Storage File Share client #26645:
    • Add auto-configuration for File Share directory client.
    • Rename property spring.cloud.azure.storage.fileshare.file-name to spring.cloud.azure.storage.fileshare.file-path.
    • Add property spring.cloud.azure.storage.fileshare.directory-path.
  • Delete EventHubsInitializationContextConsumer, EventHubsCloseContextConsumer, EventHubsErrorContextConsumer and ServiceBusErrorContextConsumer. Please use Consumer<> directly if you want to configure them #27288.
  • Delete the bean of EventHubsProcessorContainer in the autoconfiguration for Event Hubs Spring Messaging support. When needed, a user-defined EventHubsMessageListenerContainer bean should be provided for the replacement #27216.
  • Delete the bean of ServiceBusProcessorContainer in the autoconfiguration for Service Bus Spring Messaging support. When needed, a user-defined ServiceBusMessageListenerContainer bean should be provided for the replacement #27216.
  • Rename Beans in AadAuthenticationFilterAutoConfiguration from azureADJwtTokenFilter\getJWTResourceRetriever\getJWKSetCache to aadAuthenticationFilter\jwtResourceRetriever\jwkSetCache #27301.
  • Rename Bean in AadB2cResourceServerAutoConfiguration from aadIssuerJWSKeySelector to aadIssuerJwsKeySelector #27301.
  • Change non-SDK defined boolean configuration properties from Boolean to boolean #27321.
  • Delete unused API from KeyVaultOperation and KeyVaultPropertySource #27722.
  • Delete Propagator from the constructor of SleuthHttpPolicy #27621.
  • Move classes for internal usage to the implementation pacakge #27113.

Features Added

  • Add a compatibility verifier for Spring Cloud Azure #25437.
  • Support configuring an AzureTokenCredentialResolver for each *ClientBuilderFactory #26792.
  • Add more hints for configuration properties in additional-spring-configuration-metadata.json file #26600.
  • Add descriptions and logs for namespacce property of Service Bus and Event Hubs #27053.

Bugs Fixed

  • Fix AAD autoconfiguration activated when no web dependencies on the classpath #26915.
  • Fix inconsistency between getPropertyNames() and containsProperty(String name) in KeyVaultPropertySource #23815.
  • Fix Cosmos direct/gateway connection properties cannot be configured bug #27241.
  • Fix Cosmos default connection mode not being set bug #27236.
  • Fix DefaultAzureCredential still being used when global credential properties spring.cloud.azure.credential.* provided bug #27626.
  • Fix connection strings retrieved from Azure Resource Manager not being used for Spring Messaging Azure components' autoconfiguration bug #27831.
  • Fix Azure*ResourceManagerAutoconfigure being activated when azure-resourcemanager is on classpath but service sdk isn't bug #27703.
  • Fix User-Agent for Spring Cloud Azure not loading correctly bug #27303.

Spring Cloud Azure Actuator

This section includes changes in spring-cloud-azure-actuator module.

Breaking Changes

  • Move classes for internal usage to the implementation package #27263.

Features Added

  • Add health indicator for Key Vault Certificate client #27706.

Spring Cloud Stream Event Hubs Binder

This section includes changes in spring-cloud-azure-stream-binder-eventhubs module.

Breaking Changes

  • Change the type of the binding producer property of send-timeout from long to Duration #26625.
  • Change the message header prefix from azure_eventhub to azure_eventhubs_ #27746.

Features Added

  • Support EventHubsProducerFactoryCustomizer and EventHubsProcessorFactoryCustomizer in EventHubsMessageChannelBinder #27351, #27653, #27775.

Bugs Fixed

  • Fix exception when trying to send a message that was received as part of a batch #26213.
  • Fix bug when provisioning an Event Hubs consumer group not uses the correct consumer group name #26622.

Spring Cloud Stream Service Bus Binder

This section includes changes in spring-cloud-azure-stream-binder-servicebus module.

Breaking Changes

  • Change the type of the binding producer property send-timeout from long to Duration #26625.
  • Rename property spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.session-aware to spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.session-enabled #27331.
  • Delete message header of AzureHeaders.RAW_ID. Please use ServiceBusMessageHeaders.MESSAGE_ID instead #27675.
  • Delete property spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.checkpoint-mode. Please use spring.cloud.stream.servicebus.bindings.<binding-name>.consumer.auto-complete instead. To disable the auto-complete mode is equivalent to MANUAL checkpoint mode and to enable it will trigger the RECORD mode #27615, #27646.

Features Added

  • Support converting all headers and properties exposed directly by ServiceBusReceivedMessage when receiving messages #27675, newly supported headers and properties can be get according to the keys of:
    • ServiceBusMessageHeaders.DEAD_LETTER_ERROR_DESCRIPTION
    • ServiceBusMessageHeaders.DEAD_LETTER_REASON
    • ServiceBusMessageHeaders.DEAD_LETTER_SOURCE
    • ServiceBusMessageHeaders.DELIVERY_COUNT
    • ServiceBusMessageHeaders.ENQUEUED_SEQUENCE_NUMBER
    • ServiceBusMessageHeaders.ENQUEUED_TIME
    • ServiceBusMessageHeaders.EXPIRES_AT
    • ServiceBusMessageHeaders.LOCK_TOKEN
    • ServiceBusMessageHeaders.LOCKED_UNTIL
    • ServiceBusMessageHeaders.SEQUENCE_NUMBER
    • ServiceBusMessageHeaders.STATE
    • ServiceBusMessageHeaders.SUBJECT
  • Support the message header of ServiceBusMessageHeaders.SUBJECT to specify the AMQP property of subject when sending messages #27675.
  • Support ServiceBusProducerFactoryCustomizer and ServiceBusProcessorFactoryCustomizer in ServiceBusMessageChannelBinder #27351, #27653, #27775.

Spring Integration Azure Event Hubs

This section includes changes in the spring-integration-azure-eventhubs module.

Breaking Changes

  • Move classes for internal usage to the implementation pacakge #27281.
  • Change the message header prefix from azure_eventhub to azure_eventhubs_ #27746.
  • Refactor the constructors of EventHubsInboundChannelAdapter to EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer) and EventHubsInboundChannelAdapter(EventHubsMessageListenerContainer, ListenerMode) #27216, #27421.

Spring Integration Azure Service Bus

This section includes changes in the spring-integration-azure-servicebus module.

Breaking Changes

  • Move classes for internal usage to the implementation pacakge #27281.
  • Delete message header of AzureHeaders.RAW_ID. Please use ServiceBusMessageHeaders.MESSAGE_ID instead #27675.
  • Delete class CheckpointConfig. Please use ServiceBusContainerProperties#setAutoComplete instead. To disable the auto-complete mode is
    equivalent to MANUAL checkpoint mode and to enable it will trigger the RECORD mode #27615, #27646.
  • Refactor the constructors of ServiceBusInboundChannelAdapter to ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer) and ServiceBusInboundChannelAdapter(ServiceBusMessageListenerContainer, ListenerMode) #27216, #27421.

Features Added

  • Support converting all headers and properties exposed directly by ServiceBusReceivedMessage when receiving messages #27675, newly supported headers and properties can be get according to the keys of:
    • ServiceBusMessageHeaders.DEAD_LETTER_ERROR_DESCRIPTION
    • ServiceBusMessageHeaders.DEAD_LETTER_REASON
    • ServiceBusMessageHeaders.DEAD_LETTER_SOURCE
    • ServiceBusMessageHeaders.DELIVERY_COUNT
    • ServiceBusMessageHeaders.ENQUEUED_SEQUENCE_NUMBER
    • ServiceBusMessageHeaders.ENQUEUED_TIME
    • ServiceBusMessageHeaders.EXPIRES_AT
    • ServiceBusMessageHeaders.LOCK_TOKEN
    • ServiceBusMessageHeaders.LOCKED_UNTIL
    • ServiceBusMessageHeaders.SEQUENCE_NUMBER
    • ServiceBusMessageHeaders.STATE
    • ServiceBusMessageHeaders.SUBJECT
  • Support the message header of ServiceBusMessageHeaders.SUBJECT to specify the AMQP property of subject when sending messages #27675.

Spring Messaging Azure

This section includes changes in the spring-messaging-azure module.

Breaking Changes

  • Move class com.azure.spring.messaging.PartitionSupplier to library com.azure.spring:spring-messaging-azure-eventhubs #27422.
  • Delete unused interfaces: ReceiveOperation and SubscribeOperation #27265.
  • Refactor the *MessageListenerContainer #27216, #27543:
    • Add MessagingMessageListenerAdapter to adapt Spring Messaging listeners.
    • Rename *ProcessingListener to *MessageListener.
  • Delete getter/setter methods from AzureCheckpointer #27672.

Spring Messaging Azure Event Hubs

This section includes changes in the spring-messaging-azure-eventhubs module.

Breaking Changes

  • Move classes for internal usage to the implementation pacakge #27396.
  • Move class PartitionSupplier from package com.azure.spring.messaging to com.azure.spring.messaging.eventhubs.core #27422.
  • Delete parameter of PartitionSupplier from the sending API for a single message in EventHubsTemplate #27422. Please use message headers of com.azure.spring.messaging.AzureHeaders.PARTITION_ID and com.azure.spring.messaging.AzureHeaders.PARTITION_KEY instead #27422.
  • Change the message header prefix from azure_eventhub to azure_eventhubs_ #27746.
  • Refactor the EventHubsMessageListenerContainer #27216, #27543:
    • Change EventHubsProcessorContainer to EventHubsMessageListenerContainer.
    • Add class EventHubsContainerProperties for constructing a EventHubsMessageListenerContainer.
    • Add EventHubsErrorHandler for EventHubsMessageListenerContainer.
    • Rename BatchEventProcessingListener and RecordEventProcessingListener to EventHubsBatchMessageListener and EventHubsRecordMessageListener.

Features Added

  • Support adding builder custoimzers in DefaultEventHubsNamespaceProducerFactory and DefaultEventHubsNamespaceProcessorFactory #27452.

Spring Messaging Azure Service Bus

This section includes changes in the spring-messaging-azure-servicebus module.

Breaking Changes

  • Delete parameter of PartitionSupplier from the sending API for a single message in ServiceBusTemplate #27349.
    Please use message header of com.azure.spring.messaging.AzureHeaders.PARTITION_KEY instead #27422.
  • Delete message header of AzureHeaders.RAW_ID. Please use ServiceBusMessageHeaders.MESSAGE_ID instead #27675, #27820.
  • Refactor the ServiceBusMessageListenerContainer #27216, #27543:
    • Change ServiceBusProcessorContainer to ServiceBusMessageListenerContainer.
    • Add class ServiceBusContainerProperties for constructing a ServiceBusMessageListenerContainer.
    • Add ServiceBusErrorHandler for ServiceBusMessageListenerContainer.
    • Rename MessageProcessingListener to ServiceBusRecordMessageListener.
  • Change APIs in ServiceBusProcessorFactory.Listener #27770:
    • Change from processorAdded(String name, String subscription, ServiceBusProcessorClient client) to processorAdded(String name, ServiceBusProcessorClient client).
    • Change from processorRemoved(String name, String subscription, ServiceBusProcessorClient client) to processorRemoved(String name, ServiceBusProcessorClient client).

Features Added

  • Support converting all headers and properties exposed directly by ServiceBusReceivedMessage when receiving messages #27832, newly supported headers and properties can be get according to the keys of:
    • ServiceBusMessageHeaders.DEAD_LETTER_ERROR_DESCRIPTION
    • ServiceBusMessageHeaders.DEAD_LETTER_REASON
    • ServiceBusMessageHeaders.DEAD_LETTER_SOURCE
    • ServiceBusMessageHeaders.DELIVERY_COUNT
    • ServiceBusMessageHeaders.ENQUEUED_SEQUENCE_NUMBER
    • ServiceBusMessageHeaders.ENQUEUED_TIME
    • ServiceBusMessageHeaders.EXPIRES_AT
    • ServiceBusMessageHeaders.LOCK_TOKEN
    • ServiceBusMessageHeaders.LOCKED_UNTIL
    • ServiceBusMessageHeaders.SEQUENCE_NUMBER
    • ServiceBusMessageHeaders.STATE
    • ServiceBusMessageHeaders.SUBJECT
  • Support the message header of ServiceBusMessageHeaders.SUBJECT to specify the AMQP property of subject when sending messages #27675.
  • Support adding builder custoimzers in DefaultServiceBusNamespaceProducerFactory and DefaultServiceBusNamespaceProcessorFactory #27452, #27820.

Spring Messaging Azure Storage Queue

This section includes changes in spring-messaging-azure-storage-queue module.

Dependency Updates

  • Delete the dependencies com.fasterxml.jackson.core:jackson-databind. #27727

Breaking Changes

  • Delete parameter of PartitionSupplier from the sending API for a single message in StorageQueueTemplate #27422.