IBM Support

Strategy for Removing *ALLOBJ Special Authority from IBM i User Profiles

How To


Summary

This document explains how to use IBM i Authority Collection to discover the minimum object authorities a user truly needs so you can safely remove *ALLOBJ. It also adds a post-removal monitoring section that audits the Audit Journal (QAUDJRN) for AF (Authority Failure) entries to catch and remediate residual authority gaps.

Objective

Provide a structured approach to removing *ALLOBJ special authority from IBM i user profiles while maintaining system functionality and security.

Environment

Prerequisites

  • IBM i Versions 7.4, 7.5, 7.6 and future releases

  • You have sufficient authority to start/stop authority collection and to view QAUDJRN.

  • Audit journaling is active on the system (QAUDJRN exists) and configured to record authority failures (*AUTFAIL) after removal.

  • Access Client Solutions (ACS) available for running SQL services.

Steps

Authority Collection: Concepts

Authority Collection captures what authority was actually required by the system at runtime for each access attempt. Collected data includes the current authority available, the required authority, adopted authority sources, object identifiers, and timestamps. You can collect by user (everything a specific user accesses) or by object (everything accessing specific objects).

 

Start Authority Collection

Start collection by user:

  • Start Authority Collection for a specific user profile:

 

STRAUTCOL TYPE(*USRPRF) USRPRF(HUGO) LIBINF((V6CASTIL) (QGPL))

 

NOTES:

  • The command starts Authority Collection for user HUGO in libraries V6CASTIL and QGPL.  Modify the command to include other libraries or IFS data.
  • It is recommended that when removing *ALLOBJ authority from multiple user profiles, authority collection data should be gathered one user profile at a time to minimize performance impact and ensure accurate analysis of each user’s runtime authority requirements.
  • It is strongly recommended to avoid enabling STRAUTCOL on high-use libraries (e.g., QSYS) unless it has been thoroughly tested in a non-production environment and the performance impact is fully understood.

 

Start collection by objects (Optional) 

  • Start the system support for object authority collection:
STRAUTCOL TYPE(*OBJAUTCOL)
  • Enable collection for specific objects (use IFS qualified name):
CHGAUTCOL OBJ('/QSYS.LIB/APPLIB.LIB/PAYFILE.FILE') AUTCOLVAL(*OBJINF)

 

NOTES:

  • Authority Collection for Objects tracks information about every user accessing the object.

********  WARNING ********

The data that is collected during the application’s runtime authority checks is significant in both volume and detail. For this reason, you must consider the performance impact that authority collection has on the runtime performance of an application. While the authority collection can be run on a production partition, the recommendation initially is to run the authority collection on a test partition where the application’s runtime performance requirements are not the same as the production environment. In addition, changes made to the authority settings of the objects, based on the authority collection data, need to be fully tested before the authority changes are made in the production environment.

Furthermore, each authority check that matches the collection criteria (such as user profile, library, or object type) results in an entry being written to the collection index. This operation requires an exclusive seize, which causes all matching authority checks to be serialized. Under high activity conditions, this serialization can introduce significant contention.

This behavior is particularly critical when authority collection is enabled on high-use libraries such as QSYS, where virtually every operation involves a library authority check. If the rate of authority checks exceeds the system’s ability to process serialized updates to the collection index, seize contention can increase rapidly. This may lead to severe performance degradation, including prolonged blocking of updates to the affected libraries, potentially indefinitely until contention is reduced.

Careful scoping of authority collection is therefore essential. Enabling collection broadly, especially on system-critical libraries, should be avoided unless thoroughly tested and performance impact is clearly understood.

 

Analyze Authority Collection Data (SQL)

Use IBM i Services SQL views to analyze what was actually required. Examples:

  • What did the USER actually require:

SELECT USER_NAME,
       SYSTEM_OBJECT_SCHEMA,
       SYSTEM_OBJECT_NAME,
       SYSTEM_OBJECT_TYPE,
       DETAILED_REQUIRED_AUTHORITY,
       DETAILED_CURRENT_AUTHORITY,
       AUTHORITY_SOURCE,
       TIMESTAMP(CHECK_TIMESTAMP, 0) AS CHECK_TIME
    FROM QSYS2.AUTHORITY_COLLECTION
    WHERE USER_NAME = 'HUGO' -- Specify the User ID
    ORDER BY CHECK_TIME DESC;

 

NOTES:

  • Specify the User ID on the WHERE USER_NAME clause. 

 

Sample Report:

User ID

Library

Object

Object Type

Detailed Required Authority

Detailed Current Authority

Authority Source

Check Date
HUGOV6CASTILPAYROLL*FILE*READ*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:17
HUGOV6CASTILPAYROLL*FILE*OWNER *OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTE*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:17
HUGOV6CASTILPAYROLL*FILE*OBJOPR*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:17
HUGOV6CASTILPAYROLL*FILE*OBJOPR*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:17
HUGOV6CASTILPAYROLL*FILE*OWNER *OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTE*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:17
HUGOV6CASTILCUSTMASTER*FILE*READ*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:02
HUGOV6CASTILCUSTMASTER*FILE*OBJOPR*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:02
HUGOV6CASTILCUSTMASTER*FILE*OBJOPR*OBJEXIST *OBJMGT *OBJALTER *OBJREF *OBJOPR *READ *ADD *DLT *UPD *EXECUTEUSER *ALLOBJ2026-03-20 07:21:02

 

Grant the Minimum Authorities & Replace *ALLOBJ

  • Assign authorities to the objects in the report with the minimum required authorities. Use the GRTOBJAUT or CHGAUT commands to assign the authorities. 

  • Instead of using private authorities, you can create or reuse Authorization Lists (*AUTL) per application area; grant required authority to the AUTL and attach objects to it.

  • Use group profiles to consolidate access. Add the user to the appropriate groups.

  • Avoid *ALL unless strictly necessary; prefer *USE or *CHANGE per the required authority results.

  • Avoid using *PUBLIC authorities if possible. 

  • For rare elevated tasks, wrap in adopted-authority programs.

Remove *ALLOBJ (Controlled Window)

  • Document the replacement authorities granted from the analysis step.

  • Remove *ALLOBJ from the day-to-day profile; Use the CHGUSRPRF command to remove *ALLOBJ. 

  • Perform removal during a low-risk window and keep a rollback plan ready.

Post-Removal Monitoring: Audit Journal for AF (Authority Failures)

Ensure auditing of AF entries is active (QAUDCTL includes *AUDLVL; QAUDLVL or QAUDLVL2 includes *AUTFAIL). Then, use the SQL table function SYSTOOLS.AUDIT_JOURNAL_AF to track failures after *ALLOBJ is removed.

 

Verify auditing configuration (examples)

DSPSECAUD   /* Confirm QAUDJRN exists; QAUDCTL contains *AUDLVL */
CHGSECAUD   /* Add *AUTFAIL to QAUDLVL/QAUDLVL2 if needed */

 

SQL to Review AF(Authority Failures) last 7 days by user/object

SELECT ENTRY_TIMESTAMP,
       USER_PROFILE_NAME,
       JOB_NAME,
       JOB_USER,
       JOB_NUMBER,
       VIOLATION_TYPE,
       VIOLATION_TYPE_DETAIL,
       OBJECT_LIBRARY,
       OBJECT_NAME,
       OBJECT_TYPE
    FROM TABLE (
            SYSTOOLS.AUDIT_JOURNAL_AF(STARTING_TIMESTAMP => CURRENT TIMESTAMP - 7 DAYS)
        )
    WHERE OBJECT_NAME IS NOT null
    ORDER BY ENTRY_TIMESTAMP DESC;

 

Sample Report:

Time StampUser ProfileJob NameJob UserJob NumberViolation TypeViolation Type DetailObject LibraryObject NameObject Type
3/20/26 8:14 AMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ
3/20/26 4:14 AMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ
3/20/26 12:14 AMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ
3/19/26 8:14 PMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ
3/19/26 4:14 PMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ
3/19/26 12:14 PMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ
3/19/26 8:14 AMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ
3/19/26 4:14 AMQSRVAGTQS9PALMONQSRVAGT145071ANot authorized to objectQUSRSYSQSRV*MSGQ

 

SQL to review AF trend and hotspots

-- Top offenders by user in last 30 days
SELECT USER_PROFILE_NAME,
       COUNT(*) AS AF_COUNT
    FROM TABLE (
            SYSTOOLS.AUDIT_JOURNAL_AF(STARTING_TIMESTAMP => CURRENT DATE - 15 DAYS)
        )
    GROUP BY USER_PROFILE_NAME
    ORDER BY AF_COUNT DESC;

 

