이 콘텐츠는 선택한 언어로 제공되지 않습니다.
20.7. Securing Interfaces
While the Hot Rod interface may be secured programmatically, both the memcached and REST interfaces must be secured declaratively. Instructions for securing these interfaces are located in the JBoss Data Grid Administration and Configuration Guide.
20.7.1. Hot Rod Interface Security 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
20.7.1.1. Encryption of communication between Hot Rod Server and Hot Rod client 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Hot Rod can be encrypted using TLS/SSL, and has the option to require certificate-based client authentication.
Use the following procedure to secure the Hot Rod connector using SSL.
Example 20.4. Secure Hot Rod Using SSL/TLS
Important
To prevent plain text passwords from appearing in configurations or source codes, plain text passwords should be changed to Vault passwords. For more information about how to set up Vault passwords, see the Red Hat Enterprise Application Platform Security Guide.
20.7.1.2. Securing Hot Rod to LDAP Server using SSL 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
When connecting to an LDAP server with SSL enabled it may be necessary to specify a trust store or key store containing the appropriate certificates.
PLAIN
authentication over SSL may be used for Hot Rod client authentication against an LDAP server. The Hot Rod client sends plain text credentials to the JBoss Data Grid server over SSL, and the server subsequently verifies the provided credentials against the specified LDAP server. In addition, a secure connection must be configured between the JBoss Data Grid server and the LDAP server. Refer to the JBoss Data Grid Administration and Configuration Guide for additional information on configuring the server to communicate to an LDAP backend. The example below demonstrates configuring PLAIN
authentication over SSL on the Hot Rod client side:
Example 20.5. Hot Rod Client Authentication to LDAP Server
Important
To prevent plain text passwords from appearing in configurations or source codes, plain text passwords should be changed to Vault passwords. For more information about how to set up Vault passwords, see the Red Hat Enterprise Application Platform Security Guide.
20.7.1.3. User Authentication over Hot Rod Using SASL 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
User authentication over Hot Rod can be implemented using the following Simple Authentication and Security Layer (SASL) mechanisms:
PLAIN
is the least secure mechanism because credentials are transported in plain text format. However, it is also the simplest mechanism to implement. This mechanism can be used in conjunction with encryption (SSL) for additional security.DIGEST-MD5
is a mechanism than hashes the credentials before transporting them. As a result, it is more secure than thePLAIN
mechanism.GSSAPI
is a mechanism that uses Kerberos tickets. As a result, it requires a correctly configured Kerberos Domain Controller (for example, Microsoft Active Directory).EXTERNAL
is a mechanism that obtains the required credentials from the underlying transport (for example, from aX.509
client certificate) and therefore requires client certificate encryption to work correctly.
20.7.1.3.1. Configure Hot Rod Authentication (GSSAPI/Kerberos) 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Use the following steps to set up Hot Rod Authentication using the SASL GSSAPI/Kerberos mechanism:
Procedure 20.1. Configure SASL GSSAPI/Kerberos Authentication - Client-side Configuration
- Ensure that the Server-Side configuration has been completed. As this is configured declaratively this configuration is found in the JBoss Data Grid Administration and Configuration Guide.
- Define a login module in a login configuration file (
gss.conf
) on the client side:GssExample { com.sun.security.auth.module.Krb5LoginModule required client=TRUE; };
GssExample { com.sun.security.auth.module.Krb5LoginModule required client=TRUE; };
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Set up the following system properties:
java.security.auth.login.config=gss.conf java.security.krb5.conf=/etc/krb5.conf
java.security.auth.login.config=gss.conf java.security.krb5.conf=/etc/krb5.conf
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note
Thekrb5.conf
file is dependent on the environment and must point to the Kerberos Key Distribution Center. - Implement the
CallbackHandler
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the Hot Rod Client, as seen in the below snippet:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
20.7.1.3.2. Configure Hot Rod Authentication (MD5) 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Use the following steps to set up Hot Rod Authentication using the SASL using the MD5 mechanism:
- Ensure that the server has been configured for MD5 Authentication. Instructions for performing this configuration on the server are found in JBoss Data Grid's Administration and Configuration Guide.
- Implement the
CallbackHandler
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Connect the client to the configured Hot Rod connector as seen below:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
20.7.2. Hot Rod C++ Client Encryption 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
By default all communication with the remote server is unencrypted; however, TLS encryption may be enabled by defining the server's key via the
serverCAFile
method on the SslConfigurationBuilder
. Additionally, the client's certificate may be defined with the clientCertificateFile
, allowing for client authentication.
Important
TLS Encryption is a Technology Preview feature of the Hot Rod C++ Client in JBoss Data Grid 7.0.0.
The following example demonstrates defining a server key with an optional client certificate:
Example 20.6. Hot Rod C++ TLS Example
20.7.3. Hot Rod C# Client Encryption 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
By default all communication with the remote server is unencrypted; however, TLS encryption may be enabled by defining the server's key via the
ServerCAFile
method on the SslConfigurationBuilder
. Additionally, the client's certificate may be defined with the ClientCertificateFile
, allowing for client authentication.
Important
TLS Encryption is a Technology Preview feature of the Hot Rod C# Client in JBoss Data Grid 7.0.0.
The following example demonstrates defining a server key with an optional client certificate:
Example 20.7. Hot Rod C# TLS Example