Release Notes
Should I update?
We are happy to announce the latest release of the SAP Cloud SDK. SAP Cloud SDK Version 5.0.0 is the first release of the SAP Cloud SDK as an open source project under the Apache 2.0 license. You can find the project sources on GitHub.
Version 5 also updates the SAP Cloud SDK to the latest Java technology stack, including the JakartaEE APIs, Spring 6 and Java 17. Make sure to check out the updated requirements and the dedicated upgrade guide.
We highly recommend regularly updating to the latest SAP Cloud SDK version. It will help you:
- Ensure access to the latest SAP Cloud SDK features
- Keep up with the latest changes in SAP Cloud Platform
- Update client libraries giving access to latest SAP services on SAP Cloud Platform and SAP S/4HANA
- Protect yourself from bugs and breaking changes in the future
5.24.0 - October 30, 2025
✨ New Functionality
- Add support for using the Zero Trust Identity Service (ZTIS) on Kyma by detecting the well-known environment variable
SPIFFE_ENDPOINT_SOCKET. - Add support for explicitly passing the
clientidof the target system when using the IAS App2App authentication flow. Use the new methodswithProviderClient(clientid)andwithProviderClient(clientid, apptid)underBtpServiceOptions.IasOptions.
📈 Improvements
- When the circuit breaker opens, the resulting
ResilienceRuntimeExceptionwill have the originalCallNotPermittedExceptionfrom the circuit breaker stored as a suppressed exception.
5.23.0 - October 08, 2025
🔧 Compatibility Notes
- The builder methods for
TransparentProxyDestinationhave been renamed:staticDestination()todestination()dynamicDestination()togateway()
📈 Improvements
- Circuit breaker exceptions
CallNotPermittedExceptionhave been replaced in favor of the previously thrown exception to provide more context on the failure.
5.22.0 - August 29, 2025
✨ New Functionality
- Add built-in support for the Transparent Proxy via a new
TransparentProxyDestination. For more information, refer to the documentation. - Add experimental support for cross-level destination consumption via a new
CrossLevelScopesetting underDestinationServiceOptionsAugmenter. - Add experimental support for setting custom headers in requests to the destination service via the new
DestinationServiceOptionsAugmenter#customHeaders.
🐛 Fixed Issues
- [OpenAPI] Fix code generator for transitive dependency version inconsistencies for Jackson.
- [ODatav4] Fix incorrect HTTP header name when sending entity version identifier in bound-action requests.
- [ODatav4] Fix an issue when generating clients.
- Property names:
value,itemandpropertiesare now allowed.
- Property names:
5.21.0 - August 01, 2025
✨ New Functionality
- Add
TokenCacheParameterstoOAuth2Optionsto configurate token cache duration, expiration delta and cache size.
📈 Improvements
- Relax OAuth2 token cache duration to 1hr to avoid unnecessary token refreshes.
- Disable refresh tokens when obtaining user tokens from IAS. This acts as a workaround for a limitation of IAS, where obtaining a refresh token invalidates the original token.
🐛 Fixed Issues
- OData v2 and OData v4: Fix eager HTTP response evaluation for Create, Update, and Delete request builders in convenience APIs.
Previous change of
5.20.0may have resulted in the HTTP connection being left open after the request was executed. - Generic OData Client: Revert behavior change introduced in
5.20.0that let to HTTP responses not being consumed by default. If you want to usedisableBufferingHttpResponse()onODataRequestReadorODataRequestReadByKeyplease switch towithoutResponseBuffering()instead.
🐛 Known Issues
- Using the
openapi-generator-pluginin combination with a Swagger v2 specification file will likely lead to dependency convergence issue. If you have aMethodNotFoundExceptionplease use5.20.0or5.22.0(or later).
5.20.0 - June 20, 2025
🐛 Fixed Issues
- Fix
CVE-2025-48734by transitive dependency update inconnectivity-ztis. - For OData Generic Client: Fix
disableBufferingHttpResponse()inODataRequestResultGeneric.
🐛 Known Issues
-
For OData clients: This release changed the default HTTP response lifecycle for OData request-execution results.
Until
5.19.0the underlying OData Generic Client was "eagerly" consuming the HTTP response. With5.20.0it changed to "lazily" consuming the HTTP response while buffering the content. While this is considered a fix and acceptable change for the expert OData Generic Client, we unintentionally changed the behavior in the convenience classes for OData v2 and OData v4 as well. This behavior change in convenience API will be reverted with next5.21.0.Affected users may observe the following exception message due to HTTP responses not being consumed and HTTP connections not being closed automatically:
ConnectionPoolTimeoutException: Timeout waiting for connection from poolPlease use
5.19.0until this is fixed in5.21.0.
5.19.0 - May 26, 2025
📈 Improvements
- Improve the detection and masking of secrets when logging data to debug.
🐛 Fixed Issues
- Fix OData v2 error: Disable Validation in the absence of DOCTYPE
- Fix OData v2/v4 error: Navigating
nextLinkin paginated result-set no longer results in duplicate query parameters.
5.18.0 - April 16, 2025
🔧 Compatibility Notes
- Changed a behavior details when obtaining tokens from IAS with the default strategy
CURRENT_TENANT. In case the current tenant is the provider tenant, andTenantAccessor.getCurrentTenant()is returning aTenantobject, this object is now required to have a subdomain != null.
🐛 Fixed Issues
- OpenAPI: When
apiMaturityis set tobeta, generated enums will now be@Betaannotated.
5.17.0 - February 20, 2025
🔧 Compatibility Notes
- Changes regarding the TLS
Upgradeheader thanks to Apache httpclient5 5.4.2TlsUpgrade.DISABLEDno changesTlsUpgrade.ENABLEDwill not send theUpgradeheader for non-proxy connections anymoreTlsUpgrade.AUTOMATICDefault behaviour will not send theUpgradeheader anymore- Except for
proxyType(ProxyType.INTERNET)
- Except for
✨ New Functionality
- OpenAPI: Add
toMap()and deprecategetCustomField(String)on generated model classes.
5.16.0 - January 29, 2025
✨ New Functionality
- Add experimental support for updating nested fields in OData v2 complex types via PATCH requests
- Use optional argument
FluentHelperUpdate#modifyingEntity( ModifyPatchStrategy )to control updates with delta or full complex property payloads.
- Use optional argument
📈 Improvements
- Improve the OData v4 class
BatchRequestBuilderto now also implement theModificationRequestBuilderinterface.
🐛 Fixed Issues
- Fix non-compilable code using OpenAPI generator with schema definitions having
additionalProperties: true. Previously they would result in model classes extendingHashMap, which disabled proper deserialization and serialization.
5.15.0 - December 19, 2024
✨ New Functionality
- Add support for
TypeDefinitionentries in OData V4 EDMX files. - Add
generateApisandgenerateModelsoptions to theopenapi-generator-maven-pluginto disable the generation of APIs and models respectively.
📈 Improvements
- Stabilize most of the remaining experimental APIs without changes, e.g.
- RequestHeaderAccessor
- ServiceBindingDestinationLoader
- OData v2 and v4 generators now use
LinkedHashMapfor the properties of the generated classes to maintain the order of the properties.
🐛 Fixed Issues
- Fix ApacheHttpClient5Wrapper to propagate the configuration to Spring RestTemplate.
- Fix OData v2 and v4 generators to work when property name is
valueorvaluesand is of collection type.- The internal variable is now respectively
cloudSdkValueorcloudSdkValuesto avoid conflicts with thevalueorvaluesproperty.
- The internal variable is now respectively
5.14.0 - November 08, 2024
📈 Improvements
- Minor improvement on OpenAPI code generator to apply Javadoc on customized model class constructors.
- Fix a TLS compatibility issue between the latest Apache HttpClient 5 and on-premise connectivity (via SAP Cloud Connector).
- Stabilize ApacheHttpClient5 related API without changes.
The
@Betaannotations are removed in most places and consuming applications no longer need to suppress warnings.
5.13.0 - September 27, 2024
🔧 Compatibility Notes
- Minimum required versions:
- SAP BTP Security Services Integration Libraries
com.sap.cloud.security3.4.3 - CAP
com.sap.cds2.9.3 - SAP Java Buildpack
com.sap.cloud.sjb2.10.0
- SAP BTP Security Services Integration Libraries
- Using IAS requires XSUAA version to be minimum
3.4.0. - Change the
DefaultHttpDestination.Builderto throw an exception when the proxy configuration can not be determined for on-premise destinations. Previously, only an error was logged to give a grace period for analyzing and fixing the underlying issue. - Change the default implementations of
HttpClientCacheandApacheHttpClient5Cacheto throw an exception in cases where previously only an error was logged. The previous behavior of logging an error and falling back to creating a new http client granted a grace period to fix the underlying issue.
🐛 Fixed Issues
- OpenAPI QueryParameters are now encoded
🐛 Known Issues
- Using the latest Apache HttpClient 5 to connect to on-premise systems (via SAP Cloud Connector), may result in "403 Forbidden" responses due to a TLS compatibility issue.
Please use older version SAP Cloud SDK
5.12.0or use upcoming5.14.0.
5.12.0 - September 03, 2024
✨ New Functionality
- Timeouts for OAuth2 token retrievals can now be customized.
As part of
ServiceBindingDestinationOptionsthe new optionOAuth2Options.TokenRetrievalTimeoutcan now be passed to set a custom timeout. Refer to this documentation for more details. - In
DestinationServiceclass allow for optional argumentDestinationServiceRetrievalStrategyin methodgetAllDestinationProperties. This additional API allows for ensuring tenant-specific destination lookups. Available values are:CURRENT_TENANT(default),ALWAYS_PROVIDERandONLY_SUBSCRIBER.
📈 Improvements
- [OpenAPI Generator] Setting the Maven plugin configuration property
openapi.generate.deleteOutputDirectorytotruewill no longer result in deletion of all files from theoutputDirectoryprior to generation. Instead, only theapiPackage- andapiPackage-related directories will be cleaned. This reduces the risk of deleting files unexpectedly and allows for reusing the sameoutputDirectoryfor multiple generator plugin invocations. - [OpenAPI Generator] The property accessors of generated model classes now have consistent
@Nullableand@Nonnullannotation. - [OpenAPI Generator] Enable the option
<enumUnknownDefaultCase>that allows for lenient handling of unknown enum values coming from a server. - Upgrade to version
1.66.0ofgRPCdependencies coming in transitively when usingconnectivity-ztis - Improve the error handling for OData batch requests.
In case an OData error is given within a batch response it will now be parsed and returned as
ODataServiceErrorException. - Reduce the amount of DwC headers sent when communicating via megaclite. This reduces the risk of exceeding the maximum header size limit of the Cloud Foundry infrastructure.
- Improve the error handling for requests to the destination service. In case of an error a potential response body will now be logged with the error message.
🐛 Fixed Issues
- fix: issue #557: DwC Auth Token not available (DwC + IAS) by @jingweiz2017 in #568
- Fix an issue where proxy headers are applied multiple times for On-Premise destinations.
5.11.0 - August 01, 2024
🔧 Compatibility Notes
- The OpenAPI generator doesn't add
//NOPMDafter imports anymore.
✨ New Functionality
- Add experimental support for Destination Fragments.
Fragment names can be passed upon requesting destinations via
DestinationServiceOptionsAugmenter.fragmentName("my-fragment-name"). - Allow removing properties when using a destination builder.
🐛 Fixed Issues
- The OpenAPI Generator correctly declares
@Nonnulland@Nullableannotations on generated endpoint methods. - The OpenAPI Generator uses correct camelCase again, when creating methods to add items to a collections.
Version
5.10.0used incorrectaddfooItems(Foo)instead ofaddFooItems(Foo). This is fixed now.
5.10.0 - June 12, 2024
🔧 Compatibility Notes
- Using the
X509_ATTESTEDcredential type now requires a version >=3.4.0of the SAP BTP Security Library. - Deprecate the IAS communication option
withConsumerClient(clientid, tenantid). The option is non-functional. UsewithConsumerClientId(clientid)instead, the tenant will automatically be inferred from the context upon execution.
✨ New Functionality
- Support the
X509_ATTESTEDcredential type for XSUAA service bindings.
🐛 Fixed Issues
- Fix an issue that prevented OAuth flows from working correctly for subscriber tenants when using IAS with credential type
X509_ATTESTED
5.9.0 - May 13, 2024
🔧 Compatibility Notes
-
Deprecate the
BtpServiceOptions.IasOptions.withTargetUrimethod overloads. As a replacement, users should use the correspondingBtpServiceOptions.AuthenticationServiceOptions.withTargetUrimethod. Additionally, the existing behavior of the deprecated methods has been changed: They are no longer returning an instance ofBtpServiceOptions.IasOptions.IasTargetUribut instead return now an instance ofBtpServiceOptions.AuthenticationServiceOptions.TargetUri. TheBtpServiceOptions.IasOptions.IasTargetUriclass is also deprecated.Please Note: The deprecated methods will stay functioning (with the mentioned behavior changes) for a while to give users time to migrate to the new methods. Nevertheless, we are planning to remove the deprecated methods and the class still within version 5 of the SAP Cloud SDK.
✨ New Functionality
- Support the OAuth Refresh Token authentication type of the Destination Service. Find more details on how to use the functionality in the documentation.
- Service Bindings for the SAP XSUAA service (Service Identifier
xsuaa) can now be converted into destinations just as any other supported service. This is most useful when combined with the newly introducedBtpServiceOptions.AuthenticationServiceOptions.withTargetUrimethods, which allows for communication between services that are backed by the same XSUAA instance.
🐛 Fixed Issues
- Fix a regression that was introduced with the SAP Cloud SDK 5.0 release where the principal would no longer be derived from a
Basicauthorization header, in cases where neither a JWT nor an OIDC token was present. - Fix a regression that was introduced with the SAP Cloud SDK 5.0 release where auth tokens sent by the Destination service would no longer be stored in the
cloudsdk.authTokensdestination property for non-HTTP destinations.
5.8.0 - April 22, 2024
📈 Improvements
- Improve the efficiency of HTTP clients: The default cache duration for HTTP clients have been increased to expire one hour after last access (was 5 minutes after creation). Aside from a performance improvement, this improves the handling of cookies, as they are retained for much longer.
- Improve connecting to IAS-based applications and services.
Scenarios where an IAS tenant is connected to multiple subaccounts of an application are now supported.
- Note that when mocking an IAS binding for testing the binding entry
app_tidis now required.
- Note that when mocking an IAS binding for testing the binding entry
🐛 Fixed Issues
- Fix an issue that would cause a NPE when using bound services backed by IAS via the dedicated service binding format.
- Fix an issue that would cause a NPE when using the OData
applyActionmethod with anullparameter value.
5.7.0 - April 05, 2024
✨ New Functionality
- (Beta) Add support for the SAP-internal Zero Trust Identity Service
- Add a new module
connectivity-ztis. - Add support for the credential-type
X509_ATTESTEDfor all OAuth2 flows.
- Add a new module
🐛 Fixed Issues
- Stop unnecessarily throwing and catching
NullPointerExceptionwhen interacting withDefaultHttpDestination#equals(...)and#hashCode().
5.6.0 - March 19, 2024
✨ New Functionality
- Add support for connecting to applications and services backed by the SAP Identity Authentication Service (IAS).
- The
ServiceBindingDestinationLoaderAPI now supports service bindings to the IAS service. - The
BtpServiceOptionsclass has now offersIasOptionsto pass additional options depending on the use case. - A standardised service binding format for IAS-backed services is introduced.
- Support connecting to arbitrary services as long as their service binding conforms to the standardised format.
- Head over to the documentation for more information on the new features.
- The
- Support service bindings to the SAP BTP AI Core Service by default in the
ServiceBindingDestinationLoaderAPI. - Failed OData v4 Batch requests now return the specific failed request from the exception:
ODataResponseException.getRequest().
🐛 Fixed Issues
- Fix an issue where the same
HttpClientwould be used for different users when usingPrincipalPropagationand thus could potentially share the same (session) cookies. - Fix an issue where destinations for the Business Logging service that are created from a service binding (using the
ServiceBindingDestinationLoaderAPI) contained the concrete API path. This behavior caused problems when using such a destination in a client generated with the SAP Cloud SDK's OpenApi generator. - [DwC] Fix an issue where the
AuthTokenAccessorwould not recognize JWT tokens passed in via thedwc-jwtheader. - [DwC] Fix an issue where the current tenant would not be resolved if the
dwc-subdomainheader was missing.
5.5.0 - February 28, 2024
🔧 Compatibility Notes
- Deprecated
RfcDestinationand all associated usages, the replacement isDestination.
✨ New Functionality
wardeployment in combination with theSAP Java Buildpack2.2.0 is supported again. OurRFCartifact is now released, andJCofunctionalities are supported again. Please follow our guide to update to version 5.
📈 Improvements
- Improve the
DefaultHttpDestinationbuilder API: For destinations with proxy typeON_PREMISEthe proxy URL can now be customized by using theproxymethod of the builder.
🐛 Fixed Issues
- Fixed an issue where adding header providers to a destination after it had already been used to obtain an Apache
HttpClient5 would not work as expected.
5.4.0 - February 15, 2024
📈 Improvements
- Destination key-stores of type PKCS #12 with empty (or no) password will be correctly loaded, including their certificates.
- OpenAPI clients can now be generated with specifications with
oneOfandanyOfkeywords by enabling their processing by using<enableOneofAnyofGeneration>inopenapi-generator-maven-plugin(This option is turned off by default):But,the generated client may not be feature complete and work as expected for all cases involving<plugin>
<groupId>com.sap.cloud.sdk.datamodel</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
...
<configuration>
...
<enableOneofAnyofGeneration>true</enableOneofAnyofGeneration>
</configuration>
</plugin>anyOf/oneOf.
Dependency Updates
| Dependency | From | To |
|---|---|---|
commons-codec (commons-codec) | 1.16.0 | 1.16.1 |
java-modules-bom (com.sap.cloud.environment.servicebinding) | 0.10.2 | 0.10.3 |
jcl-over-slf4j (org.slf4j) | 2.0.11 | 2.0.12 |
joda-time (joda-time) | 2.12.6 | 2.12.7 |
neo-java-web-api (com.sap.cloud) | 4.68.9 | 4.69.7 |
openapi-generator (org.openapitools) | 7.2.0 | 7.3.0 |
slf4j-api (org.slf4j) | 2.0.11 | 2.0.12 |
slf4j-ext (org.slf4j) | 2.0.11 | 2.0.12 |
json (org.json) | 20231013 | 20240205 |
java-modules-bom (com.sap.cloud.environment.servicebinding) | 0.10.1 | 0.10.2 |
5.3.0 - February 1, 2024
📈 Improvements
- The destination property
HTML5.ForwardAuthTokenis now evaluated and forwards the current AuthToken to the target system. - Improve how certificates are evaluated for the authentication types
SAMLAssertionandOAUTH2_SAML_BEARER_ASSERTION. The certificates are no longer unnecessarily parsed when obtaining the destination. - The
spring-boot3archetype no longer contains theintegration-testsmodule. The contained tests are now part of the test suite of theapplicationmodule. - Dependency Updates:
- SAP dependency updates:
- Update
com.sap.cloud.securityfrom3.3.3to3.3.4 - Update
com.sap.cloud.environment.servicebindingfrom0.10.1to0.10.2 - Update
com.sap.cloud:neo-java-web-apifrom4.67.12to4.68.9
- Update
- Other dependency updates:
- Major version updates:
- Update
org.apache.olingofrom4.10.0to5.0.0 - Update
io.github.resilience4jfrom1.7.1to2.2.0
- Update
- Minor/Patch version updates:
- Update
org.slf4j:slf4j-apifrom2.0.9to2.0.11 - Update
commons-io:commons-iofrom2.15.0to2.15.1 - Update
org.apache.httpcomponents.client5:httpclient5from5.3to5.3.1
- Update
- Major version updates:
- SAP dependency updates:
5.2.0 - January 22, 2024
🔧 Compatibility Notes
-
The de-facto standard
resilience4jimplementation for the resilience API is now included by default. In case you are loading a different implementation of theResilience4jDecorationStrategyvia the Java Service Provider Interface (SPI), you should useresilience-apiand ensureresilience4jis not loaded transitively. Alternatively, you can invokeResilienceDecorator.setDecorationStrategyexplicitly in your code.-
In case you are using custom facade implementations for accessors (e.g.
TenantAccessor) this might have additional implications.Details: Impact on custom facades
First, check if all the following conditions apply for your use case:
- You are providing a custom implementation of a facade interface (e.g. the
TenantFacaderegistered to theTenantAccessor). - Your custom facade implementation uses
ThreadLocalvariables which are not configured to be passed on by theThreadContextExecutor. - Before version
5.2.0theresilience4jmodule was not in the dependency tree and no alternative implementation was provided. - You are implicitly or explicitly using a resilience configuration with a
TimeLimiterdefined.- This means that the
TimeLimiterwas not taking effect before5.2.0and respective warnings have been logged about this.
- This means that the
- The code inside the resilient execution is implicitly or explicitly using the facade implementation.
If all the above conditions apply, you might need to ensure that the
ThreadLocalvariables you are using for your custom facades are passed on by theThreadContextExecutor. Please follow this documentation on how to achieve this. - You are providing a custom implementation of a facade interface (e.g. the
-
-
com.sap.cloud.sdk.cloudplatform.connectivity.DestinationService.Cachenow enables change detection by default, but can be disabled viaDestinationService.Cache.disableChangeDetection().DestinationService.Cache.enableChangeDetection()has been deprecated.
✨ New Functionality
OpenAPIgenerated objects can now write custom fields which are not part of the object's schema:setCustomField("nameOfField", "valueOfField")
- Destinations from SAP BTP Destination Service with
AuthenticationType=ClientCertificateAuthenticationnow support PEM file format for provided key-stores.
📈 Improvements
- Improved the resilience module structure.
The de-facto standard
resilience4jimplementation is now included by default. It is no longer necessary to explicitly reference this module in thepom.xml, ifresilienceis already referenced or is present transitively. - Improved the upgrade path from SAP Cloud SDK version 4 by handling older implementations of
Resilience4jDecorationStrategyin a graceful manner. In the previous releases, any occurrence of thecom.sap.cloud.sdk.frameworks:resilience4jmaven module needed to be excluded (in case it came in transitively) to not conflict withcom.sap.cloud.sdk.cloudplatform:resilience4j. This is no longer required, as the SAP Cloud SDK 4 strategy will be ignored now, if there is exactly one alternative. - Improved the application of resilience patterns for OAuth authorization flows.
Stateful resilience patterns (e.g. circuit breaker) will now be applied per
client_idof the OAuth client (was per instance of the OAuth service / destination). - Improved the
ApacheHttpClient5CacheBuilderAPI, it would return a non-public class in the previous releases. - Dependency Updates:
- SAP dependency updates:
- Update the SAP Security Library from
3.3.1to3.3.3
- Update the SAP Security Library from
- Other dependency updates:
- Update Guava from
32.1.3-jreto33.0.0-jre - Update Jackson from
2.15.3to2.16.1 - Update Commons Lang from
3.13.0to3.14.0
- Update Guava from
- SAP dependency updates:
- Destinations retrieved from the SAP BTP Destination Service now correctly evaluate the
forwardAuthTokenproperty if it has the authentication typeNoAuthentication.
🐛 Fixed Issues
- Fixed an issue where adding header providers to a destination after it had already been used to obtain an
HttpClientwould not work as expected.
5.1.0 - December 27, 2023
🔧 Compatibility Notes
- An earlier version of the V5 Upgrade Guide contained an instruction to move handling of
DestinationAccessExceptionsfromDestinationAccessor.getDestination()todestination.getHeaders(). This instruction was incorrect and has been removed. In case you have followed this instruction, please revert the change. UriBuilder.build(scheme, userInfo, host, port, path, query, fragment)has been deprecated in favor ofUriBuilder.build(scheme, authority, path, query, fragment).- Deprecate the strategies
LOOKUP_ONLYandLOOKUP_THEN_EXCHANGEofDestinationServiceTokenExchangeStrategy. They are replaced by theFORWARD_USER_TOKENstrategy. If there are any issues when usingFORWARD_USER_TOKENfor destinations that require user tokens, please report them and useEXCHANGE_ONLYfor such cases. DestinationService.tryGetAllDestinations()andDestinationService.tryGetAllDestinations(DestinationOptions opts)have been deprecated in favor ofDestinationService.getAllDestinationProperties().
✨ New Functionality
- Added new API to retrieve destination properties only from the SAP BTP Destination Service.
DestinationServicenow offersgetDestinationProperties(String destinationName)andgetAllDestinationProperties().
📈 Improvements
- A warning is now logged when destinations with expired authentication tokens are used for requests.
- SAP dependency updates:
- Update the SAP Security Library from
3.3.0to3.3.1
- Update the SAP Security Library from
- Other dependency updates:
- Update Apache HttpClient 5 from
5.2.1to5.3 - Update Apache HttpCore 5 from
5.2.3to5.2.4
- Update Apache HttpClient 5 from
🐛 Fixed Issues
- Fix an issue where an invalid hostname in a destination would lead to an empty hostname. The hostname is now accepted.
- Fix an issue where errors from token flows of destinations retrieved from the SAP BTP destination service were not handled consistently.
For the non-default strategy
LOOKUP_ONLYerrors were handled too late and results would get cached unintentionally.
Major Version Update: 5.0.0
This is the first release of the SAP Cloud SDK as an open source project. As this is a new major version, this release contains a lot of (under the hood) improvements, refactoring, and other changes.
These release notes list the most relevant API changes. Please refer to the Upgrade Guide for detailed instructions on how to upgrade your project to version 5 and for a detailed list of changes.
Important Compatibility Changes with Version 5
Please take note of the following changes introduced with version 5:
- The SAP Cloud SDK is now open source on github.com/SAP/cloud-sdk-java.
- As of version 5 the SAP Cloud SDK is now under the Apache Software License, Version 2.0.
- Releases of version 4 remain under the SAP DEVELOPER LICENSE AGREEMENT.
- The minimum required Java version increased:
- Java 17 is now the minimum required version to build and use the SAP Cloud SDK.
- The integration with JavaEE servlets changed:
- The Jakarta servlet namespace is now used for servlet integration.
- The minimum required versions for Spring and the SAP BTP Security Libraries increased:
- Spring 6 and SAP BTP Security Libraries version 3 are now the minimum required versions.
- The compatibility with the SAP Java Buildpack changed:
- Deployments to SAP BTP Cloud Foundry with packaging type
warrequire version 2 of the SAP Java Buildpack.
- Deployments to SAP BTP Cloud Foundry with packaging type
- The SAP BTP Neo Environment is no longer supported.
- A significant number of modules have been renamed, moved or been removed. Please refer to the Upgrade Guide for the full list of module changes.
API Changes
Changes to the overall Destination API:
- Both
HttpDestinationas well asHttpDestinationPropertiesare now sub-types ofDestinationfor improved compatibility with the SAP Cloud SDK APIs. - The
Destination#decoratemethod has been removed without replacement. - The public constructor of
DefaultHttpDestinationhas been replaced with a static factory methodDefaultHttpDestination#fromProperties.- We also added some extra static factory methods (
DefaultHttpDestination#fromMapandDefaultHttpDestination#fromDestination) for convenience.
- We also added some extra static factory methods (
- The public constructor of
DefaultDestinationhas been replaced with a static factory methodDefaultHttpDestination#fromMap.- We also added an extra static factory method
DefaultHttpDestination#fromPropertiesfor convenience.
- We also added an extra static factory method
- The
DefaultHttpDestination.Builderhas been modified in the following ways:- The
user(String)andpassword(String)methods have been replaced withbasicCredentials(String, String). - Using any overload of
basicCredentialswill now automatically set theAuthenticationTypetoBASIC_AUTHENTICATION. - Using
proxyConfiguration(ProxyConfiguration)will now throw anIllegalArgumentExceptionin case the containedCredentialsare not supported. Supported types areBearerCredentialsandNoCredentials.
- The
- Changed the following
DestinationPropertyKeyinstances:AUTH_TYPE:authentication->AuthenticationCERTIFICATES:certificates->cloudsdk.certificatesAUTH_TOKENS:authTokens->cloudsdk.authTokens- These changes are most relevant for users who are not already using these constant
DestinationPropertyKeyinstances but instead retrieved properties fromDestinationProperties(and sub-types) using theget(String, Function)method.
- The deprecated
ClientCredentialsHttpDestinationhas been removed in favor of the improvedOAuth2DestinationBuilder.- The
OAuth2DestinationBuilderhas been changed to allow for setting arbitrary destination properties after the OAuth2 configuration has been set. - The
.withProperties(..)aspect of the builder has been replaced with.withProperty(..).
- The
- The
BearerCredentialsbehavior has been adjusted slightly: ThegetToken()method no longer just returns the value passed in via the constructor but instead is now guaranteed to NOT contain the prefix"Bearer ". To compensate this change, the#getHttpHeaderValue()method has been added, which is guaranteed to contain the"Bearer "prefix.
Changes related to the SAP BTP Destination Service:
- The
ScpCfDestinationandScpCfHttpDestinationclasses are replaced by the baselineDestinationandDefaultHttpDestinationimplementations. - The
ScpCfDestinationLoaderhas been renamed toDestinationService. All related classes have been renamed similarly:ScpCfDestinationRetrievalStrategy->DestinationServiceRetrievalStrategy- The deprecated
CURRENT_TENANT_THEN_PROVIDERhas been removed.
- The deprecated
ScpCfDestinationTokenExchangeStrategy->DestinationServiceTokenExchangeStrategyScpCfDestinationServiceV1Response->DestinationServiceV1Response
- Removed the following elements from enum
com.sap.cloud.sdk.cloudplatform.connectivity.AuthenticationType:APP_TO_APP_SSOINTERNAL_SYSTEM_AUTHENTICATION
Changes to HTTP clients:
- The
HttpClientAccessorandApacheHttpClient5Accessorclasses are generalised to acceptDestinationinstances, making invocations to.asHttp()superfluous when obtaining HTTP clients. - The
getSslContext()method was removed from theCloudPlatforminterface and the implementation was moved to the modulesconnectivity-apache-httpclient4andconnectivity-apache-httpclient5.
Changes to Multi-Tenancy APIs:
- The public constructor of
DefaultPrincipalnow only accepts a String argument forprincipalId. - The
PrincipalFacadeof thePrincipalAccessorwill default toDefaultPrincipalFacadein the case that a facade cannot be found. - The
RequestHeaderContainerno longer splits header values. - The
ODataRequestResultno longer splits header values. - The
AuthTokenFacadeof theAuthTokenAccessorwill default toDefaultAuthTokenFacade - The
TenantFacadeof theTenantAccessorwill default toDefaultTenantFacade - The
TenantWithSubdomain#getSubdomainis now@Nullable.
Changes to the SAP Cloud Platform API:
- The
CloudPlatforminterface and all related classes have been removed. In particular, the following classes have been removed:ScpCfCloudPlatformandScpNeoCloudPlatformCloudPlatformAccessorandCloudPlatformFacade
Maven Module Changes
com.sap.cloud.sdk.cloudplatform:scp-cfhas been deprecated. Please usecom.sap.cloud.sdk:sdk-coreinstead.- All classes related to the Apache Http Client 4 have been moved from
com.sap.cloud.sdk.cloudplatform:cloudplatform-connectivityto a new modulecom.sap.cloud.sdk.cloudplatform:connectivity-apache-httpclient4. - All classes related to the Apache Http Client 5 have been moved from
com.sap.cloud.sdk.frameworks:apache-httpclient5tocom.sap.cloud.sdk.cloudplatform:connectivity-apache-httpclient5. - All classes related to Resilience4j have been moved from
com.sap.cloud.sdk.frameworks:resilience4jtocom.sap.cloud.sdk.cloudplatform:resilience4j. - All classes related to OAuth authorization flows have been moved into a new module
com.sap.cloud.sdk.cloudplatform:connectivity-oauth2. - The
cloudplatform-connectivity-scp-cfmodule got renamed toconnectivity-destination-service.- To prevent breaking changes with the renamed module the
cloudplatform-connectivity-scp-cfmodule is still available as a dependency, but it is empty and just contains a reference to the new moduleconnectivity-destination-service.
- To prevent breaking changes with the renamed module the
- All modules related to the SAP BTP Neo Environment have been removed.
- All modules with suffixes
-scp-cfhave been merged into their respective baseline modules:tenant-scp-cfhas been merged intotenantsecurity-scp-cfhas been merged intosecurity
com.sap.cloud.sdk.cloudplatform:servletandcom.sap.cloud.sdk.cloudplatform:security-servlethave been removed.- All deprecated pre-generated clients for OData and OpenAPI have been removed:
com.sap.cloud.sdk.s4hana:s4hana-allcom.sap.cloud.sdk.s4hana:s4hana-api-odatacom.sap.cloud.sdk.s4hana:s4hana-api-odata-onpremisecom.sap.cloud.sdk.s4hana:s4hana-api-odata-v4com.sap.cloud.sdk.s4hana:s4hana-api-odata-v4-onpremisecom.sap.cloud.sdk.services:scp-workflow-cfcom.sap.cloud.sdk.services:btp-business-rules
Major Dependency Changes
- Upgrade the SAP BTP Security Libraries (
com.sap.cloud.security) from2.14.2to3.3.0. - Upgrade Spring (
org.springframework) from5.3.29to6.1.1. - Upgrade SLF4J (
org.slf4j) from1.7.36to2.0.9. - Upgrade Caffeine (
com.github.ben-manes.caffeine) from2.9.3to3.1.8. - Change the servlet integration to the Jakarta namespace (
jakarta.servlet). - The overall dependency footprint of the SAP Cloud SDK has been reduced significantly.
- This also means that some dependencies have been removed from the
sdk-bom.
- This also means that some dependencies have been removed from the
Other Improvements
- The
Destination#asHttp()andDestination#asRfc()methods no longer always return a new instance ofHttpDestinationandRfcDestinationif the current objects is already aHttpDestinationorRfcDestinationrespectively. - The OData, OpenAPI and SOAP APIs are generalised to accept instances of
Destination, making invocations to.asHttp()superfluous when executing OData or REST requests.- OData v2 and OpenAPI clients need to be re-generated to adjust for this change.
Destination#asHttp()no longer throws an exception in case theDestinationoriginates from the Destination service and the attached auth token contains an error. Instead, an exception will be thrown upon invoking thegetHeaders()method, for example, during request execution.- Loading a
Destinationfrom the SAP BTP Destination service will now:- No longer eagerly evaluate authentication tokens or On-Premise related headers (if applicable).
Instead, those will be evaluated lazily upon request execution.
As a consequence, the
getHeadersmethod might now throw an exception if resolving (on-premise) authentication information fails. - Throw an exception if the tenant changed between loading and using the destination to execute requests.
- Throw an exception if any of the attached certificates isn't valid.
- No longer eagerly evaluate authentication tokens or On-Premise related headers (if applicable).
Instead, those will be evaluated lazily upon request execution.
As a consequence, the
- Removed the
javax.inject.Namedannotation from code generated with any of the OData generators (v2, v4).
Fixed Issues
- Fixed a bug where an
Authorizationheader was attached multiple times to outgoing HTTP requests under some circumstances - Fixed an issue where the
DestinationTypeof anDefaultHttpDestinationcould be changed to anything butDestinationType.HTTP - Fixed an issue with custom GSON serialization of OpenAPI generated classes having unexpected
customFieldNamesproperties in JSON payload.