Note:

Configure Oracle Cloud Infrastructure File Storage Service with Active Directory User Access Control

Introduction

This tutorial provides a step-by-step approach to integrating Active Directory (AD) users with unique user ID (UID)/group ID (GID) mapping for secure access to Oracle Cloud Infrastructure (OCI) File Storage service using the Windows Network File System (NFS) client. It ensures proper authentication and access control by leveraging Active Directory permissions, enabling organizations to restrict file system access to specific users and groups while maintaining compliance with enterprise security policies.

By enabling UID/GID mapping in Active Directory and using Windows security permissions, you can:

In this tutorial, we will create an OCI File Storage and a mount target in the same Virtual Cloud Network (VCN) as your Active Directory Domain Services (AD DS) and domain-joined Windows virtual machine (VM) for seamless integration and access control from Task 1 to 4 and enable Active Directory integration for OCI File Storage, create users with specific UID/GID mappings, and enforce folder-level access restrictions from Task 5 to 8.

Objectives

Prerequisites

Task 1: Create an OCI File Storage

  1. Log in to the OCI Console, navigate to Storage and click File Storage.

  2. Click Create File System and enter the following information.

    • Compartment: Select an appropriate compartment.
    • Name: Enter a descriptive name. For example, AD-Integrated-FSS.
  3. Click Create to provision the file system.

Task 2: Create a Mount Target in the Same VCN

  1. Go to the OCI Console, navigate to File Storage and click Mount Targets.

  2. Click Create Mount Target and enter the following information.

    • Compartment: Select the same compartment as your OCI File Storage.
    • Name: Enter a name. For example, AD-MountTarget.
    • Virtual Cloud Network (VCN): Select the same VCN where your domain controller and domain-joined VM are deployed.
    • Subnet: Select a private or public subnet in the VCN (ensure it allows NFS traffic).
    • Hostname: Enter a hostname for the mount target.
  3. Click Create Mount Target and wait for it to be provisioned.

    Create_FSS_Export

Task 3: Configure Security Rules for NFS Access

  1. Go to the OCI Console, navigate to Networking, Virtual Cloud Networks (VCN) and select your VCN.

  2. Click Security Lists and update the Ingress Rules for the mount target’s subnet with the following information.

    • Source CIDR: The subnet containing your domain controller and domain-joined VM.
    • Protocol: Select TCP.
    • Port Range: Enter 2049 (for NFS).
  3. Add an Egress Rule to allow outbound traffic from the mount target’s subnet with the following information.

    • Destination CIDR: Enter 0.0.0.0/0.
    • Protocol: Select TCP.
    • Port Range: Enter 2049.

    If using security groups, ensure your domain controller, domain-joined VM, and mount target are in the same group, with NFS (TCP 2049) and DNS (TCP/UDP 53) allowed.

Task 4: Verify Connectivity

  1. Log in to the domain-joined Windows VM.

  2. Test connectivity to the mount target using the ping or nslookup command.

    ping <MOUNT_TARGET_IP>
    nslookup <MOUNT_TARGET_HOSTNAME>
    

    Ensure the domain controller and Windows VM can resolve the mount target hostname using DNS.

Task 5: Configure Active Directory Users with UID/GID Attributes

  1. Open Active Directory Users and Computers (ADUC).

  2. In Domain Controller, open ADUC (dsa.msc), click View and enable Advanced Features.

    ADUsers_Advance_Setting

  3. Create Users with RFC2307 attributes.

    1. Navigate to Users under your domain. For example, fs-ad.com.

    2. Create the following users and set RFC2307 attributes.

      User UID Number GID Number Description
      fssadmin 0 0 FSS Administrator
      applicationuser1 101 501 App User 1
      applicationuser2 102 502 App User 2

      ADUsers_set_uid

      ADUsers_set_gid

  4. Modify user attributes.

    1. Right-click each user and click Properties.

    2. Navigate to Attribute Editor and update the following RFC2307 attributes.

      • objectClass: Add posixAccount.
      • uidNumber: Assign values from the table in Task 5.3.
      • gidNumber: Assign values from the table in Task 5.3.
      • uid: Set as sAMAccountName.
    3. Click Apply and OK.

Task 6: Configure OCI File Storage Permissions

  1. Set OCI File Storage main folder with 0 UID/GID (root access for fssadmin).

    1. Go to the OCI Console, navigate to File Storage and click File Systems.

    2. Click your OCI File Storage instance and select the main folder.

    3. Click Advanced Permissions and enter the following information.

      • UID: Enter 0.
      • GID: Enter 0.
  2. Create and restrict application-specific folders.

    1. Inside the OCI File Storage main folder, create two folders with the following information.

      • Folder1: For applicationuser1 with uid=101.
      • Folder2: For applicationuser2 with uid=102.
    2. Click Advanced Options and set folder permissions.

      • Folder1:

        • UID: Enter 101.
        • GID: Enter 501.
      • Folder2:

        • UID: Enter 102.
        • GID: Enter 502.

Task 7: Mount OCI File Storage on Domain-Joined Windows VMs

  1. Log in to the domain-joined Windows VM as applicationuser1 or applicationuser2.

  2. Open Command Prompt as Administrator.

  3. Mount OCI File Storage using the mount target IP.

    mount -o sec=sys Mount_Target_IP:/<EXPORT_PATH> S:
    

    Note:

    • Replace <MOUNT_TARGET_IP> with the mount target’s IP.

    • Replace <EXPORT_PATH> with OCI File Storage export path.

  4. Verify the mount using the following command.

    net use
    

    Ensure S: is successfully mounted.

    Mount_FSS_Export

Task 8: Validate Folder Access Restrictions

Manage File Attributes in OCI File Storage to Prevent :Zone.Identifier Attachment on Windows

Issue: :Zone.Identifier attachment to OCI File Storage files on Windows.

When copying files to OCI File Storage mounted on Windows, an alternate data stream (:Zone.Identifier) may be appended to files. This happens because Windows uses zone identifier metadata to track the security zone of downloaded files, primarily to prevent execution of potentially unsafe content.

Since OCI File Storage uses the NFS protocol, which supports extended attributes but does not natively handle Windows-specific NTFS alternate data streams (ADS), these :Zone.Identifier streams may be unintentionally retained when files are copied. This can cause unexpected security warnings or issues when executing files.

To prevent this, follow these steps on every client VM’s accessing this OCI File Storage mount target drive.

  1. Click Internet (inetcpl.cpl) on the domain client machine.

  2. Go to the Security tab, select Local intranet and click Sites.

  3. Click Advanced and add your OCI File Storage mount target hostname (the mss mount point \fss-mount-target or \IP-Address-FSS).

    Zone_Identifier_Issue_Solution

Acknowledgments

More Learning Resources

Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.

For product documentation, visit Oracle Help Center.