Your audit journal sees every failed access

Every time someone reaches for an object they are not authorized to touch, your system writes it down, if you have auditing enabled. The records sit in the audit journal, QAUDJRN. Most shops never read them.

Those are missed signals. An authority failure is someone, or something, reaching for data they should not reach. One failure is a typo. A pattern is a problem.
If your audit journal is active, read the authority failures with SQL:

SELECT ENTRY_TIMESTAMP, CURRENT_USER,
       OBJECT_LIBRARY, OBJECT_NAME,
       JOURNAL_ENTRY_TYPE
  FROM TABLE(QSYS2.DISPLAY_JOURNAL(
         'QSYS', 'QAUDJRN',
         JOURNAL_ENTRY_TYPES => 'AF',
         STARTING_TIMESTAMP => CURRENT TIMESTAMP - 7 DAYS))
 ORDER BY ENTRY_TIMESTAMP DESC;

This pulls the authority failures from the last seven days, newest first.
Read the list for patterns:

  • The same user failing against the same file over and over
  • A profile reaching for objects outside its normal work
  • A service account failing on objects it never used to touch

First, confirm auditing is on. QAUDCTL and QAUDLVL control what the system records, and authority failures are worth capturing on any serious system. Turn it on, then build the habit of reading it. If you turn it on, make sure you delete the Audit journal receivers after a while; otherwise, they will take over your system. If you can keep them for 30 days, that is great.

#IBMi

Originally posted on LinkedIn. Join the conversation there.

Get new posts by email

Practical IBM i tips on SQL services, security and backup, sent when I publish. No spam, unsubscribe anytime.

Leave a Reply