Skip to content

Commit f03da41

Browse files
docs: Update README after v5 release (box/box-codegen#869) (#1527)
1 parent 88dd8d2 commit f03da41

File tree

2 files changed

+176
-79
lines changed

2 files changed

+176
-79
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "192deac", "specHash": "cf21406", "version": "10.1.0" }
1+
{ "engineHash": "b98d1dc", "specHash": "cf21406", "version": "10.1.0" }

README.md

Lines changed: 175 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,43 @@
22
<img src="https://github.com/box/sdks/blob/master/images/box-dev-logo.png" alt= “box-dev-logo” width="30%" height="50%">
33
</p>
44

5-
# Versioning Strategy
6-
7-
Starting with v10 of the SDK, we’ve introduced a new generated codebase designed to enhance your experience with the Box API.
8-
It is currently available on the [sdk-gen](https://github.com/box/box-java-sdk/tree/sdk-gen) branch and uses the new `com.box.sdkgen` package instead of the old `com.box.sdk`.
9-
10-
v10 is targeted at new users of Box Java SDK and users already working with the generated Box Java SDK previously available under the [Box Java SDK Gen repository](https://github.com/box/box-java-sdk-gen).
11-
12-
For users of v4 of the Box Java SDK, no action is required at this time — we’ll be providing an upcoming v5 release that will include both `com.box.sdk` and `com.box.sdkgen` packages for a smooth migration path. To avoid unintentional upgrades, pin your version to `com.box:box-java-sdk:4.16.4`.
13-
14-
For full guidance on SDK versioning, see the [Box SDK Versioning Guide](https://developer.box.com/guides/tooling/sdks/sdk-versioning/).
15-
16-
---
17-
18-
## Which Version Should I Use?
19-
20-
| Scenario | Recommended Version | Example Dependency |
21-
| --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ----------------------------- |
22-
| Creating a new application | Use [v10](https://github.com/box/box-java-sdk/tree/sdk-gen) | `com.box:box-sdkgen:10.0.0` |
23-
| Existing app using [box-java-sdk-gen](https://mvnrepository.com/artifact/com.box/box-java-sdk-gen) artifact | Upgrade to [v10](https://github.com/box/box-java-sdk/tree/sdk-gen) | `com.box:box-sdkgen:10.0.0` |
24-
| Existing app using [box-java-sdk](https://mvnrepository.com/artifact/com.box/box-java-sdk) and planning to use new features | Wait for v5 to start migration process | TBD |
25-
| Existing app using [box-java-sdk](https://mvnrepository.com/artifact/com.box/box-java-sdk) and not planning changes | Stay on your current version | `com.box:box-java-sdk:4.16.4` |
26-
27-
# Box Java SDK
5+
# Box Java SDK v10
286

297
[![Project Status](http://opensource.box.com/badges/active.svg)](http://opensource.box.com/badges)
308
![build](https://github.com/box/box-java-sdk/actions/workflows/build.yml/badge.svg?branch=sdk-gen)
319
![Maven Central Version](https://img.shields.io/maven-central/v/com.box/box-java-sdk)
3210
![Platform](https://img.shields.io/badge/java-%3E%3D8-blue)
3311
[![Coverage](https://coveralls.io/repos/github/box/box-java-sdk/badge.svg?branch=sdk-gen)](https://coveralls.io/github/box/box-java-sdk-gen?branch=sdk-gen)
3412

35-
We are excited to introduce the stable Release of the latest generation of Box Java SDK, designed to elevate the developer experience and streamline your integration with the Box Content Cloud.
13+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
14+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3615

37-
With this SDK, you’ll have access to:
16+
- [Introduction](#introduction)
17+
- [Supported versions](#supported-versions)
18+
- [Version v5](#version-v5)
19+
- [Version v10](#version-v10)
20+
- [Which Version Should I Use?](#which-version-should-i-use)
21+
- [Installing](#installing)
22+
- [Getting Started](#getting-started)
23+
- [Authentication](#authentication)
24+
- [Documentation](#documentation)
25+
- [Migration guides](#migration-guides)
26+
- [Versioning](#versioning)
27+
- [Version schedule](#version-schedule)
28+
- [Contributing](#contributing)
29+
- [3rd Party Libraries & Licenses](#3rd-party-libraries--licenses)
30+
- [FIPS 140-2 Compliance](#fips-140-2-compliance)
31+
- [Questions, Bugs, and Feature Requests?](#questions-bugs-and-feature-requests)
32+
- [Copyright and License](#copyright-and-license)
33+
34+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
35+
36+
# Introduction
37+
38+
We are excited to introduce the v10 major release of the Box Java SDK,
39+
designed to elevate the developer experience and streamline your integration with the Box Content Cloud.
40+
41+
With this SDK version, we provide the `com.box.sdkgen` package, which gives you access to:
3842

3943
1. Full API Support: The new generation of Box SDKs empowers developers with complete coverage of the Box API ecosystem. You can now access all the latest features and functionalities offered by Box, allowing you to build even more sophisticated and feature-rich applications.
4044
2. Rapid API Updates: Say goodbye to waiting for new Box APIs to be incorporated into the SDK. With our new auto-generation development approach, we can now add new Box APIs to the SDK at a much faster pace (in a matter of days). This means you can leverage the most up-to-date features in your applications without delay.
@@ -44,27 +48,44 @@ With this SDK, you’ll have access to:
4448

4549
Embrace the new generation of Box SDKs and unlock the full potential of the Box Content Cloud.
4650

47-
# Table of contents
51+
# Supported versions
4852

49-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
50-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
53+
To enhance developer experience, we have introduced the new generated codebase through the `com.box.sdkgen` package.
54+
The `com.box.sdkgen` package is available in two major supported versions: v5 and v10.
5155

52-
- [Box Java SDK](#box-java-sdk)
53-
- [Table of contents](#table-of-contents)
54-
- [Installing](#installing)
55-
- [Getting Started](#getting-started)
56-
- [Documentation](#documentation)
57-
- [Upgrades](#upgrades)
58-
- [Integration Tests](#integration-tests)
59-
- [Running integration tests locally](#running-integration-tests-locally)
60-
- [Create Platform Application](#create-platform-application)
61-
- [Export configuration](#export-configuration)
62-
- [Start integration tests](#start-integration-tests)
63-
- [3rd Party Libraries \& Licenses](#3rd-party-libraries--licenses)
64-
- [Questions, Bugs, and Feature Requests?](#questions-bugs-and-feature-requests)
65-
- [Copyright and License](#copyright-and-license)
56+
## Version v5
6657

67-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
58+
In v5 of the Box Java SDK, we are introducing a version that consolidates both the manually written package (`com.box.sdk`)
59+
and the new generated package (`com.box.sdkgen`). This allows developers to use both packages simultaneously within a single project.
60+
61+
The codebase for v5 of the Box Java SDK is currently available on the [combined-sdk](https://github.com/box/box-java-sdk/tree/combined-sdk) branch.
62+
Migration guide which would help with migration from `com.box.sdk` to `com.box.sdkgen` can be found [here](./migration-guides/from-com.box.sdk-to-com.box.sdkgen.md).
63+
64+
Version v5 is intended for:
65+
66+
- Existing developers of the Box Java SDK v4 who want to access new API features while keeping their current codebase largely unchanged.
67+
- Existing developers who are in the process of migrating to `com.box.sdkgen`, but do not want to move all their code to the new package immediately.
68+
69+
## Version v10
70+
71+
Starting with v10, the SDK is built entirely on the generated `com.box.sdkgen` package, which fully and exclusively replaces the old `com.box.sdk` package.
72+
The codebase for v10 of the Box Java SDK is currently available on the [sdk-gen](https://github.com/box/box-java-sdk/tree/sdk-gen) branch.
73+
74+
Version v10 is intended for:
75+
76+
- New users of the Box Java SDK.
77+
- Developers already working with the generated Box Java SDK previously available under the [Box Java SDK Gen repository](https://github.com/box/box-java-sdk-gen).
78+
79+
## Which Version Should I Use?
80+
81+
| Scenario | Recommended Version | Example gradle dependency |
82+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- | ----------------------------- |
83+
| Creating a new application | Use [v10](https://github.com/box/box-java-sdk/tree/sdk-gen) | `com.box:box-java-sdk:10.0.0` |
84+
| App using [box-java-sdk-gen](https://central.sonatype.com/artifact/com.box/box-java-sdk-gen) artifact | Migrate to [v10](https://github.com/box/box-java-sdk/tree/sdk-gen) | `com.box:box-java-sdk:10.0.0` |
85+
| App using both [box-java-sdk-gen](https://central.sonatype.com/artifact/com.box/box-java-sdk-gen) and [box-java-sdk](https://central.sonatype.com/artifact/com.box/box-java-sdk) artifacts | Upgrade to [v5](https://github.com/box/box-java-sdk/tree/combined-sdk) | `com.box:box-java-sdk:5.0.0` |
86+
| App using v4 of [box-java-sdk](https://central.sonatype.com/artifact/com.box/box-java-sdk) artifact | Upgrade to [v5](https://github.com/box/box-java-sdk/tree/combined-sdk) | `com.box:box-java-sdk:5.0.0` |
87+
88+
For full guidance on SDK versioning, see the [Box SDK Versioning Guide](https://developer.box.com/guides/tooling/sdks/sdk-versioning/).
6889

6990
# Installing
7091

@@ -106,48 +127,47 @@ client.folders.getFolderItems("0").getEntries().forEach(item -> {
106127
});
107128
```
108129

109-
# Documentation
130+
# Authentication
110131

111-
Browse the [docs](docs/README.md) or see [API Reference](https://developer.box.com/reference/) for more information.
132+
Box Java SDK v10 supports multiple authentication methods including Developer Token, OAuth 2.0,
133+
Client Credentials Grant, and JSON Web Token (JWT).
112134

113-
# Upgrades
135+
You can find detailed instructions and example code for each authentication method in
136+
[Authentication](./docs/Authentication.md) document.
114137

115-
The SDK is updated regularly to include new features, enhancements, and bug fixes. If you are upgrading from manual SDK to this new generated SDK checkout the [migration guide](migration-guides/from-v4-to-v10.md) and [changelog](CHANGELOG.md) for more information.
138+
# Documentation
116139

117-
# Integration Tests
140+
Browse the [docs](docs/README.md) or see [API Reference](https://developer.box.com/reference/) for more information.
118141

119-
## Running integration tests locally
142+
# Migration guides
120143

121-
### Create Platform Application
144+
Migration guides which help you to migrate to supported major SDK versions can be found [here](./migration-guides).
122145

123-
To run integration tests locally you will need a `Custom App` created in the [Box Developer
124-
Console](https://app.box.com/developers/console) with `Server Authentication (with JWT)` selected as authentication method.
125-
Once created you can edit properties of the application:
146+
# Versioning
126147

127-
- In section `App Access Level` select `App + Enterprise Access`. You can enable all `Application Scopes`.
128-
- In section `Advanced Features` enable `Make API calls using the as-user header` and `Generate user access tokens`.
148+
We use a modified version of [Semantic Versioning](https://semver.org/) for all changes. See [version strategy](VERSIONS.md) for details which is effective from 30 July 2022.
129149

130-
Now select `Authorization` and submit application to be reviewed by account admin.
150+
A current release is on the leading edge of our SDK development, and is intended for customers who are in active development and want the latest and greatest features.
151+
Instead of stating a release date for a new feature, we set a fixed minor or patch release cadence of maximum 2-3 months (while we may release more often).
152+
At the same time, there is no schedule for major or breaking release. Instead, we will communicate one quarter in advance the upcoming breaking change to allow customers to plan for the upgrade.
131153

132-
### Export configuration
154+
We always recommend that all users run the latest available minor release for whatever major version is in use.
155+
We highly recommend upgrading to the latest SDK major release at the earliest convenient time and before the EOL date.
133156

134-
1. Select `Configuration` tab and in the bottom in the section `App Settings`
135-
download your app configuration settings as JSON.
136-
2. Encode configuration file to Base64, e.g. using command: `base64 -i path_to_json_file`
137-
3. Set environment variable: `JWT_CONFIG_BASE_64` with base64 encoded jwt configuration file
138-
4. Set environment variable: `BOX_FILE_REQUEST_ID` with ID of file request already created in the user account, `BOX_EXTERNAL_USER_EMAIL` with email of free external user which not belongs to any enterprise and `BOX_EXTERNAL_USER_ID` with its ID.
139-
5. Set environment variable: `WORKFLOW_FOLDER_ID` with the ID of the Relay workflow that deletes the file that triggered the workflow. The workflow should have a manual start to be able to start it from the API.
140-
6. Set environment variable: `APP_ITEM_ASSOCIATION_FILE_ID` to the ID of the file with associated app item and `APP_ITEM_ASSOCIATION_FOLDER_ID` to the ID of the folder with associated app item.
141-
7. Set environment variable: `APP_ITEM_SHARED_LINK` to the shared link associated with app item.
142-
8. Set environment variable: `SLACK_AUTOMATION_USER_ID` to the ID of the user responsible for the Slack automation, `SLACK_ORG_ID` to the ID of the Slack organization and `SLACK_PARTNER_ITEM_ID` to the ID of the Slack partner item.
157+
## Version schedule
143158

144-
### Start integration tests
159+
| Version | Supported Environments | State | First Release | EOL/Terminated |
160+
| ------- | ---------------------- | --------- | ------------- | ---------------------- |
161+
| 10 | Java 8 and up | Supported | 17 Sep 2025 | TBD |
162+
| 5 | Java 8 and up | Supported | 23 Oct 2025 | 2027 or v6 is released |
163+
| 4 | Java 8 and up | EOL | 17 Jan 2023 | 23 Oct 2025 |
164+
| 3 | Java 8 and up | EOL | 17 Jan 2022 | 17 Jan 2023 |
165+
| 2 | | EOL | 07 Jan 2016 | 17 Jan 2022 |
166+
| 1 | | EOL | 15 Apr 2015 | 07 Jan 2016 |
145167

146-
To run integration tests locally, you can use the following command:
168+
# Contributing
147169

148-
```console
149-
./gradlew test --stacktrace
150-
```
170+
See [CONTRIBUTING.md](./CONTRIBUTING.md).
151171

152172
# 3rd Party Libraries & Licenses
153173

@@ -187,18 +207,95 @@ The following libraries are required for running tests:
187207
Maven: `org.junit.jupiter:junit-jupiter-engine:5.10.0`
188208
Licence: [EPL 2.0](https://www.eclipse.org/legal/epl-2.0/)
189209

210+
# FIPS 140-2 Compliance
211+
212+
To generate a Json Web Signature used for retrieving tokens in the JWT authentication method, the Box Java SDK decrypts an encrypted private key.
213+
For this purpose, Box Java SDK uses libraries (`org.bouncycastle:bcpkix-jdk18on:1.82` and `org.bouncycastle:bcprov-jdk18on:1.82`)
214+
that are NOT compatible with FIPS 140-2 validated cryptographic library (`org.bouncycastle:bc-fips`).
215+
216+
There are two ways of ensuring that decryption operation is FIPS-compiant.
217+
218+
1. You can provide a custom implementation of the `IPrivateKeyDecryptor` interface,
219+
which performs the decryption operation using FIPS-certified library of your choice.
220+
The interface requires the implementation of just one method:
221+
222+
```java
223+
PrivateKey decryptPrivateKey(String encryptedPrivateKey, String passphrase);
224+
```
225+
226+
After implementing the custom decryptor, you need to set your custom decryptor class:
227+
228+
```java
229+
JWTConfig newConfig = JWTConfig.fromConfigFile(JWT_CONFIG_PATH, customDecryptor);
230+
BoxJWTAuth auth = new BoxJWTAuth(jwtConfig);
231+
BoxClient client = new BoxClient(auth);
232+
```
233+
234+
2. Alternative method is to override the Bouncy Castle libraries to the v.1.57 version,
235+
which are compatible with the FIPS 140-2 validated cryptographic library (`org.bouncycastle:bc-fips`).
236+
237+
NOTE: This solution is not recommended as Bouncy Castle v.1.57 has some moderate vulnerabilities reported against those versions, including:
238+
239+
- [CVE-2020-26939](https://github.com/advisories/GHSA-72m5-fvvv-55m6) - Observable Differences in Behavior to Error Inputs in Bouncy Castle
240+
- [CVE-2020-15522](https://github.com/advisories/GHSA-6xx3-rg99-gc3p) - Timing based private key exposure in Bouncy Castle
241+
242+
Furthermore,using Bouncy Castle v.1.57 may lead to [Bouncycastle BadPaddingException for JWT auth](#bouncycastle-badPaddingException-for-jWT-auth).
243+
244+
Gradle example
245+
246+
```groovy
247+
implementation('com.box:box-java-sdk:x.y.z') {
248+
exclude group: 'org.bouncycastle', module: 'bcprov-jdk18on'
249+
exclude group: 'org.bouncycastle', module: 'bcpkix-jdk18on'
250+
}
251+
runtimeOnly('org.bouncycastle:bcprov-jdk15on:1.57')
252+
runtimeOnly('org.bouncycastle:bcpkix-jdk15on:1.57')
253+
```
254+
255+
Maven example:
256+
257+
```xml
258+
<dependencies>
259+
<dependency>
260+
<groupId>com.box</groupId>
261+
<artifactId>box-java-sdk</artifactId>
262+
<version>x.y.z</version>
263+
<scope>compile</scope>
264+
<exclusions>
265+
<exclusion>
266+
<groupId>org.bouncycastle</groupId>
267+
<artifactId>bcprov-jdk18on</artifactId>
268+
</exclusion>
269+
<exclusion>
270+
<groupId>org.bouncycastle</groupId>
271+
<artifactId>bcpkix-jdk18on</artifactId>
272+
</exclusion>
273+
</exclusions>
274+
</dependency>
275+
<dependency>
276+
<groupId>org.bouncycastle</groupId>
277+
<artifactId>bcprov-jdk15on</artifactId>
278+
<version>1.57</version>
279+
<scope>runtime</scope>
280+
</dependency>
281+
<dependency>
282+
<groupId>org.bouncycastle</groupId>
283+
<artifactId>bcpkix-jdk15on</artifactId>
284+
<version>1.57</version>
285+
<scope>runtime</scope>
286+
</dependency>
287+
</dependencies>
288+
```
289+
190290
# Questions, Bugs, and Feature Requests?
191291

192-
Need to contact us directly? [Browse the issues
193-
tickets](https://github.com/box/box-java-sdk/issues)! Or, if that
194-
doesn't work, [file a new
195-
one](https://github.com/box/box-java-sdk/issues/new) and we will get
196-
back to you. If you have general questions about the Box API, you can
197-
post to the [Box Developer Forum](https://forum.box.com/).
292+
Need to contact us directly? [Browse the issues tickets](https://github.com/box/box-java-sdk/issues)! Or, if that
293+
doesn't work, [file a new one](https://github.com/box/box-java-sdk/issues/new), and we will get
294+
back to you. If you have general questions about the Box API, you can post to the [Box Developer Forum](https://community.box.com/box-platform-5).
198295

199296
# Copyright and License
200297

201-
Copyright 2023 Box, Inc. All rights reserved.
298+
Copyright 2025 Box, Inc. All rights reserved.
202299

203300
Licensed under the Apache License, Version 2.0 (the "License");
204301
you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)