Sample Report:

User Profile

Number of Authority Failures

QCLUSTER420
QEJBSVR182
QSRVAGT93
QTCP12
MIKSWENS6
QDBGSRV5
NINATEST4
QPGMR3
LEISEC2
QUSER2

 

SQL for Objects most frequently failing:


SELECT COALESCE(OBJECT_LIBRARY, '') AS LIB,
       COALESCE(OBJECT_NAME, '') AS OBJ,
       OBJECT_TYPE,
       COUNT(*) AS AF_COUNT
    FROM TABLE (
            SYSTOOLS.AUDIT_JOURNAL_AF(STARTING_TIMESTAMP => CURRENT DATE - 30 DAYS)
        )
    WHERE PATH_NAME IS null
    GROUP BY OBJECT_LIBRARY,
             OBJECT_NAME,
             OBJECT_TYPE
    ORDER BY AF_COUNT DESC,
             LIB,
             OBJ;

 

Sample Report:

Object LibraryObject NameObject TypeAF Count
QUSRSYSQSRV*MSGQ166
QSYSQSYFNUSG*SRVPGM4
QSYSNINATEST*USRPRF3
QGPLQTES340984*DTAQ2
QGPLQTES356384*DTAQ2
QGPLQTES357028*DTAQ1
QSMUSTRSYSMGR*CMD1
QSYS#SDALIB*LIB1

 

SQL for IFS Objects Most frequently failing:

SELECT COALESCE(PATH_NAME, '') AS OBJ,
       OBJECT_TYPE,
       COUNT(*) AS AF_COUNT
    FROM TABLE (
            SYSTOOLS.AUDIT_JOURNAL_AF(STARTING_TIMESTAMP => CURRENT DATE - 7 DAYS)
        )
    where OBJECT_NAME is null
    GROUP BY PATH_NAME,
             OBJECT_TYPE
    ORDER BY AF_COUNT DESC,
             OBJ;

 

Sample Report:

Path NameObject TypeAF Count
/home/QWEBADMIN*DIR25
/QIBM/ProdData/WebSphere/AppServer/V9/Base/properties/version*DIR19
/QIBM/ProdData/WebSphere/AppServer/V9/Base*DIR18
/home/SKOLEV/.qwas_client/.java/.userPrefs/.userRootModFile.skolev*STMF13
/home/QWEBADMIN/.qwas_client/.java/.userPrefs/.userRootModFile.qsecofr*STMF11
/QIBM/ProdData/WebSphere/AppServer/V9/Base/bin/client_ffdc*DIR8
/QIBM/UserData/ICSS/Cert/Server*DIR7
/QIBM/UserData/WebSphere/AppServer/V9/Base/profiles/WAS9MIG/temp/osgi_instance_location/skolev*DIR7
/QIBM/ProdData/WebSphere/AppServer/V9/Base/scriptLibraries/application/V70*DIR6
/QIBM/ProdData/WebSphere/AppServer/V9/Base/scriptLibraries/servers/V70*DIR6
/QIBM/ProdData/WebSphere/AppServer/V9/Base/scriptLibraries/system/V70*DIR6
/QIBM/ProdData/WebSphere/AppServer/V9/Base/scriptLibraries/utilities/V70*DIR6

 

Triage Guidance for AF Failures

  • Map AF failures back to authority collection results: if required authority was missed, grant the minimal authority via Private Authorities, Authorization Lists(*AUTL) or group authorities. 

  • Validate the violation type (e.g., K = special authority violation) and fix the underlying gap (e.g., *JOBCTL instead of *ALLOBJ).

Wrap-Up & Suggested Timeline

  • Week 1–2: Start authority collection (users/objects), capture normal operations.

  • Week 3–4: Analyze required vs current authority; assign private authorities, AUTLs/groups; pilot removal on low-risk profiles.

  • Week 5+: Remove *ALLOBJ broadly; monitor AF entries daily for 2–4 weeks; iterate grants where justified.

 

Summary Authority Collection strategy:  

  • Enable authority collection
  • Let users run normally for days/weeks
  • Review collected data
  • Grant missing authorities
  • Remove *ALLOBJ

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CHyAAM","label":"Security"}],"ARM Case Number":"TS021685737","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"and future releases;7.4.0;7.5.0;7.6.0"}]

Document Information

Modified date:
18 September 2026

UID

ibm17266975