01
Wed, May
6 New Articles

Security Patrol

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

Protection from Adventurous FTP Users

Question: I am the sole AS/400 manager at a small company (75 employees). Currently, our shop is using V3R2 at security level 20. This has worked fine for us since all users (with the exception of a handful of managers) are menu secured. We have just set up FTP with a couple of clients, which could create problems if our users are not careful or if they decide to become adventurous. They are supposed to access only send and receive files in one mailbox library. However, because of our setup, they could conceivably mess up files in our production libraries if they try to change directories.

I’d like to upgrade to security level 30, but I’m “AS/400 security challenged,” so I’ve been doing a lot of research. (Thank goodness for Midrange Computing’s ResourceCD/400! Your March 1994 article, “A Guide to Changing QSECURITY,” on upgrading from level 20 to 30 is becoming very dog-eared.) I’ve read several other articles, as well as the IBM manuals, and I think I have a plan. I’d like to run it by you and ask some questions.

In your August 1993 article, “Security Design for Performance,” you recommend assigning authority at the library level. This makes a lot of sense to me, as we have only a few production libraries. Here’s my plan:

1. Set *PUBLIC authority on our production libraries to *ALL, and set all of the FTP user IDs to *EXCLUDE for these libraries.

2. Set authority on the individual files in the mailbox library to their specific FTP user ID (i.e., *ALL for *PUBLIC, *EXCLUDE for other FTP IDs).

Given this plan, I have some questions: What about other libraries, including IBM’s? Should these be secured also? In looking at our system, a lot of objects (most of which were created before I got here) do not have *ALL public authority. Am I correct in assuming that they would need to be changed to *ALL before this plan can be implemented?

Answer: First, let me thank you for a very complete description of your environment and planned approach. This helps me to provide a better answer. There are several points in your note, and I will respond to each of them.

Your approach consists of the following four items. My comments are listed below each item.

1. Move from security level 20 to security level 30. I agree with your strategy of moving to a higher level of security than level 20. The article you mentioned (“A Guide to Changing QSECURITY”) gives the step-by-step approach to achieve this. However, I would encourage you to move to security level 40 rather than 30. Security level 40 offers better protection, and the effort to move to level 40 is about the same as moving to level 30.

2. Use menu security for existing users to limit their access. Menu-level security does not provide adequate protection from users who have a PC, nor does it restrict FTP users. If PC users attach to the AS/400 using Client Access/400 or most of the other third- party PC attachment packages, they have options to download and upload files that are not restricted by menu security.

Since menu security works well, there may not be a strong motivation to move to resource security. I recommend that, before you attach the FTP client, you implement a more robust security approach similar to application-only access that I described in the January and February 1996 issues of MC. (See “Application-only Access: Implementing the Strategy” and “Application-only Access: Security Exposures Revealed.”) Too often, if we say, “We’ll worry about that later,” nothing gets done until something terrible happens, like a file or library is deleted. I recommend that you protect your information before you attach FTP users. Implementing application-only access can take significant time and planning, so, if schedule pressures require you to implement the FTP access first, you should definitely include plans to get to application-only access.

3. Implement library-level security to limit access of FTP users to a specific mailbox library. For libraries other than a mailbox library, use *PUBLIC *ALL for libraries and *EXCLUDE for FTP users. Library-level security is an easy way to limit access to specific users, which will protect all objects in the library. Users who have access to the library will have access to the objects in the library. However, object-level security can be added to selected objects without changing the basic library security strategy.

The *ALL authority would allow users to delete production libraries, which is probably not what you intended. A public authority of *CHANGE would allow users to add objects to the library but not delete the library. If users do not add objects to production libraries (for example, program libraries), then a public authority of *USE allows access to the objects in the library but prevents adding additional objects.

You did not explicitly state that *PUBLIC authority will be used for the objects in the library, but *ALL authority at the object level would allow users authorized to the library the authority to delete production objects. I recommend that *PUBLIC have only *CHANGE authority; this will prevent accidental deletion of objects.

Rather than list the individual users as *EXCLUDE on the library object, create a group profile for the FTP users; I will call this profile GRPFTP. Excluding the group profile rather than individual users has the advantage that, should you need to create another FTP user, you will need to add only the user to the GRPFTP profile rather than add the user to every library on your system. In giving the GRPFTP a private authority of *EXCLUDE to individual libraries, using the Primary Group Profile (PGP) has a performance advantage that I mentioned in the September 1998 “Security Patrol” column.

4. For the files in the mailbox library use *PUBLIC *ALL and *EXCLUDE for FTP users. Individual FTP users will be given *ALL authority to their data. Again, my comments about giving *PUBLIC *ALL authority applies to the mailbox library, and I recommend an authority of *CHANGE or *USE rather than *ALL.

If you want to limit the FTP users to accessing only their specific files, I recommend giving individuals *USE or *CHANGE access to allow FTP operations, but giving the group profile GRPFTP *EXCLUDE authority. Again, the GRPFTP profile can use the PGP field for the individual objects, giving it a performance advantage. The AS/400 checks the individual user authority before considering the group access, so users

will be allowed to access their individual mailbox libraries even though they are members of the GRPFTP that has *EXCLUDE access to all of the mailbox libraries. Users will not be able to access other users’ mailboxes.

You will need to protect other libraries, including the IBM libraries, from FTP users. FTP users will require *USE access to all of the libraries on the system and the user portion of the library list. These users should be prevented from accessing other libraries, such as QRPG, by giving the group profile GRPFTP *EXCLUDE access.

Think Like a Devious User

When you design a security strategy, you need to think like a devious user. For example, you need to consider what could happen if one of the existing menu users attempts to access the system using FTP. Because FTP allows users the access to delete files, I do not recommend a *PUBLIC access of *ALL on production files.

The strategy that has been discussed to this point would allow that menu user unrestricted access from FTP. If your PC users are attached using TCP/IP, then they could initiate an FTP session to your AS/400. If you want to limit FTP to selected users only, I recommend implementing a program similar to the program shown in Figure 1. This program limits the users who can run FTP to those who are in the GRPFTP group. The details of the FTP sign-on exit program can be found in the TCP/IP Configuration and Reference. Don’t forget to compile the CL program with RTVCLSRC *NO and exclude users from the source of this exit program itself.

Reference

TCP/IP Configuration and Reference (SC41-5420-00,CD-ROM QB3ANL00)

/*====================================================*/

/*FTPLOGON Limit FTP sign-on to users that */
/* are members of group profile GRPFTP */
/* */

/* */

/* To compile: */
/* CRTCLPGM PGM(XXX/FTPLOGON) SRCFILE(XXX/QCLSRC) + */
/* USRPRF(*OWNER) AUT(*EXCLUDE) */
/* */

/* 1. Compile program */
/* */

/* 2. Change owner of the program to user QSECOFR. */
/* Adopted authority allows the program to */
/* retrieve the user profile */
/* CHGOBJOWN OBJ(XXX/FTPLOGON) OBJTYPE(*PGM) + */
/* NEWOWN(QSECOFR) */
/* */

/* 3. Name the exit program in registration facility */
/* ADDEXITPGM EXITPNT(QIBM_QTMF_SVR_LOGON ) + */
/* FORMAT(TCPL0100) PGMNBR(1)+ */
/* PGM(XXX/FTPLOGON) REPLACE(*NO) + */
/* TEXT('Limit FTP to GRPFTP users') */
/* */

/* Additional notes: */
/* 1. When the FTP server logon exit is called, the FTP */
/* server job is running under the QTCP user profile. */
/* 2. IBM strongly recommends that you create the exit */
/* program in a library with *PUBLIC authority set to */
/* *EXCLUDE, and give the exit program itself a *PUBLIC */
/* authority of *EXCLUDE. */
/* The FTP server adopts authority when it is necessary */
/* to resolve and call the exit program. */
/* */

/*************************************************************/

FTPSIGNON:PGM PARM(&APPIDIN &USRIN &USRLENIN &AUTIN &AUTLENIN +

&IPADDRIN &IPLENIN &RETCDOUT &USRPRFOUT &PASSWDOUT +

&CURLIBOUT)

/* Declare input parameters */

DCL &APPIDIN TYPE(*CHAR) LEN(4) /* Application identifier */

DCL &USRIN TYPE(*CHAR) LEN(999)/* User ID */

DCL &USRLENIN TYPE(*CHAR) LEN(4) /* Length of user ID */

DCL &AUTIN TYPE(*CHAR) LEN(999)/* Authentication string */

DCL &AUTLENIN TYPE(*CHAR) LEN(4) /* Length of auth. string */

DCL &IPADDRIN TYPE(*CHAR) LEN(15) /* Client IP address */

DCL &IPLENIN TYPE(*CHAR) LEN(4) /* IP address length */

DCL &RETCDOUT TYPE(*CHAR) LEN(4) /* return code (out) */

DCL &USRPRFOUT TYPE(*CHAR) LEN(10) /* user profile (out) */

DCL &PASSWDOUT TYPE(*CHAR) LEN(10) /* password (out) */

DCL &CURLIBOUT TYPE(*CHAR) LEN(10) /* current library (out) */

/* Declare local copies of parameters (in format usable by CL) */

DCL VAR(&USRLEN) TYPE(*DEC) LEN(5 0)

/* Declare local variables */

DCL VAR(&USRPRF) TYPE(*CHAR) LEN(10)

DCL VAR(&GRPPRF) TYPE(*CHAR) LEN(10)

/* Assign input parameters to local copies */

CHGVAR VAR(&USRLEN) VALUE(%BINARY(&USRLENIN))

/* Check for USER is a member of GRPFTP if not prevent logon */

CHGVAR VAR(&USRPRF) VALUE(%SST(&USRIN 1 &USRLEN))

RTVUSRPRF USRPRF(&USRPRF) GRPPRF(&GRPPRF)

IF COND(&GRPPRF = 'GRPFTP') THEN(CHGVAR +

VAR(%BINARY(&RETCDOUT)) VALUE(1))

ELSE CMD(CHGVAR VAR(%BINARY(&RETCDOUT)) VALUE(0))

END: ENDPGM

Figure 1: Program to limit FTP to selected users

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: