Contained Within
Find More DocumentationFeatured Support Resources | Scarica il manuale in formato PDF (1139 KB)
Chapter 12 Managing DevicesThis chapter describes how to protect information on devices. This chapter contains the following procedures: Controlling Access to DevicesThe system administrator controls access to peripheral devices. Users can use a device only when the System Administrator role makes the device allocatable. Devices that the System Administrator makes nonallocatable cannot be used by anyone. Allocatable devices can be allocated only by authorized users. The Security Administrator role restricts the labels at which a device can be accessed. Following are some highlights of device management in the Trusted Solaris environment:
Setting a Label RangeTo restrict direct login access through the console, the Security Administrator role can set a restricted label range on the framebuffer. For example, a restricted label range might be specified to limit access to a publicly accessible computer. The label range enables users to access the computer only at a label within the framebuffer's label range. When a host has a local printer, a restricted label range on the printer limits the jobs that it can print. Managing Device Access PoliciesIn the Trusted Solaris operating environment, as in other UNIX systems, devices are represented by files called device special files. The discretionary access rules for devices are based on the same UNIX permission bits that apply to other types of files. The mandatory access rules that apply to devices are slightly different from those that apply to files or directories. The following table shows the default mandatory access control policy. These policies automatically apply to any new devices added to the system. Table 12-1 Default Device Access Policy
The Security Administrator role can change default policies and define new policies on each host by editing the /etc/security/tsol/device_policy file. Changes go into effect after a reboot. See the device_policy(4) man page for the keywords and values to use, and see also "To Set or Modify Device Policy for a Device". Initial Device Configuration DecisionsWhen configuring the Trusted Solaris environment on every system, the Security Administrator role sets device policy. After the system is up and running, the System Administrator role uses the Device Allocation Manager to add and configure devices, and to revoke an allocation, reclaim an allocated device from an allocate error state, or delete a device. At system configuration, the Security Administrator needs to make the following decisions:
Managing DevicesThe add_allocatable(1M), and remove_allocatable(1M) commands, the Add Allocatable Device action, and the Device Allocation Manager make changes to local versions of the device_allocate(4) and device_maps(4) files on the host on which they are run. The following figure shows the Device Allocation Manager. The manager lists the allocatable devices currently present on the local system. ![]() The Device Allocation Manager can be used only by users or roles that have the Allocate Device authorization. The Device Administration button is visible to roles that have either one or both of the authorizations needed to administer devices, Configure Device Attributes, and Revoke or Reclaim Device. Making a Device AvailableUsers see an empty list when they are not authorized to allocate devices, or when the allocatable devices are currently allocated by another user or are in an error state. If a user cannot see a device in the Available Devices list, the user needs to contact the responsible administrator.
Using the Device Allocation ManagerClicking the Device Administration button launches the Device Allocation: Administration dialog box. This dialog box is used for reclaiming and revoking devices, deleting, or making entries for new devices. ![]() Revoke - Click to force deallocation of the selected device. Reclaim - Click to release the selected device from the allocate error state and leave it deallocated. New and Configure - Click to create a new device or configure an existing device. Configuring a DeviceThis section describes the information that can be specified for a device using the Device Allocation Configuration dialog box shown in the following figure. Figure 12-1 Device Allocation Configuration Dialog
Device Name and Device Type - Displays the name and device type. These fields can be edited when creating a new device.
Min Label and Max Label - Click to set the label range on the device. The default label range is Clean Program - Enter the path of a device_clean(1M) script for an allocatable device. If no device_clean script is specified at the time the device is created, the default is /bin/true. For how to write device clean scripts, see "Using Device-Clean Scripts". For Allocations From: Trusted Path or Non-Trusted Path - Click (Trusted Path) to require users to use the Device Allocation Manager when allocating the device. Click remote (Non-Trusted Path) to enable users to use the allocate command in a script or when remotely logged in to allocate the device. By default, the Allocate Devices authorizations enables allocation from the trusted path and from outside the trusted path. Sites that are concerned about the potential risk of remote device allocation can restrict it. See "Authorizing Device Allocation" for an example. Allocatable By - Click one of Authorized Users, All Users, or No Users. The No Users option is used most often for the framebuffer and printer, which do not have to be allocated to be used. But it is also used as shown in Table 12-3, to prevent an allocatable device from being accessed. If no authorization is specified at the time the device is created, the default is All Users. If an authorization is specified, the default is Authorized Users. Because the Add Allocatable action sets up a new device as allocatable by all users, the Security Administrator needs to click Allocatable By No Users when a device, such as the frame buffer and printers, should not be allocatable by anyone.
Authorizations - Click to change from the default authorization, Deallocation Options - Click Deallocate on Boot or Deallocate on Logout. to specify that any devices that are allocated by a directly-logged-in user are deallocated either at logout or at system boot or both. Note - These options do not affect any devices allocated outside the trusted path (either during a remote login, or from a script or customer-written application) . Also, the boot command with the -r option can be used to force the deallocation of all devices at boot time. Leaving devices allocated after logout could enable remote access to a device that otherwise can only be allocated locally. For example, a user could log in to one computer, allocate a device, then log out. The user then could log back in remotely to the first computer. During that remote session, the first computer's microphone could transmit the talk around the first computer. Handling of Allocated Devices at BootAt boot time, by default, allocated devices are reallocated and remounted. The administrator can override the default at boot-time by entering the device_clean(1M)boot command with the -r option. To change the default permanently, the administrator checks the deallocation options in the Device Allocation Manager for every device that the administrator wants to Deallocate on Boot or Deallocate on Logout. Authorizing Device AllocationThe Allocate Device authorization enables users to allocate a device and to specify the label to associate with information imported from it, or exported to it. However, site security policy may require that you create separate authorizations for devices that are allocated from the trusted path and devices that are allocated without the trusted path. The following table shows an example: Table 12-2 Requiring Separate Authorizations for Local and Remote Device Use
Alternatively, a site can allow a device to be allocatable only during local login sessions. Table 12-3 Specifying Only Local Allocation of the Audio Device
For added security around device allocation, the Security Administrator role can create a new allocate authorization, such as Allocate Remote Device. See "Adding New Authorizations" and do "To Add an Authorization to the Environment". Enforcing Device SecurityThe security administrator decides who can allocate devices. The security administrator should make sure that any user who is authorized to use devices is trained and can be trusted to do the following:
The Security Administrator role also is responsible for enforcing proper compliance with the above-mentioned requirements. Recovering From the Allocate Error StateAs shown in Table 12-5, an allocatable device is in an error state if its ancillary file is owned by user bin and group bin with a device special file mode of 0100 and label of ADMIN_HIGH. One way that a device can be put into an allocate error state is by the device_clean(1M) scripts. A device-clean script puts a device into the allocate error state during deallocation until the user responds to prompts from the script and removable media is ejected. A role with the Reclaim or Revoke authorization can use the Device Allocaiton Manager to reclaim devices from the error state. Using Device-Clean ScriptsA device-clean script is run any time a device is allocated or deallocated. The user who allocates the device usually deallocates it. If necessary, the Revoke button on the Device Allocation: Maintenance dialog box can be used by an authorized role to forcibly deallocate a device. If your site adds additional allocatable devices to the system, the added devices may need new scripts. See the following descriptions of the existing device-clean scripts for ideas on how they work, and see also "Writing New Device-Clean Scripts". Device-Clean Script for Tape DevicesThe st_clean device-clean script is used for all tape devices. The st_clean script uses the mt(1) command with the -rewoffl option to clean the device. When the script is run during system boot, it queries the device to see if it is on line and has any storage media in it. If necessary, the script prompts the operator to eject the storage media, and then it displays the appropriate label for the user to write on a physical label on the storage media. Until deallocation completes, 1/4 inch tape devices are placed in the allocate error state, and 1/2 inch tape devices are taken off line. The allocate error state forces an authorized user to manually clean up the device before a user can allocate it again. Device-Clean Scripts for Floppy Disks and CD-ROMThe disk_clean script is used for both floppy disk drives and CD-ROM devices. When the disk_clean script is run during boot time, any media found in a device is ejected. Whether it is run at boot time or when the device is deallocated, if the eject succeeds, the script prompts the user to affix to the media a physical label with the appropriate label. If the eject(1) command fails, the device is put in the allocate error state. When a file system from either a floppy or CD is mounted as part of allocation, a File Manager pops up with the current directory set to the mount point. The Security Administrator role can prevent the automatic display of the File Manager by following the procedure in "To Prevent File Manager Display After Device Allocation". The mounting of file systems from floppy disks is handled differently from the mounting of file systems from CDs, as described in "Mounting an Allocated CD-ROM Device" and "Mounting an Allocated Floppy Device". Device-Clean Script for AudioThe audiotool device is cleaned up using the audio_clean program. This program performs an AUDIO_DRAIN ioctl to flush the device, and then an AUDIO_SETINFO ioctl to reset the device configuration to the default. In addition, this program retrieves the audio chip registers using the AUDIOGETREG ioctl, and any registers deviating from default are reset using AUDIOSETREG ioctl. Because the audio device does not contain any removable media, it does not require an external physical label, and therefore the label is not displayed by the audio_clean script. Writing New Device-Clean ScriptsDevices that can be made allocatable include modems, terminals, and graphics tablets. The task of making any of these devices allocatable includes writing a new device-clean script. Device-clean scripts should also be created for any added tape devices, except for Xylogics or Archive tape drives, which can use the default device_clean(1M) script (/etc/security/lib/st_clean). The default location for device-clean scripts is /etc/security/lib. Device-clean scripts must return 0 for success and greater than 0 for failure. Failure or inability to forcibly eject the medium must put the device in the allocate error state. The deallocate(1) command passes four parameters to the device-clean scripts as shown here:
The option letters -I|-F|-S help the script determine its running mode. -I is needed during system boot only. All output must go to the system console. -F is for forced clean up and -S is for standard cleanup. These are interactive and assume that the user is there to respond to prompts. With the -F option, the script must attempt to complete the cleanup if one part of the cleanup fails. [-[A]-[D]] indicates whether the clean script is called from allocate(1) or deallocate. The device_name field is a string with the name of the device. The label field is a hexadecimal representation of the label. Mounting an Allocated CD-ROM DeviceWhen a CD-ROM device is allocated, the user is queried whether or not to mount the CD-ROM.
To play an audio CD, the user must allocate both the audio and CD-ROM devices. The user can optionally manually invoke an audioplayer application after allocating the device. See "To Play an Audio CD" for how the security administrator can set up an audio action for users. Mounting an Allocated Floppy DeviceFile systems on floppy disks are not automatically mounted at allocation because the user may wish to create a new file system over an existing file system already on the floppy. Programs such as fdformat(1) or newfs(1M) can create a new file system only if the file system on the floppy device is not mounted. Therefore, before mounting an existing file system on a floppy, the disk_clean script asks the user whether or not to mount the file system. If a floppy disk is not formatted, the disk_clean script asks the user whether or not to format the floppy. After the file system on a floppy is mounted as part of device allocation, a File Manager pops up with the current directory set to the mount point. Device-related Commands, Databases, and FilesSee the man pages for the following commands and databases: Table 12-4 Device-related Commands and Databases
Ancillary Files for Allocatable DevicesEach allocatable device has an ancillary file, which is a zero-length file in /etc/security/dev. The ancillary file is also referred to as a DAC file because the file must not only exist but its DAC permissions, owner, and group depend on its state. The following table shows the DAC permissions, owner, and group for each of the possible states: Table 12-5 Required Ancillary File Characteristics for Devices
Managing Devices (Tasks)To Save Files With Security Attributes to a TapeThis procedure can be done by any user or role that has the tar command in a profile.
To Set or Modify Device Policy for a Device
To Revoke or Reclaim a Device
To Play an Audio CDThe following procedure automatically launches a CD player. The user must have allocated both the audio and CD-ROM devices.
To Add a DeviceFollow the instructions in the Installing Device Drivers guide for the Solaris environment, if needed, then do the following Trusted Solaris-specific steps.
To Add Site-Specific Authorizations to a Device
To Configure a Serial Line for Logins
To Assign Device Authorizations to an Account
To Prevent File Manager Display After Device Allocation
To Change or Add a Device Clean ScriptFor background, see "Using Device-Clean Scripts".
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||