이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 4. Configuring TLS/SSL encryption
You can secure Data Grid Server connections using SSL/TLS encryption by configuring a keystore that contains public and private keys for Data Grid. You can also configure client certificate authentication if you require mutual TLS.
4.1. Configuring Data Grid Server keystores
Add keystores to Data Grid Server and configure it to present SSL/TLS certificates that verify its identity to clients. If a security realm contains TLS/SSL identities, it encrypts any connections to Data Grid Server endpoints that use that security realm.
Prerequisites
- Create a keystore that contains certificates, or certificate chains, for Data Grid Server.
				Data Grid Server supports the following keystore formats: JKS, JCEKS, PKCS12/PFX and PEM. BKS, BCFKS, and UBER are also supported if the Bouncy Castle library is present. When using client hostname validation, according to the rules defined by the RFC 2818 specification, server certificates should include the subjectAltName extension of type dNSName and/or iPAddress.
			
In production environments, server certificates should be signed by a trusted Certificate Authority, either Root or Intermediate CA.
You can use PEM files as keystores if they contain both of the following:
- A private key in PKCS#1 or PKCS#8 format.
- One or more certificates.
				You should also configure PEM file keystores with an empty password (password="").
			
Procedure
- Open your Data Grid Server configuration for editing.
- 
						Add the keystore that contains SSL/TLS identities for Data Grid Server to the $RHDG_HOME/server/confdirectory.
- 
						Add a server-identitiesdefinition to the Data Grid Server security realm.
- 
						Specify the keystore file name with the pathattribute.
- 
						Provide the keystore password and certificate alias with the keystore-passwordandaliasattributes.
- Save the changes to your configuration.
Next steps
Configure clients with a trust store so they can verify SSL/TLS identities for Data Grid Server.
Keystore configuration
XML
JSON
YAML
4.1.1. Generating Data Grid Server keystores
Configure Data Grid Server to automatically generate keystores at startup.
Automatically generated keystores:
- Should not be used in production environments.
- Are generated whenever necessary; for example, while obtaining the first connection from a client.
- Contain certificates that you can use directly in Hot Rod clients.
Procedure
- Open your Data Grid Server configuration for editing.
- 
							Include the generate-self-signed-certificate-hostattribute for thekeystoreelement in the server configuration.
- Specify a hostname for the server certificate as the value.
- Save the changes to your configuration.
Generated keystore configuration
XML
JSON
YAML
4.1.2. Configuring TLS versions and cipher suites
When using SSL/TLS encryption to secure your deployment, you can configure Data Grid Server to use specific versions of the TLS protocol as well as specific cipher suites within the protocol.
Procedure
- Open your Data Grid Server configuration for editing.
- 
							Add the engineelement to the SSL configuration for Data Grid Server.
- Configure Data Grid to use one or more TLS versions with the - enabled-protocolsattribute.- Data Grid Server supports TLS version 1.2 and 1.3 by default. If appropriate you can set - TLSv1.3only to restrict the security protocol for client connections. Data Grid does not recommend enabling- TLSv1.1because it is an older protocol with limited support and provides weak security. You should never enable any version of TLS older than 1.1.Warning- If you modify the SSL - engineconfiguration for Data Grid Server you must explicitly configure TLS versions with the- enabled-protocolsattribute. Omitting the- enabled-protocolsattribute allows any TLS version.- <engine enabled-protocols="TLSv1.3 TLSv1.2" /> - <engine enabled-protocols="TLSv1.3 TLSv1.2" />- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Configure Data Grid to use one or more cipher suites with the - enabled-ciphersuitesattribute (for TLSv1.2 and below) and the- enabled-ciphersuites-tls13attribute (for TLSv1.3).- You must ensure that you set a cipher suite that supports any protocol features you plan to use; for example - HTTP/2 ALPN.
- Save the changes to your configuration.
SSL engine configuration
XML
JSON
YAML
4.2. Configuring Data Grid Server on a system with FIPS 140-2 compliant cryptography
FIPS (Federal Information Processing Standards) are standards and guidelines for US federal computer systems. Although FIPS are developed for use by the US federal government, many in the private sector voluntarily use these standards.
FIPS 140-2 defines security requirements for cryptographic modules. You can configure your Data Grid Server to use encryption ciphers that adhere to the FIPS 140-2 specification by using alternative JDK security providers.
Additional resources
4.2.1. Configuring the PKCS11 cryptographic provider
					You can configure the PKCS11 cryptographic provider by specifying the PKCS11 keystore with the SunPKCS11-NSS-FIPS provider.
				
