Plan object authority

This information is helpful when planning object authority.

Your challenge as security administrator is to protect your organization’s information assets without frustrating the users on your system. You need to make sure that users have enough authority to do their jobs without giving them the authority to browse throughout the system and to make unauthorized changes.

The i5/OS™ operating system provides integrated object security. Users must use the interfaces that the system provides to access objects. For example, if you want to access a database file, you must use commands or programs that are intended for accessing database files. You cannot use a command that is intended for accessing a message queue or a job log.

Whenever you use a system interface to access an object, the system verifies that you have the authority to the object that is required by that interface. Object authority is a powerful and flexible tool for protecting the assets on your system. Your challenge as a security administrator is to set up an effective object security scheme that you can manage and maintain.

Object authority enforcement

Whenever you try to access an object, the operating system checks your authority to that object. However, if the security level on your system (QSECURITY system value) is set to 10 or 20, every user automatically has authority to access every object because every user profile has *ALLOBJ special authority.

Object authority tip: If you are not sure whether you are using object security, check the QSECURITY (security level) system value. If QSECURITY is 10 or 20, you are not using object security. You must plan and prepare before you change to security level 30 or higher. Otherwise, your users may not be able to access the information that they need.

Object authority to system commands and programs

Following are several suggestions when you restrict authority to IBM-supplied objects:

Grouping objects

After you have determined ownership of libraries and objects, you can begin grouping objects on the system. To simplify managing authorities, use an authorization list to group objects with the same requirements. You can then give the public, group profiles, and user profiles authority to the authorization list rather than to the individual objects on the list. The system treats every object that you secure by an authorization list the same, but you can give different users different authorities to the entire list.

An authorization list makes it easier to reestablish authorities when you restore objects. If you secure objects with an authorization list, the restore process automatically links the objects to the list. You can give a group or user the authority to manage an authorization list (*AUTLMGT). Authorization list management allows the user to add and remove other users from the list and to change the authorities for those users.

Recommendations: You will also need to add the naming convention for authorization lists to your Naming Conventions form. Once you have prepared an Authorization List form, go back and add that information to your Library Description form. Your programmer or application provider might have already created authorization lists. Be sure to check with them.

Defining how information can be accessed

Authority means the type of access allowed to an object. Different operations require different types of authority. Note: In some environments, the authority associated with an object is called the object’s mode of access. Authority to an object is divided into three categories:
  1. Object Authority defines what operations can be performed on the object as a whole.
  2. Data Authority defines what operations can be performed on the contents of the object.
  3. Field Authority defines what operations can be performed on the data fields.
The following table describes the types of authority available and lists some examples of how the authorities are used. In most cases, accessing an object requires a combination of object, data, field authorities. Appendix D provides information about the authority that is required to perform a specific function.
Description of Authority Types
Authority Name Functions allowed
Object Authorities
*OBJOPR Object Operational Look at the description of an object. Use the object as determined by the user’s data authorities.
*OBJMGT Object Management Specify the security for the object. Move or rename the object. All functions defined for *OBJALTER and *OBJREF.
*OBJEXIST Object Existence Delete the object. Free storage of the object. Perform save and restore operations for the object 1. Transfer ownership of the object.
*OBJALTER Object Alter Add, clear, initialize and reorganize members of the database files. Alter and add attributes of database files: add and remove triggers. Change the attributes of SQL packages.
*OBJREF Object Reference Specify a database file as the parent in a referential constraint. For example, you want to define a rule that a customer record must exist in the CUSMAS file before an order for the customer can be added to the CUSORD file. You need *OBJREF authority to the CUSMAS file to define this rule.
*AUTLMGT Authorization List Management Add and remove users and their authorities from the authorization list 2.
Data Authorities
*READ Read Display the contents of the object, such as viewing records in a file.
*ADD Add Add entries to an object, such as adding messages to a message queue or adding records to a file.
*UPD Update Change the entries in an object, such as changing records in a file.
*DLT Delete Remove entries from an object, such as removing messages from a message queue or deleting records from a file.
*EXECUTE Execute Run a program, service program, or SQL package. Locate an object in a library or a directory.
Field Authorities
*Mgt Management Specify the security for the field.
*Alter Alter Change the attributes of the field.
*Ref Reference Specify the field as a part of the parent key in a referential constraint
*Read Read Access the contents of the field. For example, display the contents of the field.
*Add Add Add entries to data, such as adding information to a specific field.
*Update Update Change the content of existing entries in the field.

1 If a user has save system (*SAVSYS) special authority, object existence authority is not required to perform save and restore operations on the object.

2 See Authorization List Management for more information.

Commonly used authorities

Certain sets of object and data authorities are commonly required to perform operations on objects. You can specify these system-defined sets of authority (*ALL, *CHANGE, *USE) instead of individually defining the authorities needed for an object. *EXCLUDE authority is different than having no authority. *EXCLUDE authority specifically denies access to the object. Having no authority means you use the public authority defined for the object. The following table shows the system-defined authorities available using the object authority commands and displays.

System-Defined Authority
Authority *ALL *CHANGE *USE *EXECUTE
Object Authorities
*OBJOPR X X X  
*OBJMGT X      
*OBJEXIST X      
*OBJALTER X      
*OBJREF X      
Data Authorities
*READ X X X  
*ADD X X    
*UPD X X    
*DLT X X    
*EXECUTE X X X  

The following table shows additional system-defined authorities that are available using the WRKAUT and CHGAUT commands.

System-Defined Authority
Authority *RWX *RW *RX *R *WX *W
Object Authorities
*OBJOPR X X X X X X
*OBJMGT            
*OBJEXIST            
*OBJALTER            
*OBJREF            
Data Authorities
*READ X X X X    
*ADD X X     X X
*UPD X X     X X
*DLT X X     X X
*EXECUTE X   X   X  

The LAN Server licensed program uses access control lists to manage authority. A user’s authorities are called permissions. The following table shows how the LAN Server permissions map to object and data authorities.

LAN Server Permissions
Authority LAN server permissions
*EXCLUDE None
Object authorities
*OBJOPR See note 1
*OBJMGT Permission
*OBJEXIST Create, Delete
*OBJALTER Attribute
*OBJREF No equivalent
Data authorities
*READ Read
*ADD Create
*UPD Write
*DLT Delete
*EXECUTE Execute
1 Unless NONE is specified for a user in the access control list, the user is implicitly given *OBJOPR.

Defining what information can be accessed

You can define resource security for individual objects on the system. You can also define security for groups of objects using either library security or an authorization list:

Authority for new objects in a library

Every library has a parameter called CRTAUT (create authority). This parameter determines the default public authority for any new object that is created in that library. When you create an object, the AUT parameter on the create command determines the public authority for the object. If the AUT value on the create command is *LIBCRTAUT, which is the default, the public authority for the object is set to the CRTAUT value for the library.

For example, assume library CUSTLIB has a CRTAUT value of *USE. Both of the commands below create a data area called DTA1 with public authority *USE: The default CRTAUT value for a library is *SYSVAL. Any new objects created in the library using AUT(*LIBCRTAUT) have public authority set to the value of the QCRTAUT system value. The QCRTAUT system value is shipped as *CHANGE. For example, assume the ITEMLIB library has a CRTAUT value of *SYSVAL. This command creates the DTA2 data area with public authority of change: CRTDTAARA DTAARA(ITEMLIB/DTA2) + TYPE(*CHAR) AUT(*LIBCRTAUT)
Note: Several IBM-supplied libraries, including QSYS, have a CRTAUT value of *SYSVAL. If you change QCRTAUT to something other than *CHANGE, you may encounter problems. For example, devices are created in the QSYS library. The default when creating devices is AUT(*LIBCRTAUT).

The CRTAUT value for the QSYS library is *SYSVAL. If QCRTAUT is set to *USE or *EXCLUDE, public authority is not sufficient to allow sign-on at new devices.

The CRTAUT value for a library can also be set to an authorization list name. Any new object created in the library with AUT(*LIBCRTAUT) is secured by the authorization list. The public authority for the object is set to *AUTL.

The CRTAUT value of the library is not used during a move (MOVOBJ), create duplicate (CRTDUPOBJ), or restore of an object into the library. The public authority of the existing object is used.

If the REPLACE (*YES) parameter is used on the create command, then the authority of the existing object is used instead of the CRTAUT value of the library.

Create Authority (CRTAUT) Risks: If your applications use default authority for new objects created during application processing, you should control who has authority to change the library descriptions. Changing the CRTAUT authority for an application library could allow unauthorized access to new objects created in the library.

Authority for new objects in a directory

