A year or so ago I had come across the term realms in relation to security, but could not find what they are or how they are used.
I’ve been working with JSON Web Tokens, (to identify a Linux user to the MQWEB server on z/OS) and have found out what realms are.
The short answer is a realm is a zone of definitions it could be a machine, or a company. OK – this is not very clear.
The high level view
Take the scenario, I have a z/OS and a Linux environments. On both systems I have a userid COLIN. When I create a JWT
on Linux I give it parameters subject:COLIN, issuer:LINUX
on z/OS I give it parameters subject:COLIN, issuer:zPROD
By some magic the JWT arrive at my web server, and I have configured the server to lookup the information in RACF.
In this scenario the realm is either LINUX or ZPROD.
I define mapping on z/OS (RACMAP) which say
For (subject: COLIN, Realm: LINUX) set the userid=NOONE
For (subject: COLIN, Realm: zPROD) set the userid=IBMUSER
So depending what is in the payload I can get a different userid on z/OS to issue my MQ commands.
A more complex example
In my MQWEB server I have definitions like
openidConnectClient: when issuerIdentifier=”zOSMF” and the signing certificate matches the keyring label “COLINPAICE” in keyring …. then use realm=”zPROD”
For user COLIN, this would match a RACMAP with
For (subject: COLIN, Realm: zPROD) set the userid=IBMUSER.
ICH408I USER(START1 ) GROUP(SYS1 ) NAME(####################) DISTRIBUTED IDENTITY IS NOT DEFINED: ADCDC ADCDPL
My z/OS has sysplex name of ADCDPL.
Which says there was no mapping for the userid ADCDC, and the realm name ADCDPL. This took me half a day to resolve!
With this if I had configured RACMAP to have subject ADCDC and realm ADCDPL mapping to SYS1U – if a request came in from z/OS or Linux both would get userid SYS1U – which I am sure you do not want to happen.
The short answer is a realm is a zone of definitions it could be a machine, or a company. OK should now be perfectly obvious.
I spent a long time trying to find what data from a Zowe CLI commands was being sent to the backend. I did traces on the back end – but they did not show me the data. I eventually found traces for the work station end.
The output is in the directory pointed to by ZOWE_CLI_HOME – which defaults to ~/.zowe/logs on Linux.
ZOWE_APP_LOG_LEVEL
The ZOWE_APP_LOG_LEVEL trace is boring. It is in home/colinpaice/.zowe/logs/zowe.log
[2025/08/02 15:05:37.754] [TRACE] [main.js:40] Init was successful [2025/08/02 15:05:37.837] [DEBUG] [MQSessionUtils.js:22] Creating an MQ session from arguments [2025/08/02 15:05:37.845] [INFO] [ConfigAutoStore.js:135] Skipping update of profile properties. Check that config file exists and autoStore is true.
ZOWE_IMPERATIVE_LOG_LEVEL
The ZOWE_IMPERATIVE_LOG_LEVEL=debug trace in logs/imperative.log has
The RACF PassTicket is a (one-time-only/short duration) password that is generated by a requesting product or function. It is an alternative to the RACF password. You create a passticket specifying the userid and the application, and a one off password is generated. You can specify a validity period.
By default the passticket has replay protection – in that once used, the passticket cannot be used again, and so prevent replay. You can allow a passticket to be used more than once either by specifying APPLDATA(‘NO REPLAY PROTECTION’) for basic pass tickets, or REPLAY(YES) for enhanced pass tickets.
The server can use the function __login__applid() (or similar function) to run a thread as the specified userid. You pass the userid, password (pass ticket) and the application to use.
The MQWeb server is code running on top of Liberty Web server.
For my MQWeb server, running as started task CSQ9WEB, it was configured so my mqweb/mqwebuser.xml configuration file had <safCredentials profilePrefix=”MQWEB“…./>
I created a passticket for my userid COLIN, and application MQWEB, and I was able to logon to the the MQWEB server using userid COLIN and with the pass ticket as my password.