I had a few problems logging on to the MQWEB server using certificates, and found there was no documentation to help resolve problems. The debug information you can get is often not very helpful!
As an extra twist, a userid having no access and getting a “not authorised to the resource” is OK. For example my userid may have access to MQWebAdmin, but not to MQWebAdminRO – it may be wrong to have access to both, so you will get at least one “not authorised to the resource” violation.
I looked at
- MQWEB traces not enough information provided
- RACF traces – looks wrong to me
- RACF audit data in SMF – this is all you need
The only way of getting out the data, is to enable RACF audit for the profile, and set an option in the mqwebuser.xml file.
To make it even more difficult to resolve problems. When a request arrives at the web server, it encrypts the information, and sends down an LTPA token. The next request from the browser sends this token, and bypasses some of the initial checks, so you will not see trace entries. After the LTPA token has expired, the next request will do the full logon again.
To prevent this from happening, clear your browser history and cache before retesting.
MQWEB trace provides information – none of it usable.
I used the trace string
traceSpecification=”*=info:zos.native.03=fine”
I also included :UserRegistry=all:Credentials=all which gave more information, not all of it useful.
This provides information like
Description: Entry: checkAuthorizationFast serviceResults: 00000050868103e7 suppresMessages: 0 logOption: 3 requestor: raco_cb: 0000005082d08290 acee: 0000000000000000 accessLevel: 2 applName: MQWEB className: EJBROLE entityName: MQWEB.com.ibm.mq.console.MQWebAdminRO ... Description: RACROUTE REQUEST=FASTAUTH return returnCode: 0 safReturnCode: 0 racfReturnCode: 0 racfReasonCode: 0
But does not tell you which userid the request was being made for!
Sometime it gives you full control blocks, other times truncated like MQWEB.com.ibm.mq so you do not know if this is for Admin, AdminRO, or User.
MQWEB safAuthorization racRouteLog
I enabled RACF AUDIT for the MQWEB.com.ibm.mq.console.MQWebAdminRO and MQWEB.com.ibm.mq.console.MQWebAdmin.
In the mqwebuser.xml you can have to display audit messages about EJBROLE
<safAuthorization racRouteLog=”NONE” id=”saf”
reportAuthorizationCheckDetails=”false” />
See here – which says
Specifies the types of access attempts to log.
- ASIS Records the event in the manner specified in the profile that protects the resource, or by other methods such as the SETROPTS option.
- NOFAIL If the authorization check fails, the attempt is not recorded. If the authorization check succeeds, the attempt is recorded as in ASIS.
- NONE The attempt is not recorded.
- NOSTAT The attempt is not recorded. No logging occurs and no resource statistics are updated.
With AUDIT enabled, and with racRouteLog=”ASIS” I got the following “failures” (every 10 seconds) due to the web server doing auto-refresh. The checks to MQWebUser worked, and were not recorded in the joblog.
- 15.51.54 ICH408I USER(ADCDC ) GROUP(TEST ) NAME(ADCDC) MQWEB.com.ibm.mq.console.MQWebAdmin CL(EJBROLE ) INSUFFICIENT ACCESS AUTHORITY ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )
- 15.51.54 ICH408I USER(ADCDC ) GROUP(TEST ) NAME(ADCDC ) MQWEB.com.ibm.mq.console.MQWebAdmin CL(EJBROLE ) INSUFFICIENT ACCESS AUTHORITY ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )
- 15.51.55 ICH408I USER(ADCDC ) GROUP(TEST ) NAME(ADCDC ) MQWEB.com.ibm.mq.console.MQWebAdminRO CL(EJBROLE ) INSUFFICIENT ACCESS AUTHORITY ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )
- 15.51.55 ICH408I USER(ADCDC ) GROUP(TEST ) NAME(ADCDC )MQWEB.com.ibm.mq.console.MQWebAdminRO CL(EJBROLE ) INSUFFICIENT ACCESS AUTHORITY ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )
- 15.51.55 ICH408I USER(ADCDC ) GROUP(TEST ) NAME(ADCDC )MQWEB.com.ibm.mq.console.MQWebAdmin CL(EJBROLE ) INSUFFICIENT ACCESS AUTHORITY ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )
- 15.51.55 ICH408I USER(ADCDC ) GROUP(TEST ) NAME(ADCDC )MQWEB.com.ibm.mq.console.MQWebAdminRO CL(EJBROLE ) INSUFFICIENT ACCESS AUTHORITY ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )
When I changed it to racRouteLog=”NONE” the messages were not produced on the joblog. There were still records produced in the SMF audit data with the profiles having AUDIT ALL(READ) specified.
I think you should usually run with racRouteLog=”NONE” , and change it to racRouteLog=”ASIS” when you have a problem – but be careful not to generate a flood of messages.
To display SAF messages about other violations use
<safCredentials unauthenticatedUser=”WSGUEST” profilePrefix=”MQWEB”
suppressAuthFailureMessages=”false” mapDistributedIdentities=”false”/>
RACF Trace
This gives data as to what was accessed, but reports the userid of the web server, not the userid being checked – so not very useful.
I used the command
- #set trace(RACROUTE(ALL),JOBNAME(CSQ9WEB))
- traced to GTF with USRP(F44)
- formatted it with the IPCS command GTF USR(ALL)
This had data like
- Trace Type: RACFPOST – this is the “AFTER” request
- Service number: 00000002 – this is RACROUTE 2, verify
- RACF Return code: 00000008
- RACF Reason code: 00000004
- MQWEB.com.ibm.mq.console.MQWebAdmin – this profile
- EJBROLE – this class
- MQWEB – this application
- ACEE ( userid block) with userid=START1, Group=SYS1, Jobname=CSQ9WEB. This had a userid of START1 (from the job), but the userid being tested was for ADCDC which was not in the control blocks – so no good for telling you which userid had accces or not.
So all we can tell is, that for the profile EJBROLEMQWEB.com.ibm.mq.console.MQWebAdmin someone got a ‘no access’ return code.
Turn off the RACF trace using
#SET TRACE(NORACROUTE,NOJOBNAME)
RACF Auditing – this worked and gave me most of the information
I turned on RACF auditing using
- RALTER EJBROLE MQWEB.com.ibm.mq.console.MQWebAdmin AUDIT(ALL,READ)
- RALTER EJBROLE MQWEB.com.ibm.mq.console.MQWebAdminRO AUDIT(ALL,READ)
- RALTER EJBROLE MQWEB.com.ibm.mq.console.MQWebUser AUDIT(ALL,READ)
- SETROPTS RACLIST(EJBROLE)
This writes a record to SMF for ALL(failed and successful) request which were READ or above.
I used the RACF provided exits to the SMF dump program(IFASMFDP). This produces readable file with all of the data.
I wrote an ISPF edit macro in rexx to take the data, and extract the key fields.
Below are the records produced for
- an SSL connection using a certificate which mapped to userid ADCDB,
- a logon with a userid and password with userid ADCDC
RESULT USERID WANT ALLOWED CLASS RESOURCE SUCCESS START1 READ /READ SERVER BBG.SECPFX.MQWEB SUCCESS ADCDB READ /UPDATE APPL MQWEB SUCCESS ADCDB READ /UPDATE APPL MQWEB SUCCESS ADCDC READ /READ APPL MQWEB SUCCESS WSGUEST READ /READ APPL MQWEB INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdmin INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdminRO SUCCESS ADCDC READ /READ EJBROLE MQWEB.com.ibm.mq.console.MQWebUser INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdmin INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdmin INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdmin INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdminRO INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdmin INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdminRO INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdminRO SUCCESS ADCDC READ /READ EJBROLE MQWEB.com.ibm.mq.console.MQWebUser INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdminRO SUCCESS ADCDC READ /READ EJBROLE MQWEB.com.ibm.mq.console.MQWebUser SUCCESS ADCDC READ /READ EJBROLE MQWEB.com.ibm.mq.console.MQWebUser SUCCESS ADCDC READ /READ EJBROLE MQWEB.com.ibm.mq.console.MQWebUser INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdmin INSAUTH ADCDC READ /NONE EJBROLE MQWEB.com.ibm.mq.console.MQWebAdminRO
From the RESULT column, the userid ADCDC had
- only READ access to MQWEB.com.ibm.mq.console.MQWebUser,
- no access to MQWEB.com.ibm.mq.console.MQWebAdmin and MQWEB.com.ibm.mq.console.MQWebAdminRO, as we can see from the INSufficientAUTHority in the RESULT column. The resource wanted READ – but had NONE. This is OK, as we want the MQWebUser permissions.
From SUCCESS ADCDB READ /UPDATE APPL MQWEB we can see that userid ADCDB (from the certificate) wanted READ access, but had UPDATE access to to MQWEB in the class APPL.
It does not look very optimised code, it looks like the logic is like
- hmm it looks like this userid does not have access to this EJBROLE, let me check again
- and again
- and again
- and again
- and again
- and again
- OK give up, and try another resource
- hmm it looks like you do have access to this other resource -let me check again..
- and again…
- … ok you still have access – let’s go with this.
I expect is because a high level java program called a class to do some work, which checked the access; it called another class which did its own checks etc. Understandable, but not efficient coding.
This all worked, I could see all of the access requests, but sadly I did not get a record saying “this certificate…. was mapped to userid ADCDB”.
One thought on “Tracing Liberty logon on z/OS – is difficult”