How to Isolate a Labeled File System in a Zone
You have enabled a label encodings file that includes the Confidential - Restricted label.
Although access to sensitive data can be restricted to users and roles based on their clearances, a label policy does not prevent cleared users or roles from copying labeled data to unlabeled directories. One way to prevent such data loss is to enable Trusted Extensions. However, you can also use standard Oracle Solaris Zones to provide an additional layer of protection.
Example 3-3 Isolating Labeled File Systems in a Zone
This example describes how to create a labeled zone where authorized users can work on Confidential - Restricted
files.
-
The administrator creates a labeled file system that can contain files at different labels and a zone to mount it. In the mounting zone, the administrator authorizes users to log in, adds the labeled file system, and then installs the zone.
# zfs create -o multilevel=on -o encryption=on -o mountpoint=/multi-r rpool/multi-r # chmod 777 /multi-r # setlabel "Confidential - Restricted" /multi-r
# zonecfg -z restricted zonecfg> create -b zonecfg> set brand=solaris zonecfg> remove anet zonecfg> add admin zonecfg> set user=user1 zonecfg> set auths=login zonecfg> end zonecfg> add fs zonecfg> set dir=/multi-r zonecfg> set special=/multi-r zonecfg> set type=lofs zonecfg> add options rw zonecfg> end zonecfg> exit # zoneadm -z restricted install
-
The administrator assigns the user a higher clearance in the zone context.
# zlogin restricted # usermod -K clearance="Confidential - Restricted" user1
-
The administrator tests the user's clearance in the zone context.
user1@global$ pfbash ; plabel Confidential - Internal user1@global$ zlogin -l user1 restricted user1@restricted$ pfbash ; plabel Confidential - Restricted
User
user1
has a higher clearance in therestricted
zone. -
After halting the zone, the administrator gives other trusted users access to the
restricted
zone, then boots the zone.# zoneadm -z restricted shutdown # zonecfg -z restricted zonecfg> set admin zonecfg> set user=user2 zonecfg> set auths=login zonecfg> set user=user3 zonecfg> set auths=login zonecfg> commit zonecfg> end zonecfg> exit # zoneadm -z restricted boot