23
Sat, Nov
1 New Articles

Using the New Security Features in the Latest IBM i Technology Refreshes

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

The TRs for IBM i V7R3 and V7R4 have some very cool stuff. Carol gives you a tour.

Yes, once again the IBM i development team has provided us with new features that will help make security administration easier. You can find information on all of the new features of V7R3 TR10 here and V7R4 TR4 here, but I thought it might be helpful to provide examples of how and why I’ll use four of these new features.

QSYS2.SECURITY_INFO

This service is similar to running the Display Security Attributes (DSPSECA) and Display Security Auditing (DSPSECAUD) CL commands along with the Retrieve Security Attributes API (QSYRTVSA). But instead of calling two CL commands, which only go to display or write to an API, you can retrieve all of the information in one easy Select statement!

If you’ve ever run DSPSECA, you’ll know that it displays somewhat random security configuration information, but if you need that information, it’s the only place you can discover it. For example, I find it useful to run DSPSECA to determine whether a change to either QSECURITY or QPWDLVL has taken effect. DSPSECA shows both the current and pending values. (Remember, it takes an IPL for changes to these system values to take effect.) Note: If the current and pending values are the same, only the current value is displayed.

I find running DSPSECAUD helpful to determine which audit journal receiver is currently attached. While not all of what I consider to be security-relevant system values are available via SECURITY_INFO, most of them are, so this will allow you to easily check their values on a regular basis. And if you’re pulling information from multiple partitions, you’ll want to add this to your list of information you retrieve so that you can ensure your security system values are set the same on each of your partitions. Details on this service can be found here.

QSYS2.USER_INFO_BASIC

This IBM Service provides the same information as QSYS2.USER_INFO except it doesn’t provide the USER_OWNER , USER_CREATOR, SIZE, CREATION_TIMESTAMP, LAST_USED_TIMESTAMP, DAYS_USED_COUNT, or LAST_RESET_TIMESTAMP fields. Not much to say about this one except that if you are one of those IBM i shops with thousands of user profiles, you may want to switch to this view if you’re not using the fields listed here to get better performance with your SQL. Check out the documentation here.

SYSTOOLS.CHANGE_USER_PROFILE()

This table function provides a subset of the attributes that can be changed using the Change User Profile (CHGUSRPRF) command. But in this case, you can select the user profiles you want to modify and then make changes to them—all in SQL. Think about wanting to automate the disabling profiles when your organization deems them to be inactive. I provided this example in my last article, so building on that, you can now use this function to set the profiles to status of *DISABLED rather than running CHGUSRPRF against each profile yourself. Much more efficient and handy, don’t you think?

SELECT * FROM QSYS2.USER_INFO,

               TABLE(SYSTOOLS.CHANGE_USER_PROFILE(

                             P_USER_NAME => AUTHORIZATION_NAME,

                           P_STATUS     => '*DISABLED',

                             PREVIEW     => 'NO'))

WHERE (last_used_timestamp is NULL or

     last_used_timestamp < current timestamp - 3 months ) and

     (creation_timestamp < current timestamp - 3 months );

If you’d prefer to review the list of profiles about to be changed prior to making the change, change the Preview field to YES in the table function. Not all user profile attributes are included in this function (some notable ones that are missing include the supplemental group and special authorities attributes), but enough are included to make this useful and, hopefully, over time, IBM will provide a fully functional equivalent of CHGUSRPRF. More information on this table function can be found here.

Audit Journal Entry Services

Last but certainly not least, IBM has provided us with four services that parse out the details of the AF – Authority Failure (AUDIT_JOURNAL_AF), CA – Changes to Authority (AUDIT_JOURNAL_CA), OW – Ownership Changes (AUDIT_JOURNAL_OW) and PW – Password (AUDIT_JOURNAL_PW) audit journal entries! All are found in SYSTOOLS library and details are documented here.

