Skip to Content
Product Information

New Versions of SAP Cloud SDK: 3.4.0 for Java, 1.10.0 for JavaScript, and v24 of Continuous Delivery Toolkit

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:

In this blog post, we will walk you through the highlights of these releases. For a complete overview, visit our release notes for the Java libraries, for the JavaScript libraries, and for the continuous delivery toolkit. The release notes also include the change log of all our releases so far.
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.

Further improvements

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

We have also released the SDK for Java in a new maintenance version 2.21.0. Everyone who did not yet migrate to version 3 of the SDK for Java can consume that version from Maven Central.

For a complete view on what has changed, take a look at the full release notes.

JavaScript Libraries: Release Highlights 1.10.0

The JavaScript libraries of the SAP Cloud SDK are now available in version 1.10.0.

User and tenant objects

If you need to access properties of the current tenant or the currently logged in user, you will find our new abstractions helpful. Version 1.10.0 introduces a representation of tenants and users in JavaScript together with methods that allow constructing those from a JWT.

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 verifyJwt.
Similarly, construct a structured representation of users as a User object from a JWT with the new method userFromJwt.

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.

Further improvements

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

Java libraries

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 sdk-bom dependency.
  • Update the version of that dependency to 3.4.0.

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-bom with 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.

Of course, you can also generate a new project that uses version 3.4.0 from the start by running the Maven archetypes for Neo or Cloud Foundry with -DarchetypeVersion=3.4.0 (or RELEASE).

JavaScript libraries

To update the version of the SAP Cloud SDK JavaScript libraries used in an existing project, use the command 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 npm outdated.

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
Be the first to leave a comment
You must be Logged on to comment or reply to a post.