I can confirm that the sample code that Rob suggested for newlist type ID is correct in showing a flag for each selected group profile whether that group is used in a permit. When I run it on my test system, it produces:
I D 26 Oct 2023 11:08
Id Prm
SYSAPPL Yes
SYSAUDIT Yes
SYSAUTH Yes
SYSCTLG Yes
SYSOPR Yes
SYSP No
SYSPROG Yes
SYSTEST No
The second sample based in newlist type RACF_ACCESS also works, but had a mistake max(access) should have been coded as access(max)
Also, I added an extra filter in the select statement access<>qualown to suppress access that newlist RACF_ACCESS otherwise reports for access for the owner of the resource profile.
Sample output from my system looks like:
R A C F A C C E S S A U T H O R I Z A T I O N S 26 Oct 2023 11:11
Id Class Access Count
SYSAPPL ALTER 54
DATASET ALTER 21
FACILITY READ 18
PROGRAM READ 4
VMPOSIX NONE 1
XFACILIT READ 10
SYSAUDIT ALTER 81
CSFSERV READ 1
DATASET ALTER 28
FACILITY UPDATE 9
OPERCMDS ALTER 14
PROGRAM READ 5
SDSF READ 2
SERVAUTH READ 3
SURROGAT READ 3
XFACILIT UPDATE 16
SYSAUTH ALTER 145
DATASET NONE 2
FACILITY ALTER 77
------------------------------
Tom Zeehandelaar
z/OS Security Enablement Specialist - zSecure developer
IBM
------------------------------
Original Message:
Sent: Thu October 26, 2023 04:51 AM
From: Rob van Hoboken
Subject: Group Access List Counter
Newlist type=ID provides flags and statistics about USER and GROUP IDs. One of them shows if the ID was used in a PERMIT.
newlist type=id
select class=group id=sys*
sortlist id racf_permit
Also, you can use newlist type=RACF_ACCESS to calculate statistics about IDs:
newlist type=racf_access
select class<>group id=sys* exists(id:subgrpct)
summary id * class max(access) count
This shows the groups (only groups have a subgroup count field) matching SYS*, the number of permits, and the highest access level for each. If you only need the total number of permits, you can remove the "* class" from the summary command.
Note: not tested, maybe Tom can provide some sample reports and improvements.
Note: I seem to remember that (all of) these reports ignore conditional access entries. When I last used zSecure that included the access monitor based reports.
------------------------------
Rob van Hoboken
-----------------------------