Have you seen the prominent presence of the SAP Cloud SDK in Jürgen Müller’s keynote at SAP TechEd in Las Vegas? If not, here’s your chance to view the demo about extensions on SAP Cloud Platform (again). The demo involving the SAP Cloud SDK for straightforward and consistent access to different SAP solutions starts about 40 minutes into the keynote.
But we have not only been busy preparing the demo. We have also released new versions of the SAP Cloud SDK. In detail, the following components are now available in new versions:
- Java libraries in version 3.4.0
- Java libraries in version 2.21.0
- Continuous delivery toolkit in version v24
At the end of the article, you will find a set of instructions on how to update to the new versions.
Java Libraries: Release Highlights 3.4.0
You can update your dependencies of the SAP Cloud SDK for Java to version 3.4.0 and consume the new version from Maven Central.
Online retrieval of JWT verification keys
In preparation for an upcoming change to the way how the XSUAA service supplies verification keys to applications, the SAP Cloud SDK from version 3.4.0 onwards retrieves the key from an endpoint of the XSUAA service instead of relying on a verification key to be present in the XSUAA service binding credentials. Projects should update to the latest version of the SAP Cloud SDK (3.4.0 or 2.21.0) to ensure that their application continues to work after the change has been implemented by the XSUAA service.
The SDK now validates user access tokens issued by the XSUAA service with the verification key retrieved from the XSUAA service. The retrieved key is cached for 5 minutes. Depending on feedback, we may change the cache duration in the future.
Version 3.4.0 supports the
SystemUser property in destinations with authentication type “OAuth2SAMLBearerAssertion”. The system user will be used instead of the currently logged in principal to retrieve an access token to the destination. That is, no principal propagation takes place. As a consequence, no user JWT is required.
Several further improvements are listed in the full release notes.
Java Libraries: Release Highlights 2.21.0
For a complete view on what has changed, take a look at the full release notes.
User and tenant objects
You can construct a structured representation of tenants as a
Tenant object from a JWT with the new method
tenantFromJwt. Pass a JWt that you decoded, for example, using
Similarly, construct a structured representation of users as a
User object from a JWT with the new method
As usual, the full release notes contain a list of all improvements in this release.
Continuous Delivery Toolkit: Release Highlights v24
We have also released version v24 of our out-of-the-box continuous delivery offering consisting of a ready-made Jenkins server and a complete delivery toolkit.
Continuous delivery for CAP
As already mentioned in the last release blog, we have announced that the out-of-the-box continuous delivery pipeline of the SAP Cloud SDK for continuous delivery now supports projects created with the SAP Cloud Application Programming Model (CAP). This allows you to start continuously delivering your CAP projects as easy as never before, without writing a single line of pipeline code.
This applies to CAP projects newly generated in SAP Web IDE or when using the CDS project generator. Previously existing projects need to be migrated to match the structure of the template.
In the past, the pipeline required a Maven dependency
listeners-all to be present in the unit and integration test modules. The dependencies are still needed to measure application qualities, but the pipeline will add those dependencies now automatically if they are not present. See this section in the documentation if you’re interested in more details.
Version v24 adds support for sidecar containers during integration tests also in Kubernetes environments. This feature has been available in non-Kubernetes environments before. A sidecar container is an additional Docker container which can be spawned in integration tests if needed, for example, to provide a database management system. Please refer to the documentation of the stage backendIntegrationTests for details on how to configure this.
The pipeline now prints the duration of each pipeline stage in the log. This allows you to identify potential bottlenecks more quickly. Search the build log for messages containing “Duration of stage”.
You can find further fixes and improvements in the complete release notes.
How to Update
To update the version of the SAP Cloud SDK Java libraries used in an existing project, proceed as follows:
- Open the pom.xml file in the root folder of your project.
- Locate the dependency management section and therein the
- Update the version of that dependency to
With this, you are already done thanks to the “bill of material” (BOM) approach. Your dependency should look like this:
<dependencyManagement> <dependencies> <dependency> <groupId>com.sap.cloud.sdk</groupId> <artifactId>sdk-bom</artifactId> <version>3.4.0</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> <!-- possibly further managed dependencies ... --> </dependencyManagement>
If you update from a version prior to 3.0.0, have a look at our migration guide.
If you are using the SAP Cloud SDK in a project of the SAP Cloud Application Programming Model, replace
sdk-modules-bom to only update the version of SDK modules, not further dependencies.
You can now recompile your project (be aware of the compatibility notes, though) and leverage the new features of the SAP Cloud SDK in version 3.4.0.
npm update in the root folder of your module. Note that this will also update other modules, unless you explicitly specify which packages to update. If you want to check beforehand what will change, use
Continuous Delivery Toolkit
If you are using the pipeline with a fixed version (as recommended since v7), update the continuous delivery toolkit with the following command, that you run on the server hosting the cx-server:
./cx-server update image