Skip to content

Updated version guidance on Java docs #7988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2020
Merged

Conversation

ericharmeling
Copy link
Contributor

@ericharmeling ericharmeling commented Aug 12, 2020

Fixes #7937.

I tested all samples against Java versions 8-14, with JDBC driver version 42.2.14.

Touches #7820.

@ericharmeling ericharmeling requested a review from rafiss August 12, 2020 16:03
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@ericharmeling
Copy link
Contributor Author

@vy-ton FYI

Copy link
Contributor

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ericharmeling and @rafiss)


_includes/v19.2/app/java-version-note.md, line 2 at r1 (raw file):

{{site.data.alerts.callout_info}}
We recommend using Java versions 8+ with CockroachDB.

Do we need the guidance about TLS 1.3?

  • for cockroachdb v20.1 and lower, we use TLS 1.2. java 8 supports that by default. for java 9+, you need to start your app with -Djdk.tls.client.protocols=TLSv1.2
  • for cockroachdb v20.2 and later, we use TLS 1.3 by default. make sure you are using java 11.0.7 or later, or java 13.0.3 or later. if using an earlier Java version, there is a bug in java’s TLS 1.3 implementation, so you must set -Djdk.tls.client.protocols=TLSv1.2 in your app startup.
  • java 8 will also work by default with cockroachdb v20.2, and will use TLS 1.2

_includes/v19.2/app/jdbc-version-note.md, line 1 at r1 (raw file):

We recommend using the latest PostgreSQL JDBC 4.2 driver. All 4.2 versions of the driver are compatible with Java versions 8+.

Do you mean 42.2?


_includes/v20.1/app/jdbc-version-note.md, line 1 at r1 (raw file):

We recommend using the latest PostgreSQL JDBC 4.2 driver. All 4.2 versions of the driver are compatible with Java versions 8+.

Should be 42.2?


_includes/v20.2/app/jdbc-version-note.md, line 1 at r1 (raw file):

We recommend using the latest PostgreSQL JDBC 4.2 driver. All 4.2 versions of the driver are compatible with Java versions 8+.

Should be 42.2?

@ericharmeling ericharmeling requested a review from rafiss August 12, 2020 19:57
Copy link
Contributor Author

@ericharmeling ericharmeling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @rafiss)


_includes/v19.2/app/java-version-note.md, line 2 at r1 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

Do we need the guidance about TLS 1.3?

  • for cockroachdb v20.1 and lower, we use TLS 1.2. java 8 supports that by default. for java 9+, you need to start your app with -Djdk.tls.client.protocols=TLSv1.2
  • for cockroachdb v20.2 and later, we use TLS 1.3 by default. make sure you are using java 11.0.7 or later, or java 13.0.3 or later. if using an earlier Java version, there is a bug in java’s TLS 1.3 implementation, so you must set -Djdk.tls.client.protocols=TLSv1.2 in your app startup.
  • java 8 will also work by default with cockroachdb v20.2, and will use TLS 1.2

I was going to do this in a separate PR, but we might as well do it here. Please review updates.


_includes/v19.2/app/jdbc-version-note.md, line 1 at r1 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

Do you mean 42.2?

No, I actually meant 4.2... but I misread the versioning guidance on this page: https://jdbc.postgresql.org/download.html ...

I just removed this whole note and added a sentence recommending the latest 42.2.x version.


_includes/v20.1/app/jdbc-version-note.md, line 1 at r1 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

Should be 42.2?

See comment above.


_includes/v20.2/app/jdbc-version-note.md, line 1 at r1 (raw file):

Previously, rafiss (Rafi Shamim) wrote…

Should be 42.2?

See comment above.

Copy link
Contributor

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ericharmeling and @rafiss)


_includes/v20.2/app/java-tls-note.md, line 7 at r2 (raw file):

If you cannot upgrade to a version higher than 11.0.7 or 13.0.3, you must configure the application to use TLS 1.2. For example, when starting your app: `$ java -Djdk.tls.client.protocols=TLSv1.2 appName`
{{site.data.alerts.end}}

Really good phrasing!

Copy link
Contributor

@lnhsingh lnhsingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ericharmeling, @lnhsingh, and @rafiss)


_includes/v19.2/app/java-tls-note.md, line 2 at r2 (raw file):

{{site.data.alerts.callout_danger}}
CockroachDB versions v20.1 and lower require TLS 1.2. By default, Java 8 uses TLS 1.2, but applications running on Java 9+ must be configured to run TLS 1.2. For example, when starting your app: `$ java -Djdk.tls.client.protocols=TLSv1.2 appName`

nit: "For example, when starting your app, use:"


_includes/v20.1/app/java-tls-note.md, line 2 at r2 (raw file):

{{site.data.alerts.callout_danger}}
CockroachDB versions v20.1 and lower require TLS 1.2. By default, Java 8 uses TLS 1.2, but applications running on Java 9+ must be configured to run TLS 1.2. For example, when starting your app: `$ java -Djdk.tls.client.protocols=TLSv1.2 appName`

See above comment


_includes/v20.2/app/java-tls-note.md, line 6 at r2 (raw file):

A bug in the TLS 1.3 implementation in Java 11 versions lower than 11.0.7 and Java 13 versions lower than 13.0.3 makes the versions incompatible with CockroachDB. For applications running Java 11 or 13, make sure that you have version 11.0.7 or higher, or 13.0.3 or higher.

If you cannot upgrade to a version higher than 11.0.7 or 13.0.3, you must configure the application to use TLS 1.2. For example, when starting your app: `$ java -Djdk.tls.client.protocols=TLSv1.2 appName`

See above

Copy link
Contributor Author

@ericharmeling ericharmeling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR @rafiss and @lnhsingh !

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @lnhsingh and @rafiss)


_includes/v19.2/app/java-tls-note.md, line 2 at r2 (raw file):

Previously, lnhsingh (Lauren Hirata Singh) wrote…

nit: "For example, when starting your app, use:"

Done.


_includes/v20.1/app/java-tls-note.md, line 2 at r2 (raw file):

Previously, lnhsingh (Lauren Hirata Singh) wrote…

See above comment

Done.


_includes/v20.2/app/java-tls-note.md, line 6 at r2 (raw file):

Previously, lnhsingh (Lauren Hirata Singh) wrote…

See above

Done.

@ericharmeling ericharmeling merged commit 37a9773 into master Aug 13, 2020
@ericharmeling ericharmeling deleted the update-java-version branch August 13, 2020 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Java support to include a minimum version
4 participants