When you create a new object in a directory using the CRTDIR, MD or MKDIR commands, you specify the data authority and object authority that the public receives for the object. If you use the *INDIR option, the authority for the created directory is determined from the directory it is being created in. Otherwise, you can specify the specific desired authority.

Objects that adopt the owner's authority

Sometimes a user needs different authorities to an object or an application, depending on the situation. For example, a user may be allowed to change the information in a customer file when using application programs providing that function. However, the same user should be allowed to view, but not change, customer information when using a decision support tool, such as SQL.

A solution to this situation is 1) give the user *USE authority to customer information to allow querying the files and 2) use adopted authority in the customer maintenance programs to allow the user to change the files.

When an object uses the owner’s authority, this is called adopted authority. Objects of type *PGM, *SRVPGM, *SQLPKG and Java™ programs can adopt authority. When you create a program, you specify a user profile (USRPRF) parameter on the CRTxxxPGM command. This parameter determines whether the program uses the authority of the owner of the program in addition to the authority of the user running the program.

The following applies to adopted authority: For example, USERA runs the program PGM1, which adopts the authority of USERB. PGM1 uses the SETATNPGM command and specifies PGM2. USERB has *USE authority to PGM2. USERA has *EXCLUDE authority to PGM2. The SETATNPGM function is successful because it is run using adopted authority. USERA receives an authority error when attempting to use the attention key because USERB’s authority is no longer active. The Display Program (DSPPGM) and Display Service Program (DSPSRVPGM) commands show whether a program adopts authority (User profile prompt) and whether it uses adopted authority from previous programs in the program stack (Use adopted authority prompt). The Display Program Adopt (DSPPGMADP) command shows all the objects that adopt the authority of a specific user profile. The Print Adopting Objects (PRTADPOBJ) command provides a report with more information about objects that adopt authority. This command also provides an option to print a report for objects that changed since the last time the command was run.

Adopted Authority and Bound Programs: An ILE* program (*PGM) is an object that contains one or more modules. It is created by an ILE* compiler. An ILE program can be bound to one or more service programs (*SRVPGM).

To activate an ILE program successfully, the user must have *EXECUTE authority to the ILE program and to all service programs to which it is bound. If an ILE program uses adopted authority from a program higher in the program call stack, that adopted authority is used to check authority to all service programs to which the ILE program is bound. If the ILE program adopts authority, the adopted authority will not be checked when the system checks the user’s authority to the service programs at program activation time.

Adopted Authority Risks and Recommendations: Allowing a program to run using adopted authority is an intentional release of control. You permit the user to have authority to objects, and possibly special authority, which the user would not normally have. Adopted authority provides an important tool for meeting diverse authority requirements, but it should be used with care:

Programs that ignore adopted authority

You may not want some programs to use the adopted authority of previous programs in the program stack. For example, if you use an initial menu program that adopts owner authority, you may not want some of the programs called from the menu program to use that authority.

The use adopted authority (USEADPAUT) parameter of a program determines whether the system uses the adopted authority of previous programs in the stack when checking authority for objects. When you create a program, the default is to use adopted authority from previous programs in the stack. If you do not want the program to use adopted authority, you can change the program with the Change Program (CHGPGM) command or Change Service Program (CHGSRVPGM) command to set the USEADPAUT parameter to *NO. If a program is created using REPLACE(*YES) on the CRTxxxPGM command, the new copy of the program has the same USRPRF, USEADPAUT, and AUT values as the replaced program.
Note: In some situations, you can use the MODINVAU MI instruction to prevent passing adopted authority to called functions. The MODINVAU instruction can be used to prevent passing any adopted authority from C and C++ programs to called functions in another program or service program. This may be useful when you do not know the USEADPAUT setting of the function that is called.

Authority holders

An authority holder is a tool for keeping the authorities for a program-described database file that does not currently exist on the system. Its primary use is for System/36 environment applications, which often delete program-described files and create them again. An authority holder can be created for a file that already exists or for a file that does not exist, using the Create Authority Holder (CRTAUTHLR) command. The following applies to authority holders: Authority Holders and System/36 Migration: The System/36 Migration Aid creates an authority holder for every file that is migrated. It also creates an authority holder for entries in the System/36 resource security file if no corresponding file exists on the System/36. You need authority holders only for files that are deleted and re-created by your applications. Use the Delete Authority Holder (DLTAUTHLR) command to delete any authority holders that you do not need.

Authority Holder Risks: An authority holder provides the capability of defining authority for a file before that file exists. Under certain circumstances, this could allow an unauthorized user to gain access to information. If a user knew that an application would create, move, or rename a file, the user could create an authority holder for the new file. The user would thus gain access to the file. To limit this exposure, the CRTAUTHLR command is shipped with public authority *EXCLUDE. Only users with *ALLOBJ authority can use the command, unless you grant authority to others.

Working with authority

This information describes commonly-used methods for setting up, maintaining, and displaying authority information on your system. "Security commands" provides a complete list of the commands available for working with authority. The descriptions that follow do not discuss all the parameters for commands or all the fields on the displays.

Authority displays

Four displays show object authorities:
Note:
  • If you have *OBJMGT authority to an object, you see all private authorities for that object. If you do not have *OBJMGT authority, you see only your own sources of authority for the object.
  • The *ADOPTED authority indicates only the additional authority received from the program owner.

Authority reports

Several reports are available to help you monitor your security implementation. For example, you can monitor objects with *PUBLIC authority other than *EXCLUDE and objects with private authorities with the following commands:

Working with libraries

Two parameters on the Create Library (CRTLIB) command affect authority:

Creating objects

When you create a new object, you can either specify the authority (AUT) or use the default, *LIBCRTAUT.

Working with individual object authority

To change the authority for an object you must have one of the following: The easiest way to change authority for an individual object is with the Edit Object Authority display. This display can be called directly by using the Edit Object Authority (EDTOBJAUT) command or selected as an option from the Work with Objects by Owner (WRKOBJOWN) or WRKOBJ (Work with Objects) display. You can also use these commands to change object authority: To specify the generic authority subsets, such as Read/Write (*RX) or Write/Execute (*WX), you must use the CHGAUT or WRKAUT commands.

Specifying user-defined authority

The Object Authority column on the Edit Object Authority display allows you to specify any of the system-defined sets of authorities (*ALL, *CHANGE, *USE, *EXCLUDE). If you want to specify authority that is not a system-defined set, use F11 (Display detail).
Note: If the User options (USROPT) field in your user profile is set to *EXPERT, you always see this detailed version of the display without having to press F11. You can press F11 (Display data authorities) to view or change the data authorities.
To give authority to additional users, press F6 (Add new users) from the Edit Object Authority display. You see the Add New Users display, which allows you to define authority for multiple users.

Removing a user’s authority for an object is different from giving the user *EXCLUDE authority. *EXCLUDE authority means the user is specifically not allowed to use the object. Only *ALLOBJ special authority and adopted authority override *EXCLUDE authority. Removing a user’s authority means the user has no specific authority to the object. The user can gain access through a group profile, an authorization list, public authority, *ALLOBJ special authority, or adopted authority.

You can remove a user’s authority using the Edit Object Authority display. Type blanks in the Object Authority field for the user and press the Enter key. The user is removed from the display. You can also use the Revoke Object Authority (RVKOBJAUT) command. Either revoke the specific authority the user has or revoke *ALL authority for the user.
Note: The RVKOBJAUT command revokes only the authority you specify. For example, USERB has *ALL authority to FILEB in library LIBB. You revoke *CHANGE authority: RVKOBJAUT OBJ(LIBB/FILEB) OBJTYPE(*FILE) + USER(*USERB) AUT(*CHANGE)

Working with authority for multiple objects

The Edit Object Authority display allows you to interactively work with the authority for one object at a time. The Grant Object Authority (GRTOBJAUT) command allows you to make authority changes to more than one object at a time. You can use the GRTOBJAUT authority command interactively or in batch. You can also call it from a program. Following are examples of using the GRTOBJAUT command, showing the prompt display. When the command runs, you receive a message for each object indicating whether the change was made. Authority changes require an exclusive lock on the object and cannot be made when an object is in use. Print your job log for a record of changes attempted and made. To give all the objects in the TESTLIB library a public authority of *USE:
Grant Object Authority (GRTOBJAUT)

