DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Coding
  3. Java
  4. JVM Calendar: Security Enhancements in JDK 9, 10, and 11

JVM Calendar: Security Enhancements in JDK 9, 10, and 11

Check out the latest security enhancements from the newest versions of the JDK.

Martin Toshev user avatar by
Martin Toshev
·
Dec. 27, 18 · Presentation
Like (4)
Save
Tweet
Share
22.17K Views

Join the DZone community and get the full member experience.

Join For Free

One of reasons for shorter release cycles of the JDK is the ability to roll out faster security bug fixes and enhancements. In this article, we will review, in a nutshell, what are the major security enhancements introduced in latest JDK versions. As most of these enhancements are related to TLS, it is essential to understand the TLS handshake process as illustrated by the following diagram:

JDK 9

Major security enhancements introduced in JDK 9 are related to the TLS support provided by JSSE (Java Secure Socket Extension) API. These include:
• DTLS support in JDK 9: DTLS provides is essentially TLS over UDP so that you can encrypt communication established by unreliable protocols running over UDP:

SSLContext sslContext = SSLContext.getInstance("DTLS");
sslContext.init(…)
SSLEngine engine = sslContext.createSSLEngine();
engine.setUseClientMode(…); // true or false depending on whether it is a DTLS client or server

• TLS ALPN extension in JDK 9: provides support for negotiating the application protocol during the TLS handshake process; the list of acceptable protocols is set as a simple list of strings on both the TLS client and TLS server, as shown below:

SSLParameters sslParams = sslSocket.getSSLParameters();
sslParams.setApplicationProtocols(…)

or (for non-blocking mode of operation):

SSLParameters sslParams = sslEngine.getSSLParameters();
sslParams.setApplicationProtocols(…)

or (using more complex logic to determine the negotiated protocol):

sslSocket.setHandshakeApplicationProtocolSelector((serverSocket, clientProtocols) {
SSLSession handshakeSession = serverSocket.getHandshakeSession();
String cipher = handshakeSession.getCipherSuite();
int packetBufferSize = handshakeSession.getPacketBufferSize();
if("RC4".equals(cipher) && packetBufferSize > 1024) {
return "protocol1";
} else {
return "protocol2";
}
});

TLS ALPN comes in handy, i.e. for web servers that support both the HTTP 1.1 and HTTP 2.0 protocols over TLS for their clients
• OCSP Stapling for TCP: provides a mechanism for doing certificate revocation checking on the TLS server rather than the TLS client thus saving network bandwidth, must be enabled on both the TLS client and the TLS server:

-Djdk.tls.client.enableStatusRequestExtension=true
-Dcom.sun.net.ssl.checkRevocation=true

and (on the TLS server):

-Djdk.tls.server.enableStatusRequestExtension=true

• PKCS12 keystores, by default (so far these were JKS, but those are not portable across different than Java programming languages)
• DRBG-Based SecureRandom Implementations
• Utilization of CPU Instructions for GHASH and RSA
• SHA-1 Certificates disabled for certificate validation
• Implementation of the SHA-3 hash algorithms

JDK 10

There are two main enhancements introduced in JDK 10:

JEP 319 Root Certificates: a list or root certificates has been exposed to the cacerts keystore of the JDK
Some security-related APIs marked for removal: some

JDK 11

The major security enhancement introduced in JDK 11 is provided by JEP 332: Transport Layer Security (TLS) 1.3. This is the new version of the TLS protocol that provides a number of enhancements over the previous (1.2) version of the TLS specification. In addition, more enhancements are made to the root certificates in the cacerts keystore (some root certificates are added and some removed).

Java (programming language) Java Development Kit TLS security Java virtual machine Calendar (Apple)

Published at DZone with permission of Martin Toshev. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • A Brief Overview of the Spring Cloud Framework
  • How To Create and Edit Excel XLSX Documents in Java
  • Fraud Detection With Apache Kafka, KSQL, and Apache Flink
  • How Observability Is Redefining Developer Roles

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: