IBM Security Z Security

Security for Z

Join this online user group to communicate across Z Security product users and IBM experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Trying to call zSECURE CARLA from REXX?

    Posted Thu August 17, 2023 08:30 AM

    Specifically, I have an application that makes a series of RACROUTE calls (up to 70) when a user enters the CICS application, in order to determine what application profile applies to the user. I have a local tool written in REXX for security admins that helps analyze the access lists for the relevant resource profiles.
    I used to be a sysprog, BAL programmer, etc. ACF2 developer, but I am looking for an easier way to accomplish my goals than using ICHEINTY..zSECURE CARLA may be the answer but I am far more familiar with REXX. My similar REXX tool used to do this for ACF2 easily, now I want a RACF version. ACF TEST used to give detail, like the specific rule like that allowed.
    I use the zSECURE ckgracf command to find out whether the user is "alllowed" the resource. Unfortunately it gives no other useful information.
    I do a RACF rlist and parse out the access list of permits, which are USERIDs and GROUPs.
    I do a listuser of each to find out whether it's a USERID or a GROUP
    If it's a USERID then I see whether it's the USERID of interest and display it if it is.
    It it's not a USERID I assume it's a GROUP

    That's where the problem is. I can't find any easy way of finding the USERIDs in a UNIVERSAL GROUP short of using ICHEINTY or a database unload utility.
    But CARLa can do lovely things like this sample code:

    newlist  n=baseg3 segment=base nopage 
    select s=base c=group ,KEY=CICSINTG   
    sortlist connects(universal,8)        

    I can run that in batch, or from the zSECURE panels, but is there a way to call this CARLa in the foreground from my REXX, passing the KEY and retrieving the results?

    I keep thinking RACF should have an easy way to display the USERIDs in a UNIVERSAL GROUP but I sure can't find it.
    I imagine the real answer might be to learn to do all this in CALRa or indeed just use BAL assembler and the ICHEINTY interface.
    But I'll bet zSECURE developers run CARLa in the foreground under TSO TEST to debug...so this should be do-able.

    Performance is already terrible...I want the REXX to do this many thousands of times, so I am not expecting a miracle.



    ------------------------------
    Gregory Pinkowski
    ------------------------------


  • 2.  RE: Trying to call zSECURE CARLA from REXX?

    Posted Thu August 17, 2023 09:56 AM
    Edited by Rob van Hoboken Thu August 17, 2023 10:04 AM

    Here is the manual that describes how to run a CARLa script from line mode (or a CLIST/Rexx).  In your Rexx, you would allocate a temporary data set to a dd name, say RACFINFO, then in the CARLa you write your output with

    newlist nopage dd=RACFINFO

    If you want to insert easy to use delimiter, use newlist header=tsv, and use Rexx parse with '15'x (tab).

    If you have to do this for many different keys, you could run multiple newlists in one call.  Either write to as many different dd names, or add the key into the output and write clever Rexx to recognize when the key changes in the file.  newlist retain can be used to keep the KEY value on all output lines, like

    newlist nopage retain dd=racfinfo
      s c=group s=base mask=cics*
      sortlist key(8) connects(universal)
    newlist nopage retain dd=racfinfo
      s c=group s=base mask=syst*
      sortlist key(8) connects(universal)

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



  • 3.  RE: Trying to call zSECURE CARLA from REXX?

    Posted Thu August 17, 2023 10:22 AM

    By the way, if you want to check if a user has access on a profile, or on a list of profiles, you can do this in a single CARLa call.

    newlist type=racf
      define usersaccess(explode) subselect acl(user=ABC)
      select class=TCICSTRN key=XYZ
      sortlist profile uacc usersaccess

    The EXPLODE modifier causes all relevant connect groups to show up, including any direct permits.  If you want zSecure to figure out if the user has (any) access, use the RESOLVE modifier instead, if access is given via one or more connect groups, one group name will be shown.

    If the user has no explicit access, the output will show only the profile key and UACC value.



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



  • 4.  RE: Trying to call zSECURE CARLA from REXX?

    Posted Thu August 17, 2023 10:39 AM

    Hi Rob,

    Note that EXPLODE does not trigger UNIVERSAL, you have to specify that separately.

    Regards,



    ------------------------------
    Jeroen Tiggelman
    IBM - Software Development and Level 3 Support Manager IBM Security zSecure Suite
    Delft
    ------------------------------



  • 5.  RE: Trying to call zSECURE CARLA from REXX?

    Posted Thu August 17, 2023 11:05 AM

    You guys are great. Thanks all. I really have to become an expert on CARLa!

    Sp Jeroen, how do I specify UNIVERSAL ?

    I need to find all the zSECURE and CARLa manuals and tutorials etc.. The company won't be providing any training this year...






  • 6.  RE: Trying to call zSECURE CARLA from REXX?

    Posted Thu August 17, 2023 11:09 AM

    Hi Gregory,

    You can specify multiple ACL format modifiers together, like so:

    newlist type=racf
      define usersaccess(explode universal) subselect acl(user=ABC)
      select class=TCICSTRN key=XYZ
      sortlist profile uacc usersaccess

    Regards,



    ------------------------------
    Jeroen Tiggelman
    IBM - Software Development and Level 3 Support Manager IBM Security zSecure Suite
    Delft
    ------------------------------



  • 7.  RE: Trying to call zSECURE CARLA from REXX?

    Posted Thu August 17, 2023 12:53 PM

    Thanks again. I have a lot of learning to do. Sorry to waste the forum's time with things that are in the manuals.






  • 8.  RE: Trying to call zSECURE CARLA from REXX?

    Posted Fri August 18, 2023 04:16 AM
    Edited by Rob van Hoboken Fri August 18, 2023 04:16 AM

    For me at least, it is perfectly fine to ask questions in the forum.  The manuals are unsuitable as starting point in your CARLa coding journey, the big books are reference manuals, but so glad the language reference is online now.  There are some training materials and sample code pages here but they haven't been maintained (nor integrated into the current website).  Furthermore, having your answers in the forum shows others what is possible and how to achieve it, so keep sending your questions.  Answering questions from memory is risky, so I'm glad Jeroen keeps me on track ;-).

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