Type choices, press Enter. 
Object . . . . . . . . . . . . . *ALL 
Library . . . . . . . . . . . . . TESTLIB 
Object type . . . . . . . . . . *ALL
ASP device . . . . . . . . . . . * 
Users . . . . . . . . . . . . . *PUBLIC 
+ for more values 
Authority . . . . . . . . . . . *USE
This example for the GRTOBJAUT command gives the authority you specify, but it does not remove any authority that is greater than you specified. If some objects in the TESTLIB library have public authority *CHANGE, the command just shown would not reduce their public authority to *USE. To make sure that all objects in TESTLIB have a public authority of *USE, use the GRTOBJAUT command with the REPLACE parameter: GRTOBJAUT OBJ(TESTLIB/*ALL) OBJTYPE(*ALL) + USER(*PUBLIC) REPLACE(*YES)

The REPLACE parameter indicates whether the authorities you specify replaces the existing authority for the user. The default value of REPLACE(*NO) gives the authority that you specify, but it does not remove any authority that is greater than the authority you specify, unless you are granting *EXCLUDE authority. These commands set public authority only for objects that currently exist in the library. To set the public authority for any new objects that are created later, use the CRTAUT parameter on the library description.

Working with object ownership

To change ownership of an object, use one of the following: The Work with Objects by Owner display shows all the objects owned by a profile. You can assign individual objects to a new owner. You can also change ownership for more than one object at a time by using the NEWOWN (new owner) parameter at the bottom of the display. When you change ownership using either method, you can choose to remove the previous owner’s authority to the object. The default for the CUROWNAUT (current owner authority) parameter is *REVOKE. To transfer ownership of an object, you must have: You cannot delete a user profile that owns objects. The Work with Objects by Owner display includes integrated file system objects. For these objects, the Object column on the display shows the first 18 characters of the path name. If the path name is longer than 18 characters, a greater than symbol (>) appears at the end of the path name. To see the absolute path name, place your cursor anywhere on the path name and press the F22 key.

Resource security

Resource security on the system allows you to define who can use objects and how those objects can be used. The ability to access an object is called authority. When you set up object authority, you can need to be careful to give your users enough authority to do their work without giving them the authority to browse and change the system.

Object authority gives permissions to the user for a specific object and can specify what the user is allowed to do with the object. An object resource can be limited through specific detailed user authorities, such as adding records or changing records. System resources can be used to give the user access to specific system-defined subsets of authorities: *ALL, *CHANGE, *USE, and *EXCLUDE. Files, programs, libraries, and directories are the most common system objects that require resource security protection, but you can specify authority for any individual object on the system.

Understanding the types of authority: After you have determined your objectives for your resource security and recorded your decisions on the Library Description form, you can begin to plan types of authority. Resource security defines how users have access to objects on the system.

Authority means how someone is authorized to use an object. For example, you may have the authority to view information or to change information on the system. The system provides several different authority types. IBM® groups these authority types into categories, called system-defined authorities, which meet the needs of most people. The table below lists the categories and tells how they apply to securing files and programs.
Note: Refer to the tables below when you plan authorities.
System-defined authorities
Authority name Operations allowed for files Operations not allowed for files Operations allowed for programs Operations not allowed for programs
*USE View information in the file. Change or delete any information in the file. Delete the file. Run the program. Change or delete the program
*CHANGE View, change and delete records in the file. Delete or clear the entire file. Change the description of the program. Change or delete the program.
*ALL Create and delete the file. Add, change and delete records in the file. Authorize others to use the file. None Create, change and delete the program. Authorize others to use the program. Change the owner of the program, if the program adopts authority.
*EXCLUDE1 None Any access to the file. None Any access to the program.
1 *EXCLUDE overrides any authorities that you grant to the public or through a group profile.
To design simple resource security, try to plan security for entire libraries. To do this, you need to understand how the system-defined authorities apply to libraries, which the table below shows:
System-defined authorities for libraries
Authority name Operations allowed Operations not allowed
*USE
  • For objects in the library, any operation allowed by the authority to the specific object.
  • For the library, view descriptive information.
  • Add new objects to the library.
  • Change the library description.
  • Delete the library.
*CHANGE
  • For objects in the library, any operation allowed by the authority to the specific object.
  • Add new objects to the library.
  • Change the library description.
Delete the library.
*ALL
  • Everything allowed with change.
  • Delete the library.
  • Authorize others to the library.
None.
You also need to understand how library and object authority work together. The table below gives examples of authorities that are required for both an object and the library:
How library authority and object authority work together
Object type Operations Object authority needed Library authority needed
File Change data *CHANGE *USE
File Delete the file *ALL *USE
File Create the file *ALL *CHANGE
Program Run the program *USE *USE
Program Change (recompile) the program *ALL *CHANGE
Program Delete the program *ALL *USE
Directory authority is similar to library authority. You need authority to all the directories in the path name for an object in order to access the object.