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.2 (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 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 your 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.
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.
We recommend that you always upgrade to the latest version of the oci-fss-utils package as soon as it's available. See File Storage Release Notes for information about new RPM version releases.
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:
If you downloaded the package to a staging instance, proceed to the next step in these instructions.
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:
Open a terminal window on 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:
If you downloaded the package, install it using the following command:
Copy
sudo yum localinstall oci-fss-utils-<version>.rpm
Oracle Linux users can directly install the TLS utility from the Oracle Linux yum repository.
Ensure that the Oracle developer yum repository is enabled for the version of Oracle Linux. For example, replace <version> with 7, 8, or 9 in the following command:
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.
Create a mount point by typing the following, replacing
yourmountpoint with the local directory from which you want
to access your 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 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. 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 above, 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 are not currently supported for mounting file
systems with the mount -t oci-fss command. You must use the
mount target IP address.
Example output from the mount -t oci-fss command:
Created symlink from /etc/systemd/system/multi-user.target.wants/oci-fss-2.service to /usr/lib/systemd/system/oci-fss-2.service.
Each time you mount a file system using this command, a new oci-fss service is initiated with an incrementing sequence number between 2 and 255. For example, oci-fss-2.service, oci-fss-3.service, and so on.
Tip
You can use the resvport option to restrict the
client to using a specific reserved port. For example:
Copy
sudo mount -t oci-fss -o resvport=900 10.x.x.x:/fs-export-path /mnt/yourmountpoint
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:
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.