Prerequisites
- 
							Configure your system for FIPS mode. You can check if your system has FIPS Mode enabled by issuing the fips-mode-setup --checkcommand in your Data Grid command-line Interface (CLI)
- 
							Initialize the system-wide NSS database by using the certutiltool.
- 
							Install the JDK with the java.securityfile configured to enable theSunPKCS11provider. This provider points to the NSS database and the SSL provider.
- Install a certificate in the NSS database.
						The OpenSSL provider requires a private key, but you cannot retrieve a private key from the PKCS#11 store. FIPS blocks the export of unencrypted keys from a FIPS-compliant cryptographic module, so you cannot use the OpenSSL provider for TLS when in FIPS mode. You can disable the OpenSSL provider at startup with the -Dorg.infinispan.openssl=false argument.
					
Procedure
- Open your Data Grid Server configuration for editing.
- 
							Add a server-identitiesdefinition to the Data Grid Server security realm.
- 
							Specify the PKCS11 keystore with the SunPKCS11-NSS-FIPSprovider.
- Save the changes to your configuration.
Keystore configuration
XML
JSON
YAML
4.2.2. Configuring the Bouncy Castle FIPS cryptographic provider
You can configure the Bouncy Castle FIPS (Federal Information Processing Standards) cryptographic provider in your Data Grid server’s configuration.
Prerequisites
- 
							Configure your system for FIPS mode. You can check if your system has FIPS Mode enabled by issuing the fips-mode-setup --checkcommand in your Data Grid command-line Interface (CLI).
- Create a keystore in BCFKS format that contains a certificate.
Procedure
- 
							Download the Bouncy Castle FIPS JAR file, and add the file to the server/libdirectory of your Data Grid Server installation.
- To install Bouncy Castle, issue the - installcommand:- [disconnected]> install org.bouncycastle:bc-fips:1.0.2.3 - [disconnected]> install org.bouncycastle:bc-fips:1.0.2.3- Copy to Clipboard Copied! - Toggle word wrap Toggle overflow 
- Open your Data Grid Server configuration for editing.
- 
							Add a server-identitiesdefinition to the Data Grid Server security realm.
- 
							Specify the BCFKS keystore with the BCFIPSprovider.
- Save the changes to your configuration.
Keystore configuration
XML
JSON
YAML
4.3. Configuring client certificate authentication
Configure Data Grid Server to use mutual TLS to secure client connections.
You can configure Data Grid to verify client identities from certificates in a trust store in two ways:
- Require a trust store that contains only the signing certificate, which is typically a Certificate Authority (CA). Any client that presents a certificate signed by the CA can connect to Data Grid.
- Require a trust store that contains all client certificates in addition to the signing certificate. Only clients that present a signed certificate that is present in the trust store can connect to Data Grid.
Alternatively to providing trust stores you can use shared system certificates.
Prerequisites
- Create a client trust store that contains either the CA certificate or all public certificates.
- Create a keystore for Data Grid Server and configure an SSL/TLS identity.
					PEM files can be used as trust stores provided they contain one or more certificates. These trust stores should be configured with an empty password: password="".
				
Procedure
- Open your Data Grid Server configuration for editing.
- 
						Add the require-ssl-client-auth="true"parameter to yourendpointsconfiguration.
- 
						Add the client trust store to the $RHDG_HOME/server/confdirectory.
- 
						Specify the pathandpasswordattributes for thetruststoreelement in the Data Grid Server security realm configuration.
- 
						Add the <truststore-realm/>element to the security realm if you want Data Grid Server to authenticate each client certificate.
- Save the changes to your configuration.
Next steps
- Set up authorization with client certificates in the Data Grid Server configuration if you control access with security roles and permissions.
- Configure clients to negotiate SSL/TLS connections with Data Grid Server.
Client certificate authentication configuration
XML
JSON
YAML
4.4. Configuring authorization with client certificates
Enabling client certificate authentication means you do not need to specify Data Grid user credentials in client configuration, which means you must associate roles with the Common Name (CN) field in the client certificate(s).
Prerequisites
- Provide clients with a Java keystore that contains either their public certificates or part of the certificate chain, typically a public CA certificate.
- Configure Data Grid Server to perform client certificate authentication.
Procedure
- Open your Data Grid Server configuration for editing.
- 
						Enable the common-name-role-mapperin the security authorization configuration.
- 
						Assign the Common Name (CN) from the client certificate a role with the appropriate permissions.
- Save the changes to your configuration.
Client certificate authorization configuration
XML
JSON
YAML