In-transit encryption using oci-fss-utils or stunnel provides a way to secure your data between instances and mounted file systems using TLS v.1.3 (Transport Layer Security) encryption. Together with other methods of security such as Oracle Cloud Infrastructure
Vault and File Storage's encryption-at-rest, in-transit encryption provides for end-to-end security.
Tip
If you use Kerberos for authentication, the KRB5P security option provides authentication over NFS, data integrity (unauthorized modification of data in-transit), and data privacy as an alternative in-transit encryption option.
In-transit encryption using oci-fss-utils or stunnel doesn't require any updates to your file system's mount target or export configuration, but the steps differ for Linux users and Windows users.
Only the rules for TCP port 2051 are required for encrypted access.
In-transit Encryption for Linux Users 🔗
To enable in-transit encryption, you install a package called oci-fss-utils on the instance. The oci-fss-utils tool is available for the following instance types:
Oracle Linux, CentOS 7 x86
Oracle Linux, CentOS 8 x86
Oracle Linux, CentOS 9 x86
Oracle Linux, CentOS 7 Arm*
Oracle Linux, CentOS 8 Arm*
Oracle Linux, CentOS 9 Arm*
*Oracle offers an Arm-based compute platform based on the Ampere Altra processor. See Arm-Based Compute for more information.
How In-transit Encryption is Enabled 🔗
The oci-fss-utils package creates a network namespace and virtual
network interface on your instance and provides a local NFS endpoint. The
oci-fss-utils package also runs a forwarder process in the
background called oci-fss-forwarder.
The network namespace isolates the forwarder process from the instance's networking environment. The virtual network interface provides the forwarder process a unique IP address. The local NFS endpoint provides NFS connection capability.
The file system is mounted using a special command that initiates encryption. After the file system is mounted, the oci-fss-forwarder process connects the local NFS client to the NFS endpoint. The process then receives requests from the NFS client, encrypts them and sends them to the mount target using a TLS tunnel.
Here are the general steps for setting up In-transit encryption:
Ensure that you meet the prerequisites before setting up in-transit encryption.
The in-transit encryption installation package is distributed as an RPM for Oracle Linux and CentOS. Oracle Linux users can install the package using yum. It can also be downloaded from the Oracle Linux yum Repository.
You must install the oci-fss-utils package on every instance that
requires encrypted access to a mount target.
The number of encrypted NFS/TLS connections for a single mount target is limited to 4096.
DNS hostnames aren't supported for mounting encrypted file systems with oci-fss-forwarder. Use the mount target IP address to mount encrypted file systems.
Important
If you're not using the latest version of the oci-fss-utils package, you might experience SSL connection failures. SSL connection failures can cause NFSv3 operations to fail.
The package creates a namespace called ns1 in your instance, which contains a default network interface for ethernet traffic. A network interface pair is created for each mount target.
Internet access is required to download the RPM installation package. If the destination instance doesn't have internet access, you can download the RPM to a staging instance on your network and then use the scp command to securely copy the RPM from the staging instance to the destination instance.
The scp command requires an SSH key pair to authenticate a remote user. If your instances are UNIX-style systems, you probably already have the ssh-keygen utility installed. To check if it's installed, open a shell or terminal and type ssh-keygen on the command line. If it's not installed, you can obtain OpenSSH for UNIX from http://www.openssh.com/portable.html.
(Optional) Create a directory for the RPM installation package on the destination instance. For example:
Copy
sudo mkdir -p /<rpm_directory_name>
Download the latest oci-fss-utils package from the Oracle Linux yum Repository to the directory on the destination instance or to a staging instance on your network.
Under Packages for Test and Development, find Developer Packages and then select the Linux architecture type, such as x86_64 or aarch64.
Find and select the latest version of the oci-fss-utils package. For more information about the latest version, see File Storage Release Notes.
If you downloaded the package to a staging instance, open a terminal window on the staging instance, and use the scp command to securely copy the RPM from the staging instance to the destination instance. For example:
Skip this step if you downloaded the package directly to the destination instance.
If the file name of the downloaded package doesn't include the package version and architecture, use the following command to identify the RPM file to be installed:
rpm -qp <downloaded_file_name>
After the package is identified, rename the file using the RPM returned by the query. For example:
The package creates a namespace called ns1 in the instance, which contains a default network interface for ethernet traffic. A network interface pair is created for each mount target.
Create a mount point by typing the following, replacing yourmountpoint with the local directory from which you want to access the file system.
Copy
sudo mkdir -p /mnt/yourmountpoint
Mount the file system using the following command:
Copy
sudo mount -t oci-fss 10.x.x.x:/fs-export-path /mnt/yourmountpoint
Replace 10.x.x.x: with the local subnet IP address assigned to the mount target, fs-export-path with the export path you specified when associating the file system with the mount target, and yourmountpoint with the path to the local mount point. The export path is the path to the file system (relative to the mount target IP address).
If you have installed oci-fss-utils version 2.0-1 or later, you can mount the file system in FIPS approved mode by including -o fips in the mount command. For example:
sudo mount -t oci-fss -o fips 10.x.x.x:/fs-export-path /mnt/yourmountpoint
Important
DNS hostnames aren't supported for mounting file systems with the mount -t oci-fss command. You must use the mount target IP address.
Each time you mount a file system using this command, systemd-managed service creates a new oci-fss-forwarder service with a name such as oci-fss-0<number>.service.
Tip
By default, the tool's NFS client uses reserved ports during mounting. Use the mount option noresvport if you need to use non-privileged ports.
Replace 10.x.x.x: with the local subnet IP address assigned to your mount target, fs-export-path with the export path you specified when associating the file system with the mount target, and yourmountpoint with the path to the local mount point.
If you have installed oci-fss-utils version 2.0-1 or above, you can mount the file system in FIPS approved mode by including -o fips in the mount command. For example:
If you're using a deprecated version of the oci-fss-utils utility, such as oci-fss-utils-3.x, or you want to take advantage of new features, you can upgrade to a newer version. You can find version information in the File Storage Release Notes.
When upgrading oci-fss-utils to a new version, any new settings, such as a new IP address or TLS forwarder process name, won't be applied until the file system is remounted.
Note
Remounting is required if you're upgrading the oci-fss-utils utility so that the TLS client can use an IPv6 address. Applications using the mounted file system will experience downtime while you remount the file system.
Open a terminal window on the destination instance.
Upgrade the package.
Oracle Linux users can upgrade oci-fss-utils from the Oracle Linux yum repository. Ensure that the Oracle developer yum repository is enabled for the version of Oracle Linux using the following command:
Then, upgrade the package using the following command:
Copy
sudo yum update -y oci-fss-utils
If you don't use Oracle Linux, download the latest oci-fss-utils package from the Oracle Linux yum repository. For instructions, see Manual and offline installation. Then, upgrade the package using the following command:
First, unmount all mounted file systems. For instructions, see Unmount a file system.
Open a terminal window on the instance.
Type the following command to uninstall the oci-fss package:
Copy
sudo yum remove oci-fss-utils
In-transit Encryption for Windows Users 🔗
Windows clients can use stunnel to enable in-transit encryption to file systems.
Limitations and Considerations 🔗
The number of encrypted NFS/TLS connections for a single mount target is limited to
64. This limitation is caused by TLS memory requirements. Unlike NFS connections,
TLS connections do not share memory buffers. So, once a TLS connection has been
established, the allocated memory stays dedicated to it.
DNS hostnames are not supported for mounting encrypted file systems. Use the mount
target IP address to mount encrypted file systems.
Setting up In-transit Encryption for Windows 🔗
These instructions describe how to install and set up stunnel to use in-transit
encryption with your file systems. Ensure that you meet the prerequisites before setting up
in-transit encryption.
Tip
You can automate this process by using a batch script that contains the
following steps.