Software Install as QSECOFR
Question: I am the security administrator at a small shop with one AS/400. In my department, other employees have responsibility for loading software packages. The installation instructions from software vendors always begin with the same four words: Sign on as QSECOFR. It has become common practice to share the QSECOFR password among several employees and use it for all software updates. I would like to see some discussion about why it is necessary (or desirable) to sign on as QSECOFR for all software updates. I would prefer if possible to use QSECOFR more selectively.
Answer: I understand your concern. First, let me explain why the powerful QSECOFR profile is required to install software applications. Then, I will give you two alternatives that I feel are better than sharing the QSECOFR password among several employees. Finally, I will recommend that the QSECOFR user profile be used only in rare cases.
Software install instructions specify “Sign on as QSECOFR” to avoid installation problems. Software applications frequently include programs that adopt their owner’s authority. When programs that adopt their owner’s authority are installed (restored) by a user other than the owner of the program or a security officer, OS/400 will revoke access to the programs. OS/400 considers a security officer to be any user with *ALLOBJ and *SECADM special authorities. The user profile QSECOFR has the special authorities required to restore programs that adopt, without revoking access to the programs. Rather than instruct you to sign on as a user with *ALLOBJ and *SECADM special authorities, the install instructions simply take a shortcut and ask you to sign on as QSECOFR. Most software applications can be installed by anyone with a user profile that has *ALLOBJ and *SECADM special authorities.
You are right to be concerned about sharing the password of the QSECOFR user profile among several employees. For accountability purposes, only one person should
know the password of QSECOFR. (A company usually has other user profiles with *ALLOBJ and *SECADM special authorities. These users can change the QSECOFR password if the person who knows the password is not available.) I recommend using one of these two alternatives: Create alternate profiles or use a program that adopts for the restore.
Create Alternate Profiles
Most software installations can be performed by anyone with a user profile that has *ALLOBJ and *SECADM special authorities. In rare cases—when communication configuration objects are created or modified—*IOSYSCFG special authority may also be required.
The first alternative is to simply create user profiles with the required special authority to perform the install. This alternative will mean that some individuals will have two user profiles: a normal profile to be used for most daily activities and a powerful security profile to be used for software installation. To maintain accountability of who made the change, these user profiles should not be shared. Use of individual user profiles also facilitates password change, since each person can change the password of their profiles without coordinating the change with other employees.
This first alternative gives equivalent function to a shared QSECOFR user profile, with improved accountability and profile management.
Use a Program That Adopts for the Restore
The problem with the first alternative is that the security officer access of the powerful user profile can be used not only for software installation but also for other functions that might be off-limits to the employee. This second alternative corrects that problem. It gives the users authority to perform software installation only, by allowing them to use a program that adopts the QSECOFR user profile. The program shown in Figure 1 prompts the user for the Restore Library (RSTLIB) command. The program adopts the authority of the owner QSECOFR, which allows the program to restore other objects that adopt. For an in-depth look at adopted authority, see “Object Security by Adoption” in this issue of MC.
Recommendations for QSECOFR User Profile
If you follow one of the previous recommendations, the QSECOFR user profile does not need to be shared. I recommend that no users sign on as QSECOFR. Change the password for the QSECOFR user profile, and write it down and store it in a safe place. I suggest that you store a copy of the QSECOFR password with the off-site copy of your disaster recovery plan. In the event of a fire or natural disaster, your AS/400 may not be available, and you will need the password of QSECOFR to load the backup copy. When the system first IPLs, other profiles will not be loaded, so you will need the QSECOFR password.
Security Level Should Be at Least 40
Question: We are currently running security level 20 on our production AS/400 and security level 30 on another system. In your lectures, you recommend setting the security level to 40. Please explain the advantages of security level 40 and describe the procedure to increase the security level.
Answer: If the system value QSECURITY is below 40, you are missing an essential layer of protection. Setting the security level to 40 or 50 eliminates the following potential security exposures:
• At security level 20, all users on the system are given *ALLOBJ special authority. *ALLOBJ special authority allows users to view, modify, and even delete the data objects either by accident or on purpose. Increasing the security level to 30 removes *ALLOBJ authority from user profiles other than those of user class security officer.
• At security level 30, if users have *USE authority to job descriptions (JOBDs) that name user profiles, they can use that JOBD to submit jobs and run them as the user named in the job description. (At security levels below 40, access to a JOBD that names a user profile is like knowing the user’s password, because jobs can be run in batch using that JOBD.) You should print a list of JOBDs that name user profiles using the Print JOBD Authority (PRTJOBDAUT) command (see “Track System Security with IBM’s Free AS/400 Security Tools” in this issue of MC). But securing the JOBDs that name user profiles requires more effort than moving to security level 40. At security level 40 or 50, the user must be authorized to both the JOBD and the user profile. Because user profiles are created with *EXCLUDE public authority, security level 40 or 50 prevents users from submitting jobs as other users—even if JOBDs exist that name user profiles.
• The JOBDs that name user profiles can cause another potential exposure. If the JOBD specified in the workstation entries of a subsystem description names a user profile, at security levels below 40, users can simply enter blanks for the user profile and password on the sign-on screen and sign on as the user named in the JOBD. (See the sidebar “Default User IDs Can Be a Potential Security Breach” in the article “Are Your AS/400 Passwords Really Secure?” elsewhere in this issue of MC). At security levels 40 and 50, the user must enter a user profile name and password.
State domain protection and hardware storage protection is not enforced at security levels below 40. This allows programs written in machine interface (MI) to modify space objects if the user has *USE access to the object. (*USE access is designed to allow read- only access, but, at security levels below 40, MI programs can modify objects.) OS/400 uses space objects for many objects, such as JOBDs, commands (CMDs), and data areas (DTAARAs). Many other OS/400 object types also consist of one or more space objects. (Please note that user space objects are not protected by state domain protection.)
Because your production system is at security level 20, you must authorize users to the objects they need to access to perform daily operations. Grant users this authority before you increase your security level to avoid authorization failures that could confuse the users. The recommended procedure is to remain at security level 20 and assign users to a group profile. Create the group profile without *ALLOBJ special authority. Create a test user profile that’s similar to other user profiles, but don’t give it *ALLOBJ special authority. Use the test profile to exercise application functions. Because this profile does not have *ALLOBJ authority, authorization failures will be detected. Authorize the group profile or *PUBLIC to the objects that cause authorization failures. Continue using the test user profile and authorizing the group profile to objects until you’ve removed all authorization failures. Then, remove *ALLOBJ authority from one production user profile and correct any remaining authorization failures before you increase the security level to 40.
If your application software directly accesses objects or IBM internal interfaces, increasing to security level 40 may cause the application to terminate. Your applications will function without failure if you remain at your current security level. Rather than risk failure of your production applications, remain at your current security level and turn on auditing to see if you can safely move to security level 40. Specifying *PGMFAIL in the system value QAUDLVL directs the system to record any potential failures in the audit journal. Run the audit journal through a month-end close. If no domain violations are reported, you can safely increase the security level to 40. If domain violations are reported,
you should not move to security level 40, because the affected programs will stop working. Most software runs at security level 40, but, if you have an older version of the software installed, you may need to upgrade before increasing your security level. Contact the vendor of your application to see if there’s a version that runs at security level 40
For more details on changing security levels, see “A Guide to Changing QSECURITY,” MC, March 1994. This article is included in chapter 8 of Wayne O. Evans on AS/400 Security.
/* Installation instructions */
/* 1. Compile program */
/* CRTCLPGM PGM(xxx/RESTORE) */
/* SRCFILE( xxx/RESTORE) USRPRF(*OWNER) */
/* AUT(*EXCLUDE) */
/* 2. Change owner of the program to user QSECOFR. */
/* Adopted authority allows the program to */
/* restore other objects that adopt */
/* CHGOBJOWN OBJ(xxx/RESTORE) */
/* OBJTYPE(*PGM) NEWOWN(QSECOFR) */
/* 3 Grant access to user that are allowed */
/* to perform software installs */
/* GRTOBJAUT OBJ( xxx/RESTORE) OBJTYPE(*PGM) */
/* USRPRF(user1) AUT(*USE) */
? RSTLIB OUTPUT(*PRINT)
Figure 1: Program adopt for library restore