Getting Started as an MPE/iX Programmer Programmer's Guide: HP 3000 Computer MPE/iX Computer Systems > Chapter 6 File SystemMaintaining File Security |
|
Three security features are available on the MPE/iX system to restrict access to a single file or all disc files in a particular account or group: lockwords, the MPE/iX File Access System matrix, and access control definitions (ACDs). Lockwords are file "passwords" which provide a primary level of file security by restricting access to a file to users not knowing the file's lockword. These lockwords may be assigned to a file when the file is created with the BUILD command or when the file is renamed. To delimit the lockword, enter a forward slash (/) following the file name:
For additional information, refer to the MPE/iX Commands Reference Manual Volumes 1 and 2 (32650-90003 and 32650-90364). The HP 3000 system includes a set of security provisions with each account, group, and individual file. This set specifies restrictions on access to a single disc file or to all disc files in a particular account or group. The restrictions are based on three factors:
The security provisions for any file describe the permitted access modes for various users of the file. When a program opens or creates a file, it can define the way the file can be accessed by specifying a particular access mode for the file (for example, read-only, write-only, update, and so on). These specifications apply to files on any device, and only the creator of file can change or override them. When specifying the access mode for a file, it is important to know the location of the current end-of-file before and after the file is opened and the location of the logical record pointer that indicates where the next operation will begin. For example, the choice of the correct access mode can write a record to a file and:
For detailed information on this topic, refer to Accessing Files Programmer's Guide (32650-90017). Table 6-8 “File Access Mode Types” describes the file access mode types. Table 6-8 File Access Mode Types
Restrictions on accessing a file are established when the file is created according to the default established for the group and account where the file resides. The capabilities of a user who accesses a file can determine the security restrictions applied. Table 6-9 “User Type Definitions” describes the types of users recognized by the MPE/iX Security System, their mnemonic codes, and definitions. Table 6-9 User Type Definitions
For detailed information on this topic, refer to Accessing Files Programmer's Guide (32650-90017). The user access modes to a file are determined by four separate levels of security settings. All four levels are checked and must be passed to grant a user access to a file. The only two levels over which a standard user has control are the file and lockword levels. However, it is important for a standard user to understand all levels of the security system, since the combination of all the settings determines the user's access to the file. Figure 6-16 “Security Level for File Access” shows the security levels checked when a user attempts to gain access to a file. The default security at account, group, and file levels are as follows:
At the group level, the MPE/iX Security System recognizes six access modes: Reading (R) Appending (A) Writing (W) Locking (L) Executing (X) Saving (S) It recognizes seven user types: Any User (ANY) Account Librarian User (AL) Group Librarian User (GL) Group User (GU) Account Member (AC) System Manager (SM) Account Manager (AM) For detailed information on this topic, refer to Accessing Files Programmer's Guide (32650-90017). When a file is created, the security provisions that apply to it are the default provisions assigned by MPE/iX at the file level, coupled with the user-specified or default provisions assigned to the account and group to which the file belongs. At any time, however, the creator of the file can change the file level security provisions. Thus, the total security provisions for a file depend on specifications made at three levels: account, group, and file. A user must pass tests at the account, group, and file levels (in order) to successfully access a file in the requested mode. If no security provisions are explicitly specified by the user, the following provisions are assigned at the file level by default: Reading (R) Appending (A) Writing (W) Locking (L) Executing (X) Any User (ANY) Because the total security for a file always depends on security at all three levels, a file not explicitly protected from a certain access mode at the file level may benefit from the default protection at the group level. For detailed information on this topic, refer to Accessing Files Programmer's Guide (32650-90017). Access Control Definitions (ACDs) allow the owner of a file to specify permissions for access to a file or to a device. An ACD takes precedence over the previous access controls, namely the MPE file access matrix and lockwords. The owner of a file is any of the following: the creator of the file, the account manager (AM capability) where the file resides, or the system manager (SM capability). A device or file can be paired with an ACD. When a user tries to acquire the device or to open the file, the system first checks the authorization list of the associated ACD. When a file is paired with an ACD, the ACD is put into its file label extension. The ACD contains a list of access modes paired with users. Similar to the MPE File Access System, ACDs use modes to specify the types of access to grant or refuse to users as follows:
ACDs are defined in a similar manner as file access modes. For example:
MGR.ACCTING and DENNIS.LEE can read and write to the file associated with this example ACD. Any user in PAYROLL can read it, and any user on the system can append to it. If a user is not given a permission, the user does not have it. Use commands to manage ACDs interactively through the command interpreter. Use intrinsics to manage ACDs in a program.
Move file ACDs between MPE V and MPE/iX by using the STORE and RESTORE commands, where COPYACD is the default.
The security provisions for the account and group levels are managed only by users with System Manager or Account Manager capabilities, respectively. However, you can change the security provisions for any disc file you have created by using the :ALTSEC command. This does not affect any account-level or group-level provisions that may cover the file, and it does not affect the security provided by a lockword. For detailed information on this topic, refer to Accessing Files Programmer's Guide (32650-90017). You can temporarily suspend the security restrictions on any disc file you create by using the :RELEASE command. This allows any user to access the file in any mode, thus providing unlimited access to the file. It does not remove lockword protection, and it does not modify the file security settings recorded in the system. It merely bypasses them temporarily. :RELEASE remains in effect for a file until you enter the :SECURE command in this or a later job or session or until the file is modified. For detailed information on this topic, refer to Accessing Files Programmer's Guide (32650-90017). |