Skip to content
This repository was archived by the owner on Jun 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc_source/document-history.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ history.
|Description
|Date

|xref:security-java-tls[]
|Update TLS security information
|22 March 2022

|xref:setup-additional[]
|Added more information about setting up and using credentials
|22 February 2021
Expand Down
2 changes: 1 addition & 1 deletion doc_source/security-data-protection.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For data protection purposes, we recommend that you protect {AWS-account} creden


* Use multi-factor authentication (MFA) with each account.
* Use SSL/TLS to communicate with {AWS} resources. We recommend TLS 1.2 or later.
* Use SSL/TLS to communicate with {AWS} resources.
* Set up API and user activity logging with {CTlong}.
* Use {AWS} encryption solutions, with all default security controls within {AWS-services}.
* Use advanced managed security services such as Amazon Macie, which assists in discovering and securing personal data that is stored in {S3}.
Expand Down
43 changes: 11 additions & 32 deletions doc_source/security-java-tls.adoc
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
//!!NODE_ROOT <section>
include::../../includes.txt[]

[."topic"]
[[security-java-tls,security-java-tls.title]]
= [[aws-sdk-for-java-support-for-tls-1-2, SDK for Java support for TLS 1.2]]{sdk-java} support for TLS 1.2
= [[aws-sdk-for-java-support-for-tls, SDK for Java support for TLS]]{sdk-java} support for TLS
:info_doctype: section
:info_title: {sdk-java} support for TLS 1.2
:info_titleabbrev: Enforcing TLS 1.2
:info_title: {sdk-java} support for TLS
:info_titleabbrev: Enforcing a minimum TLS Version
:info_abstract: Applies to Java SSL implementation (default SSL implementation in the SDK). Learn how the {AWS} shared responsibility model applies to data protection in this {AWS} product or service.

[abstract]
Expand All @@ -15,19 +16,14 @@ Applies to Java SSL implementation (default SSL implementation in the SDK). Lear

The following information applies only to Java SSL implementation (the default SSL implementation in the {sdk-java}). If you're using a different SSL implementation, see your specific SSL implementation to learn how to enforce TLS versions.

[[tls-support-in-java,tls-support-in-java.title]]
== TLS support in Java

TLS 1.2 is supported starting in Java 7.

[[how-to-check-the-tls-version,how-to-check-the-tls-version.title]]
== How to check the TLS version

To check what TLS version is supported in your Java virtual machine (JVM), you can use the following code.
Consult your Java virtual machine (JVM) provider's documentation to determine which TLS versions are supported on your platform. For some JVMs, the following code will print which SSL versions are supported.

[source,java]
----
System*.out.println(*Arrays*.toString(*SSLContext*.getDefault().getSupportedSSLParameters().getProtocols()));
System.out.println(Arrays.toString(SSLContext.getDefault().getSupportedSSLParameters().getProtocols()));
----

To see the SSL handshake in action and what version of TLS is used, you can use the system property **javax.net.debug**.
Expand All @@ -39,32 +35,15 @@ java app.jar -Djavax.net.debug=ssl


[[how-to-set-the-tls-version,how-to-set-the-tls-version.title]]
== How to set the TLS version

*{sdk-java} 1.x*



* Apache HTTP client: The SDK always prefers TLS 1.2 (if it's supported in the platform).

*{sdkjavav2}*
== Enforcing a minimum TLS Version

The SDK always prefers the latest TLS version supported by the platform and service. If you wish to enforce a specific minimum TLS version, consult your JVM's documentation.


* ApacheHttpClient: The SDK always prefers TLS 1.2 (if it's supported in the platform).
* UrlHttpConnectionClient: To enforce only TLS 1.2, you can use this Java command.


[source,java]
----
java app.jar -Djdk.tls.client.protocols=TLSv1.2
----

Or use this code.
For OpenJDK-based JVMs, you can use the system property **jdk.tls.client.protocols**.

[source,java]
----
System.setProperty("jdk.tls.client.protocols", "TLSv1.2");
java app.jar -Djdk.tls.client.protocols=PROTOCOLS
----

* NettyNioHttpClient: The SDK dependency for Netty is TLS 1.2 (if it's supported in the platform).
Consolt your JVM's documentation for the supported values of **PROTOCOLS**.