• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Using Adopted Authority Wisely

    October 27, 2015 Patrick Botz

    In my previous tip I explained adopted authority and admonished developers to use it wisely. This tip identifies some rules of thumb you should bear in mind when contemplating the use of adopted authority.

    User profile to adopt: If you’re not used to using adopted authority in your applications, one of the first questions that comes to mind might be “which user profile should I adopt?” The most straightforward way to use adopted authority is to adopt the authority of the owner of the objects used by the application.

    Rule: Create a user profile with ENABLED *NO, PWD *NONE, Initial Program *NONE, and initial menu *SIGNOFF. Change all program and non-program objects of the application to be owned by this user profile. Using this rule makes it easy to change any program in an application to ensure that it will not encounter an authority failure. The program will adopt the authority of the owner of all of the application objects. Since all the application objects are owned by the same profile and the owning user profile of any object has *ALL authority to that object by default, the program is guaranteed to be authorized to any resource it accesses.

    Authority of programs that adopt authority: The primary reason to adopt authority is to ensure that the program will not fail due to an authority failure. Therefore, allowing everyone on the system to run programs that adopt authority is a security issue.

    Rule: PUBLIC authority of programs that adopt authority should be *EXCLUDE. Users should get the authority to run these programs through group membership.

    Adopted authority inheritance: One of the most useful aspects of adopted authority is that adopted profiles are inherited by subsequent programs in the call stack. But this is a double-edged sword. If your program (or one that is subsequently called by your program) either directly or indirectly displays a command line prompt, you almost certainly don’t want commands run from that command line to execute with the adopted authority.

    Rule: Set the USEADPAUT attribute of programs that display a command line to *NO.

    Even better rule: Create a service program to display a command line. Rather than putting the code to display a command line in each program that needs to, put that code in a service program and call it like a procedure. Set the USEADPAUT value of the service program to *NO. That way, only the displayed command line runs without adopted authority, not all of the function in each program that displays a command line.

    Adopted authority inheritance, part 2 Adopted authority is managed through the call stack. When a program causes another program or command to run in a different job (e.g. SBMJOB, TRFGRPJOB, trigger programs, etc.), the authority adopted by programs running in the original (or source) job is not available to the programs that run in the other (or target) job. If this wasn’t a limitation of adopted authority, then developers would only have to change the initial program of an application to adopt authority and leave the rest as is.

    Rule: For existing applications, search your code for all SBMJOB and TRFGRPJOB commands. Ensure the target program or command processing program adopts authority.

    Trigger programs: are another example of programs that don’t run within the current job’s call stack. Using adopted authority on trigger programs is usually required in order to maintain PUBLIC *EXCLUDE authority on your database files.

    Rule: Change trigger programs to adopt authority

    These rules of thumb are by no means exhaustive, and they all have exceptions. However, remembering these rules can help you quickly identify and solve authority failures issues and help you avoid introducing new security issues in your programs and applications.

    Patrick Botz, an internationally known information security expert, is the President and CTO of Botz & Associates, a firm specializing in information security services for IBM i, AIX, Unix and Linux environments. With decades of experience in key system security positions, Patrick’s expertise includes security strategy; security policy enforcement; password management and single sign-on; industry and government compliance; and biometrics. As Lead Security Architect at IBM and founder of the IBM Lab Services security consulting practice, Patrick worked with IBM customers worldwide and achieved intimate knowledge of system security capabilities and pitfalls on a broad spectrum of platforms, with special emphasis on IBM i (formerly AS/400), AIX, Linux and Unix operating systems. He architected the SSO solution for OS/400 and i5/OS, and he holds several security-oriented patents. Patrick is the author of numerous trade press articles and a co-author of the book Expert’s Guide to OS/400 and i5/OS Security. In addition, he is a worldwide speaker on various platform-specific and general security topics. Send your questions or comments for Patrick to Ted Holt via the IT Jungle Contact page.

    RELATED STORY

    Developers Can Improve Security and Reduce the Administrative Cost of Security

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    DRV Tech

    Get More Out of Your IBM i

    With soaring costs, operational data is more critical than ever. IBM shops need faster, easier ways to distribute IBM applications-based data to users more efficiently, no matter where they are.

    The Problem:

    For Users, IBM Data Can Be Difficult to Get To

    IBM Applications generate reports as spooled files, originally designed to be printed. Often those reports are packed together with so much data it makes them difficult to read. Add to that hardcopy is a pain to distribute. User-friendly formats like Excel and PDF are better, offering sorting, searching, and easy portability but getting IBM reports into these formats can be tricky without the right tools.

    The Solution:

    IBM i Reports can easily be converted to easy to read and share formats like Excel and PDF and Delivered by Email

    Converting IBM i, iSeries, and AS400 reports into Excel and PDF is now a lot easier with SpoolFlex software by DRV Tech.  If you or your users are still doing this manually, think how much time is wasted dragging and reformatting to make a report readable. How much time would be saved if they were automatically formatted correctly and delivered to one or multiple recipients.

    SpoolFlex converts spooled files to Excel and PDF, automatically emailing them, and saving copies to network shared folders. SpoolFlex converts complex reports to Excel, removing unwanted headers, splitting large reports out for individual recipients, and delivering to users whether they are at the office or working from home.

    Watch our 2-minute video and see DRV’s powerful SpoolFlex software can solve your file conversion challenges.

    Watch Video

    DRV Tech

    www.drvtech.com

    866.378.3366

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    Connectria:  Need help managing your IBM i? Trust us as an extension of your IT department.
    HelpSystems:  How do you use IBM i? Your peers want to know! Take the survey >
    Rocket Software:  Mobile app development and deployment solution for IBM i. Download FREE trial!

    Academic Initiative Lives Up To Its Name How To Join The Power Linux Evolution

    Leave a Reply Cancel reply

Volume 15, Number 22 -- October 27, 2015
THIS ISSUE SPONSORED BY:

ProData Computer Services
WorksRight Software
United Computer Group, Inc.

Table of Contents

  • Using Adopted Authority Wisely
  • Let One Row Represent A Group, Take Three
  • Questions About AES Encryption In RPG, DB2 for i, And The Web

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle