You can customize the FTP server for TLS, but a better way to implement TLS security is by using AT-TLS.
Perform the following steps to customize the FTP server for TLS:
TLSRFCLEVEL DRAFT
This
is the default. The z/OS® FTP
server has supported TLS security at this level since V1R2. Code this
statement in FTP.DATA to maintain this level of support.TLSRFCLEVEL RFC4217
The
RFC On Securing FTP with TLS was published as RFC 4217
in October, 2005. The RFC differs from the Internet draft in its description
of the AUTH, CCC, and REIN commands. RFC 4217 is less restrictive
than the Internet draft regarding when the AUTH and CCC commands can
be sent to the server, and more explicit about the details of the
server REIN implementation. For more information, see RFC 4217.EXTENSIONS AUTH_TLS
If you are using client authentication and self-signed certificates, you must import the client certificates into the server key ring database. If a client certificate is signed by a CA, the CA certificate used to sign the client certificate needs to be in the server key ring database, rather than the client certificate. For more information, see Client authentication.
TLSMECHANISM ATTLS
TLSMECHANISM FTP
This
is the default setting.KEYRING server-keyring-database
For information about the KEYRING statement, see z/OS Communications Server: IP Configuration Reference.
To allow the client to decide whether to use TLS, code the following statement in the server's FTP.DATA configuration file:
SECURE_FTP ALLOWED
This
is the default setting, and indicates: SECURE_FTP REQUIRED
This
setting indicates: SECURE_LOGIN NO_CLIENT_AUTH
This
is the default. If you do want to use client authentication, the following levels of client authentication are possible:
SECURE_LOGIN REQUIRED
SECURE_LOGIN VERIFY_USER
SECURE_LOGIN VERIFY_USER
Also,
define the server's port profile in the SERVAUTH class of RACF. If you choose to use client authentication, you can also use the client certificate authentication process to eliminate the client login password prompt so that a client supplies only the login user ID to establish the session. The certificate received from the client must be registered in the security product and must be associated with the login user ID. You can use the RACDCERT ADD command to register and associate the certificate. If either the certificate is not registered or is not associated with the user ID, you will be prompted for a password.
If you do not want to use the client authentication process to eliminate the client password prompt, you can code the following statement in the server's FTP.DATA configuration file:
SECURE_PASSWORD REQUIRED
This
is the default. If you want to use the client authentication process to eliminate the client password prompt, along with your client authentication statement (either SECURE_LOGIN REQUIRED or SECURE_LOGIN VERIFY_USER), code the following statement in the server's FTP.DATA configuration file:
SECURE_PASSWORD OPTIONAL
Code a TTLSEnvironmentAdvancedParms statement with the ApplicationControlled and SecondaryMap parameters; both parameters should specify the value On. The ApplicatonControlled parameter allows FTP to start and stop TLS security on a connection. The SecondaryMap parameter enables active or passive data connections to use the AT-TLS policy that is used for the control connection. You do not need to code any additional TTLSRule statements for the data connections.
A sample Policy Agent AT-TLS configuration showing the required policy configuration statements for AT-TLS is as follows:
TTLSGroupAction secure_ftp_server_group
{
TTLSEnabled On
}
TTLSEnvironmentAction secure_ftp_server_env
{
TTLSKeyringParms
{
Keyring server-keyring-database
}
HandshakeRole Server # When Secure_Login NO_CLIENT_AUTH is coded
#HandshakeRole ServerWithClientAuth # When Secure_Login Required or Verify_User is coded
TTLSEnvironmentAdvancedParms
{
ApplicationControlled On
SecondaryMap On
}
TTLSCipherParmsRef ftp_server_ciphers # Used to customize ciphersuites for the FTP
# server
}
TTLSCipherParms ftp_server_ciphers
{
# Sample ciphers. Should be customized!
V3CipherSuites TLS_RSA_WITH_AES_256_CBC_SHA
V3CipherSuites TLS_RSA_WITH_3DES_EDE_CBC_SHA
V3CipherSuites TLS_RSA_WITH_NULL_SHA
}
TTLSRule secure_ftp_server_rule
{
LocalPortRange 21 # This should be set to the port the FTP server is
# listening on
Direction Inbound
TTLSGroupActionRef secure_ftp_server_group
TTLSEnvironmentActionRef secure_ftp_server_env
}
If using TLSMECHANISM FTP, select which cipher algorithms you prefer to use by coding a CIPHERSUITE configuration statement in the FTP.DATA file for each cipher algorithm the server can use. For a list of the cipher algorithms you can specify on the CIPHERSUITE statement, see z/OS Communications Server: IP Configuration Reference. List the CIPHERSUITE statements in FTP.DATA in the order of preference, your most preferred cipher algorithm being first. System SSL will negotiate a cipher algorithm with the server on behalf of the client using the same order of preference as is indicated by the order of CIPHERSUITE statements in FTP.DATA.
If you specify TLSMECHANISM ATTLS, select which cipher algorithms you want to use by coding a TTLSCipherParms configuration statement to specify the cipher algorithms that the server can use. For a list of the cipher algorithms you can specify with the TTLSCipherParms statement, see z/OS Communications Server: IP Configuration Reference. List the ciphers in the order of preference, your most preferred cipher algorithm first. The cipher algorithm is negotiated with the server on behalf of the client using the same order of preference as indicated by the order of the TTLSCipherParms statement.
This setting is customized using the SECURE_DATACONN configuration statement. You should understand that its setting affects both TLS security behavior and Kerberos security behavior.
If you want the server to require that data is transferred raw with no cipher algorithm applied to the data and that clients attempting to use ciphers are rejected, code the following statement in the server's FTP.DATA configuration file:
SECURE_DATACONN NEVER
If you want the client to decide whether data is transferred raw or enciphered, you can code the following statement in the server's FTP.DATA configuration file:
SECURE_DATACONN CLEAR
This is the
default. For TLS, the client decides whether data is enciphered or not. If it indicates it should be enciphered, the cipher algorithm is negotiated between the server and the client using TLS protocols. For Kerberos, the client can specify whether data is transferred raw, integrity protected only, or both integrity and privacy protected.
If you want the server to require that data is transferred enciphered and that clients attempting to send raw data are rejected, code the following statement in the server's FTP.DATA configuration file:
SECURE_DATACONN PRIVATE
For TLS, the cipher algorithm is negotiated between the server and the client using TLS protocols. For Kerberos, the data must be transferred using both integrity and privacy protection. Clients attempting to send data that is only integrity protected are rejected.