Print Email

Mainframe Security Best Practices

It’s worth the time and effort to develop security habits

4/8/2015 12:30:01 AM | Editor’s note: This article contains excerpts from the book “IBM Mainframe Security: Beyond the Basics—A Practical Guide from a z/OS and RACF Perspective” by Dinesh D. Dattani (MC Press, 2013).

Men are only as good as their technical development allows them to be.
—George Orwell

Mainframe security has been around for quite some time. Over the years, installations have realized that some practices, if implemented, will pay security dividends in the long run. In fact, it can be argued that not establishing best practices and not following them is detrimental to overall security and often results in increased security administration costs.

With this in mind, the following presents some of the best practices for mainframe security.

Implement Role-Based Security


In simple terms, role-based security is one where you grant access to groups instead of to individuals. Generally, these groups represent specific job functions at the company.

The employees’ access rights are determined not by their user IDs being in the access lists, but by virtue of their being members of certain groups. If a group is in the access list, then the employee automatically will have access because he or she is a member of the group, as shown in Figure 1.


Figure 1: Employees Gain Security Access Via Groups



To administer security, you simply add and remove people from groups. The only time you have to modify the access list is when a new group is formed or when one is no longer needed.

There are several reasons why this model is appealing, including:

  1. You will save on security administration costs. Under this scheme, groups, not individuals, will be in access lists. As people enter and leave various functional groups in your organization, you will not have to add and remove individuals from access lists.
  2. Auditing will be easier. User IDs will be grouped according to their roles in the company, and the entire group, representing a role, will be granted access. To find out all users who have access to payroll data, for example, you simply list the group called “PAYROLL.”
  3. It will help you in your user ID cloning efforts. Quite often, a request comes in to the security department such as “give the new employee Wayne the same access as that of Patricia.” If you have implemented role-based security, all you have to do is list Patricia’s user ID and find out what groups she is connected to. Then, you add Wayne to all these groups. This simple cloning exercise would take much longer if you did not have role-based security. You would have to find out all profiles where Patricia has access, and also the level of that access (such as read or update). There might be dozens, or even hundreds, of these profiles. You would then have to grant Wayne exactly the same level of access as Patricia to all these profiles.
Under role-based security, of course, a person is allowed to have more than one role. If that is the case, then that person simply belongs to more than one group.

So, under role-based security, are there any circumstances when you want to allow individual-level access? Yes, there are. Some access can rightly be granted at the individual level. This will happen when you have sensitive or critical data and you want to restrict it to just one or two individuals. In this case, granting access to entire groups would compromise the security of your important data.

When you adopt role-based security, one thing to keep in mind is group memberships. Since access is granted wholesale at the group level, it is assumed users are in the right groups. Otherwise, you are in a situation where the wrong people are getting access via incorrect group memberships.

Periodically De-Clutter Your Security Database

Database clutter is not very different from the physical clutter we collect in our basements and garages. It is an eyesore, gets in the way whenever we want to find something and does not serve any useful function.

Security database clutter is bound to happen. Groups and user IDs become obsolete. Applications retire, requiring extensive cleanup of obsolete profiles.
RACF groups become empty and might not be needed anymore. Employees transfer from one department to another. Departments get reorganized, and entire company divisions are bought and sold, not to mention mergers between companies.

You should regularly evaluate and make sure your security database is free of clutter. Otherwise, you will soon find yourself with a very large clutter that has accumulated and is now unmanageable.

Inactive user IDs should be reviewed and deleted where appropriate. The Data Security Monitor Selected User Attribute report shows all user IDs that have been revoked.

Employee Transfers and Terminations

In any organization, people come and go. In some organizations, however, when people leave the company, their user IDs remain.

The security database cleanup associated with users being terminated or transferring to new job functions is often neglected. This neglect might go unnoticed for a long time. There should be a process in place whereby the security department gets notified of all employee transfers and terminations.

If an employee moves on to a new job function, he or she will, over time, request the new access necessary to do the new job function. However, if you do not have a process in place to clean up his or her old access, then that old access will still remain intact.

This situation, if allowed to persist, will not only create the security database clutter mentioned above but will also cause security audit concerns, as the person does not need, and should not have, the old access any more. The problem is even worse in the case where the person held special security privileges in the old job.

In the case of employee terminations, make sure all access and the user ID, is removed from the system. The concern here is that if the user ID inadvertently gets activated, then the access rights of that user ID are at risk of misuse.

Then there is the issue of what to do with the data sets owned by the person who has transferred or who has been terminated. These data sets cannot simply be deleted, as they might contain many years of work. In such cases, the best thing to do is to let the person’s manager decide whether to reassign responsibility for the data or to delete it.

While cleanup activities such as these will not win you medals, or even recognition, they are a necessary evil. In the long run, it is in your best interest to keep things clean. Management should recognize this extra activity not as overhead, but as a job function within the security department.

Identify Your Important Data

There are two categories of data that can be designated as important:

  1. Critical OS data (and its major components, such as DB2 and CICS)
  2. Your production data
While the first category is more or less standard across all companies and across all industries, the second category is installation-specific and therefore hard to identify. For example, for an automotive company, data sets containing auto part numbers and their specifications would be termed extremely critical to the business. There might well be legal reasons to guard this data from unauthorized access.

There are many benefits to identifying your important data, including:

  1. You can implement better security controls for this data.
  2. You can plan your disaster recovery exercises to include important data.
  3. The data owners and custodians will be better able to make access approval decisions.
  4. During access reviews, the owners will be able to make intelligent decisions.
  5. Auditors will know where to focus their audit efforts.
  6. Security administrators will be able to implement tighter controls and loggings for this data.
Assign Ownership to All Data

All data, especially the company’s mission-critical data, must have an owner (or a custodian). Such a setup is useful in many ways, including:

  1. For access approval purposes, the security department knows where to go for approvals. The owners can make informed decisions, as they know their data the best.
  2. If there are discrepancies in access rights, then you can go to the owner for clarification purposes.
  3. The owner can make appropriate decisions about data backup requirements for recovery and disaster recovery purposes.
  4. Various compliance legislations require the company to have ownership of at least the production data.
Conduct Periodic Reviews

A periodic review of all security definitions is essential to verify their continued applicability. This will give you a greater comfort level about your mainframe security.

For example, in the role-based security model discussed earlier, members of a group automatically get certain access rights. It follows that if group membership is not periodically reviewed, then it is possible that wrong individuals have access to some data.

This activity is often overlooked, for the simple reason that it is not urgent, and the staff is busy doing daily security administration. To alleviate the workload on the security department, it is suggested that the review occur on a staggered basis.

At least once a year you should review the various pieces of information in the security database, which are:

  1. Special privileges granted to user IDs
  2. All access rights
  3. User IDs
  4. Group memberships
  5. RACF profiles
Implement Change Management

Production job control language (JCL) is what ultimately generates all those reports that are critical to the survival of corporations. Any changes, additions or deletions to production JCL must go through a change management process whereby the JCL is examined before being put into production.

This JCL resides in one or more designated procedure libraries at the installation. Before it goes into production, make sure the JCL:

  1. Has been tested. Otherwise, unexpected failures will affect the timely production of your critical reports.
  2. Has been approved by management.
  3. Runs under a production batch ID, and not a test ID or a personal user ID. If a personal user ID runs production JCL, what happens when the person leaves?
  4. Does not reference any personal data sets. If it does, then changes made to the personal data sets can cause integrity issues. Also, what happens if the person leaves?
  5. Follows corporate standards and naming conventions.
Report and Monitor Security Activities

With regular monitoring, the security department becomes familiar with access patterns and is better able to fine-tune the security definitions that are in place.

Also, if the user community is aware that monitoring is being done regularly, then there is less likelihood that someone will engage in fraudulent activity.
It is like those traffic cameras installed at key city intersections; just knowing that there might be one at the next intersection reduces the chances of motorists running red lights.

On a regular basis, you should produce reports and monitor:

  1. Activities carried out by means of special privileges. This includes all RACF security definition changes. This monitoring will ensure special powers are not abused.
  2. Invalid logon attempts. These are mostly a result of invalid passwords having been entered at logon time. You are looking for patterns that might tell you, for example, if someone is trying to use (or guess) someone else’s password.
  3. Security violations. Inevitably, users try to access data they are not supposed to be accessing. You should keep an eye on these access violations to see if a pattern is emerging.
  4. Access to important data. In rare cases, for very important data, you might have set up logging even for successful accesses. These accesses need to be monitored to ensure the access was in line with the person’s job function.
Implement Segregation of Duties

The principle of segregation of duties means that no individual should have multiple special privileges, such that the individual is able to carry out unauthorized activities and later cover his or her tracks by using special privileges.

In terms of job functions, segregation of duties implies that multiple sensitive functions should not be carried out by the same individual. For example, the person administering security by means of the RACF Special privilege should not also be the one to review the report on special privilege activities.

A Better Job

If you adopt and implement security best practices at your organization, then the whole task of securing your company’s business data becomes much easier. You will also be better prepared to meet with auditors and compliance monitors.

Dinesh D. Dattani is a mainframe security consultant residing in Toronto.

Please sign in to comment.

Sign In




Join Now!
Big Data Demands Big Iron Skills

Big Data Demands Big Iron Skills

The effects of a mass exodus from the mainframe ranks could affect a number of computing trends, not the least of which is big data.

Read more »

Migration Path

Migration Path

Learn a new approach and prepare for migrating a DB2 system or a DB2 data sharing group with z/OSMF.

Read more »