19
Fri, Apr
5 New Articles

Security Patrol: Re-architecting an Application Security Model

IBM i (OS/400, i5/OS)
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times


In previous issues of "Security Patrol," I have discussed adopted authority as one application security model. In this column, I'll discuss the process of re-architecting an application security model as well as the security models available.

Steps to Re-architecting an Application Security Model

Step 1: Change Your Mind-Set

The first step in re-architecting an application's security model is to make sure that everyone--upper management, team leaders, technical leaders, and programmers--are on the same page. For the greatest chance of success, everyone needs to understand and buy in to why the application security model needs to change in the first place. This often usually requires a mind-set change. The attitude of "that's the way we've always done it" will not get you success. Nor will the argument that "our end users are too unsophisticated to use ODBC, submit a remote command, or use FTP." Well, we've seen quite a bit of damage done by those "unsophisticated" users. The fact is that relying on menu security just doesn't work anymore. The sooner everyone accepts this, the sooner you will achieve success. While certain industries--such as healthcare and finance--have formal government regulations for securing their data, all industries need to be concerned with how they deal with private data (such as social security numbers and consumers' buying habits) as well as confidential data (such as credit card numbers).

The mind-set change will most likely evolve. It needs to start with a letter or memo from the CIO (or higher) stating that changes are needed to ensure both the security and availability of the company's applications and data. Team leaders and managers need to reinforce this mind-set by allocating budget to work on a re-architecting project and further educate their employees on the issues that need to be addressed. Project leaders and programmers also need to understand that "security" is not a one-time project. While re-architecting an application authorization scheme is certainly a project, they cannot stop thinking about security once the project is complete. Security considerations need to be made with every new application written and new technology integrated into the environment.

Step 2: Determine Business Requirements

The second step in re-architecting an application security model is to determine the needs of the business. You must examine the data associated with each application and determine its sensitivity, confidentiality, or other value to the business. For example, one of my clients determined that their vendor list was one of their most important assets. Therefore, the applications that dealt with this list had to have a more secure authorization implementation than the application that held the employees' internal phone extensions.

Step 3: Determine Access

The third step in this process requires that the data owner determine who should have access to the data as well as who should be able to run the application. This may look like one step, but it is two distinct steps. In today's environment, data is usually accessible two ways--through an application and through network interfaces such as FTP or ODBC. Even if the application uses one of these network interfaces, you must still consider whether you want the data available through the rest of the network interfaces.

Two approaches are often used for this:

  • Least privileged approach: No one has access to the data unless they have a specific business need. This translates into setting *PUBLIC authority to *EXCLUDE to prevent user access. Specific users or groups are then given authority to the objects, or--more often--the application authorization model accommodates this and allows users who can run an application to have access to the data.
  • Public information: This approach allows the data to be viewed by anyone on the system. The data is not confidential, so the business sees no need to prevent anyone from seeing it. However, the owner of the data often restricts who can actually change the data. This translates into setting *PUBLIC authority to *USE and again either giving users authority to the objects or accommodating it through the application authorization model. Reminder: Giving public *USE authority allows anyone to not only read the data, but also download it.

Step 4: Choose a Model

Based on the requirements defined in steps two and three, step four is to determine which application authorization model to use. The authorization model is the implementation of the previously determined requirements. Read on to see what authorization models are available to you.

Authorization Model Options

Several authorization model choices exist. Some are quite secure, but others are not. The following lists show the ones people are changing from and to.

From Here...

Menu security: End users sign on to the system and are immediately brought to a menu that gives them no access to a command line. So far, so good. Unfortunately, many application providers stop at this point, which leaves application data wide open. Not securing the application objects (e.g., data files, programs) means that, by default, anyone can modify application data or download the file to a PC, change it, and upload it. I am not saying that menu security should be abandoned. Rather, it should be used in conjunction with one of the secure authorization models listed below.

Public authority: An application depends on *PUBLIC having sufficient authority to perform all application functions. This is not a problem if the public authority is set to *USE. In most cases, the objects are set to *CHANGE or *ALL. With *ALL authority, anyone can not only access the data, but also download it, modify it, and upload it--or delete it entirely! One of the biggest benefits of changing from *ALL authority is the prevention of accidental errors that occur when users have too much authority.

Group authority: An application is owned by one group profile. Users who want to use the application must be members of this profile. Any object a group profile owns, each member also owns. This model is worse than default public access because object owners, by default, have all authority to the object. In this case, careless or malicious users have the power to replace application programs with Trojan horses, update database files incorrectly, or delete the entire application. How likely is this to occur, you ask? Any user running a Windows client can do this using the File Transfer Protocol (FTP) client that comes with a PC's operating system.

To Here...