Yes, we’ve been able to use the QSYS2.DSIPLAY_JOURNAL view to retrieve audit journal entries for a while now. But for the reasons I look in the audit journal, I’ve found this function to be almost worthless. That’s because the only portion of the audit journal entry that’s parsed is the header, which is common to all audit journal entry types. Using this view, it’s left up to you to parse the details of each type. No, thank you. So while this feature is great when you’re sending audit entries in SYSLOG format to a SIEM, it’s not helpful for the analysis that I perform for my clients because I’m typically looking at the information in the detailed portion of the audit journal entries.

Without using these services, I must first run the Copy Audit Journal Entry (CPYAUDJRNE) command; then I can run my SQL to get to the entries I’m really interested in. For example, if I’m trying to determine who changed the authority on a specific file (HR_NFO/SALARY), I’ll run CPYAUDJRNE CA *CURCHAIN to first get all of the CA entries out of the audit journal. Then I do an SQL SELECT to find the entries I’m looking for. Do you have any idea how many CA entries occur throughout the running of a normal day? Potentially millions. But I’m just looking for a handful of entries! The file created by running CPYAUDJRNE may be huge, and if I decided to keep that file in a library (rather than letting the command default to putting the file in QTEMP and getting deleted when I signed off), I’m keeping around a huge volume of information compared to what I actually need. Instead, I can simply run the following and get right to the information I’m looking for.

The following SQL lists all CA entries generated during the last seven days. It’s handy but not all that different from running CPYAUDJRNE.

SELECT * FROM TABLE(

SYSTOOLS.AUDIT_JOURNAL_CA(

     STARTING_TIMESTAMP => CURRENT TIMESTAMP - 7 DAYS)

);

However, this statement gets me to the exact entries I’m looking for in one statement. I can tell who made the change (USER_NAME field), the day and time (ENTRY_TIMESTAMP FIELD), and the profile to whom the authority was added or removed (USER_PROFILE_NAME field). You can also scroll through the various authority and previous authority fields in the entry to determine the exact permissions granted or revoked.

SELECT * FROM TABLE(

   SYSTOOLS.AUDIT_JOURNAL_CA(

     STARTING_TIMESTAMP => CURRENT TIMESTAMP - 1 DAYS)

)

WHERE OBJECT_LIBRARY = 'HR_INFO' AND

   OBJECT_NAME = 'SALARY' AND

   OBJECT_TYPE = '*FILE';

I can’t tell you how excited I am to be able to access the audit journal in this way. If for no other reason than to take advantage of the easy way you can perform timestamp arithmetic, I’m going to switch how I access these audit journal entries. I’m guessing this is the tip of the iceberg; we might be seeing more of these for other audit journal entry types. To have a say in which ones are next, you can either open a Request for Enhancement (RFE) or send an email to or tweet Mr. SQL (aka Scott Forstie) at This email address is being protected from spambots. You need JavaScript enabled to view it. or @Forstie_IBMi and let him know which audit journal entries you use most and want to see in this format. (You might also include a big thank you to him and his team for all of the cool function they’ve been providing the last few years.)

Summary

Hopefully, I’ve given you reasons to install the latest TRs and start experimenting with these new features. Knowing the inventive ways people use the system, I know you can come up with even more clever ways to utilize these powerful features provided by the crack IBM i development team. I challenge you to use these features and make it worth the time and effort these people have put in to make these new features possible. And if you haven’t upgraded to V7R3 or preferably V7R4, while you’re technically on a supported release, none of these enhancements are provided on V7R2 and you’re missing out. Time to upgrade!

Carol Woodbury

 

Carol Woodbury is IBM i Security SME and Senior Advisor to Kisco Systems, a firm focused on providing IBM i security solutions. Carol has over 30 years’ experience with IBM i security, starting 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 practical experience and her intimate knowledge of the system combine for a unique viewpoint and experience level that cannot be matched.

Carol is known worldwide 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, including her two current books, IBM i Security Administration and Compliance, 3rd Edition and Mastering IBM i Security, A Modern, Step-by-Step Approach. 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
Don't miss the newest edition by the industry’s #1 IBM i security expert.
List Price $71.95

Now On Sale

Mastering IBM i Security Mastering IBM i Security
Get the must-have guide by the industry’s #1 security authority.
List Price $49.95

Now On Sale

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

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: