IBM Security Z Security

 View Only
  • 1.  CARLa Report: Permit x user in Group

    Posted Tue January 16, 2024 07:11 AM
    I want to create a report with all permits for each user present in group.
     
    I have tried CARLa below, but it seems that I cannot use acl(id(my_group)) in Select, only userid cab be specified.
    Any suggest


    ------------------------------
    gianfranco casati
    zOS Senior S.E. - DB2LUW S.E. - Tivoli S.E.
    Gesiass
    Milan
    +39(0)22514752
    ------------------------------


  • 2.  RE: CARLa Report: Permit x user in Group

    Posted Tue January 16, 2024 07:53 AM

    Hi Gianfranco,

    The ACL(ID(id)) clause on SELECT selects on IDs that are directly on the ACL of that profile, as we try to explain here: https://www.ibm.com/docs/en/szs/3.1.0?topic=SS2RWS_3.1.0/com.ibm.zsecure.doc_3.1.0/admin_audit/carla_cmnd_lang_select_srch_prof_name.htm

    So if the user is directly on the ACL, but the group the user is connected to is not, then selection on the group will not select the profile.

    Conversely, if the group appears on the ACL, a select for the user ID will not bring up that profile.

    The easy way to get the permits for a particular user ID would seem to be via option RA.3.4 (Permit/scope).

    I am not totally sure which of the sub-options of RA.3.4 you are really thinking of here.
    But as an example, sub-option 2 generates a CARLa like the following:

    SUPPRESS REASON=( UACC ID(*) GLOBAL WARNING NOPROF SPECIAL AUDIT GRPAUDIT GRPOPER GRPSPEC OWNER PWDCHANGE SELFCON ALTER-M CKGRACMAP CKGRACDCERT CKGOWNER CREATE)
    N REQUIRED N=SCOPE0D T=:T1 TYPE=REPORT_SCOPE                                    
      DEFINE HIGH_ACCESS("HighAcc") MAX(ACCESS) 
      d key(nondispl) class,                                                        
        proftype(detail) key(both,"Profile name") volser(detail)  access_via_when(76
      / key(0,d,wrap,firstonly,"Full profile name",header),                         
      / access_via_when(d,header,76)                                                
      summary complex id * class count(8,"Profiles") HIGH_ACCESS                    
    REPORT SCOPE=CRMBJTI                                                            

    This first defined a layout and then requests the relevant data for one of more userids, in this case only for CRMBJTI.

    You might want to generate the last statement like
       REPORT ,

         SCOPE=id1,

         SCOPE=id2,

    oslt, by running another CARLa query that lists the users for the group on these SCOPE keywords, and then concatenate that to the layout.

    I hope this begins to help.

    Regards,



    ------------------------------
    Jeroen Tiggelman
    IBM - Software Development Manager IBM Security zSecure Suite
    Delft
    ------------------------------



  • 3.  RE: CARLa Report: Permit x user in Group

    Posted Tue January 16, 2024 08:19 AM

    Hello Jeroen

    in your example CRMBJTI is a group or user ?

    About auto-generation of REPORT SCOPE=id1, ....

    There is a limit on numer of id in scope.

    Note that we have gruoup with thousand if user or universal group



    ------------------------------
    gianfranco casati
    zOS Senior S.E. - DB2LUW S.E. - Tivoli S.E.
    Gesiass
    Milan
    +39(0)22514752
    ------------------------------



  • 4.  RE: CARLa Report: Permit x user in Group

    Posted Tue January 16, 2024 09:47 AM

    Hi Gianfranco,

    CRMBJTI is one of my user IDs.

    I am not immediately aware of the limit you mention... what message(?) do you get?

    Regards,



    ------------------------------
    Jeroen Tiggelman
    IBM - Software Development Manager IBM Security zSecure Suite
    Delft
    ------------------------------



  • 5.  RE: CARLa Report: Permit x user in Group

    IBM Champion
    Posted Wed January 17, 2024 04:22 AM
    Edited by Rob van Hoboken Wed January 17, 2024 04:23 AM

    Hi GF

    As we explained earlier, while reading DATASET profiles, the SELECT command does not know if an ID on the ACL is a user or a group, so it cannot select on ACL(GROUP=) and also cannot select on "any users that have a connect to SVIL".  So you're going to be stuck with a two pass query.

    Pass 1 selects all the groups with a connect to SVIL, writes this into a flat file.  You can easily extend the list of group names.

    Pass 2 uses the content of the flat file to select the DATASET profiles.

    // EXEC C2RC
    //IDS DD DISP=(,PASS),DSN=&&IDS
    //SYSIN DD *
    newlist type=racf nopage dd=IDS
      select class=user cggrpnm=SVIL
      sortlist profile(8)
    // EXEC C2RC
    //IDS DD DISP=(OLD,PASS),DSN=&&IDS
    //SYSIN DD *
    alloc type=racf active
    deftype type=$IDS
    alloc type=$IDS dd=IDS
    define type=$IDS id(8) as word(record,1)
    newlist type=racf
      select class=dataset exists(userid:$IDS.id.id)
      sortlist profile acl



    ------------------------------
    Rob van Hoboken
    ------------------------------