Application-only access: A single profile owns the application. This profile owns or is authorized to access the data files associated with the application. Public access to the application objects is *EXCLUDE. Users are authorized to the initial menu or to run the command invoking the application. Because the application uses adopted authority, the end user is able to access the application data--but only through the application, not via other means (e.g., FTP, ODBC, DDM). This model is very restrictive and can be very secure.

Variation on application-only access: Rather than setting public authority to *EXCLUDE, it is set to *USE. This method allows anyone to view the information directly without going through the application and allows for reading or downloading the information through the network interfaces such as ODBC and FTP. The application still uses adopted authority to allow users coming through the application to change or update the data. The application owner again either owns the data or is authorized to change and update the data.

Accessing the Integrated File System (IFS): If you are accessing objects in the IFS--such as stream files or HTML--adopted authority won't work because the IFS doesn't honor adopted authority. Your options are to authorize the end user to the IFS objects or change the process or thread so it runs as a different user, one who has the authority to access the IFS object. To change the process to run as a different user, you have several choices: profile swap APIs, profile token APIs, and the UID and GID APIs.

Profile swap: Profile swap APIs have been around for quite a while. These are the APIs that the TCP/IP application servers (e.g., FTP, Telnet) use to get a job to run as the requesting user profile rather than the user profile under which the server started. When a process's profile is swapped, all security attributes are swapped in, including the new user's special authorities, limited capability attributes, and group profile(s). Use of the profile handle that's generated before the profile is actually swapped is limited to the process that generated it.

Profile token: Profile token APIs were introduced in V4R5. They have the same effect as the profile swap APIs, but they generate a token that can be passed between jobs. APIs can generate tokens as one-time use, multi-use, or multi-use regenerable types. These tokens time out and become invalid after a specified time.

UID and GID: UID and GID APIs were also new in V4R5. IBM added the setuid(), setgid(), and associated APIs to aid in the porting of Unix applications running in the Portable Application Solutions Environment (PASE). The native OS/400 versions--the qsy_setuid() and qsy_setgid() APIs--give OS/400 application developers a new option for an application's authorization model. Unlike the profile swap or profile token APIs that swap in all security information, the UID and GID APIs swap in only a user profile (in the case of the UID APIs) or a group profile (in the case of the GID APIs). By the way, the UID is a numeric representation of the user rather than the user profile name, and the GID is the numeric representation of a group profile.

The qsy_setgid() API has become my favorite application authorization method. When a user accesses an application, part of the application startup is to use the qsy_setgid() API to set the GID to the application owner. The application-owning profile is now the user's first group--but only for that particular thread or process. If the user starts up another process, the application-owning profile is not the user's first group! Before, the only way you could implement a similar model was to change a user's group profile and then use the swap APIs to swap to the same user to make the new group profile take effect. The problem was that if a user could start another process, the application profile was the user's first group profile, which lets the user access all of the application objects with owner rights. This produces the same problems and risks as the group authority method described above. These risks are eliminated when you use the GID APIs.

Carol Woodbury is co-author of the book Implementing AS/400 Security as well as co-founder of SkyView Partners, a firm specializing in security consulting and services. Carol has over 12 years in the security industry, 10 of those working for IBM's Enterprise Server Group as the AS/400 Security Architect and Chief Engineering Manager of Security Technology. Carol can be reached at carol_woodbury@mcpressonline.

Carol Woodbury

 

Carol Woodbury is President and CTO of DXR Security and has over 30 years’ experience with IBM i Security. She started her career as Security Team Leader and Chief Engineering Manager for iSeries Security at IBM in Rochester, MN. Since leaving IBM, she has co-founded two companies – SkyView Partners and DXR Security. Her current company - DXR Security - specializes in penetration testing for IBM i. Her practical experience together with her intimate knowledge of the system combine for a unique viewpoint and experience level that cannot be matched.

Carol is known world-wide as an author and award-winning speaker on security technology, specializing in IBM i Security topics. She has written seven books on IBM i Security. Carol has been named an IBM Champion since 2018 and holds her CISSP and CRISC security certifications.

 


MC Press books written by Carol Woodbury available now on the MC Press Bookstore.

IBM i Security Administration and Compliance: Third Edition IBM i Security Administration and Compliance: Third Edition
Don't miss the newest edition by the industry’s #1 IBM i security expert.
List Price $71.95

Now On Sale

IBM i Security Administration and Compliance: Second Edition IBM i Security Administration and Compliance: Second Edition
Get the must-have guide by the industry’s #1 security authority.
List Price $71.95

Now On Sale

IBM i Security Administration and Compliance IBM i Security Administration and Compliance
For beginners to veterans, this is the definitive security resource.
List Price $69.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$0.00 Raised:
$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: