When youre setting up an HTTP Server for AS/400 server configuration, you need to be aware of the default user profiles that OS/400 uses for public access to your AS/400-based Web server instances and OS/400-based CGI programs (including eRPG programs). Not only do you need to be aware of these profiles, you also need to lock down the profiles so that they can be used only for public access to your OS/400-based Web site (i.e., you dont want to make them available to hackers). To that end, heres my guide for the paranoid system administrator to locating and locking down OS/400 HTTP Server for AS/400 Web server user profiles.
Who Are These Guys?
By default, an HTTP Server for AS/400 server instance uses the QTMHHTTP user profile for public access to your Web pages. This is confusing because your HTTP Server configuration never explicitly says that it is using this profile. Rather, QTMHHTTP is used for public access when the UserID parameter is set to %%SERVER%% in your configuration. To double-check this setting, pull up the green-screen Work with HTTP Configuration (WRKHTTPCFG) command for your server configuration and look for the following UserID parameter line:
This means all users will sign in as the QTMHHTTP user, and they will access your HTTP server resources with the authority of the QTMHHTTP user. If a UserID parameter is not present in your HTTP Server configuration, UserID of %%SERVER%% is assumed, and the HTTP Server for AS/400 will automatically use the default QTMHHTTP user profile for server access. As an alternative, Figure 1 shows that you can set this parameter by using the HTTP Configuration and Administrative GUI. To do this, open your server configuration inside the GUI, and click on the Basic drop-down list. If the User input field on that screen is equal to %%SERVER%%, any server instances using this configuration will automatically sign in its users as the QTMHHTTP user.
The default UserID parameter can also be overridden in your document protection setups. If you use the Document Protection feature in your server configuration to password protect individual documents or groups of documents, the user/password authentication scheme specified in your protection directives or protection setups will take precedence over the UserID parameter set up within your Basic setup.
To confuse matters, if your server configurations are using OS/400-based CGI programs, such as e-RPG (RPG CGI) programs, a different default user profile is invoked. The user profile used for OS/400 CGI programs is called QTMHHTP1, and to the best of my knowledge, this user profile cannot be overridden when calling CGI programs.
Locking Down These Profiles
Until you understand that there are two default user profiles for HTTP Server for AS/400 security, and that these user profiles can also be used in HTTP Server for AS/400 (powered by Apache) configurations, you will find yourself in a dilemma. You need to provide public access for these user profiles to access OS/400 Web server resources that you specifically authorize them to, but you also need to lock down these user profiles so that no one can use them to sign on to your iSeries or AS/400 and try to hack your system. Figure 2 shows how you can use the Change User Profile (CHGUSRPRF) command to completely lock down these profiles for interactive sign on, while still allowing users to use the profiles for signing on to your OS/400-based Web server. Do this by bringing up CHGUSRPRF and changing the following settings for each of these user profiles:
Set the Password (PASSWORD) parameter on the User Profile to *NONE. Users with PASSWORD(*NONE) cannot sign on to an AS/400.
Set the Initial Program to Call (INLPGM) parameter to *NONE so that no OS/400 program is called if the user is able to sign on.
Set the Initial Menu (INLMNU) parameter to *SIGNOFF so that the system signs off the user if they are able to sign on.
Set the Limit Capabilities (LMTCPB) parameter to *YES so that this user does not have access to an OS/400 command line.
This may seem a bit extreme but, by doing this, youve pretty much taken these profiles out of the possibility of signing on to your iSeries or AS/400 and performing any work. Since these profiles arent intended for interactive usage, you should close the door tightly to make sure they cant be used for troublemaking.
In addition to locking down these profiles, be extremely stingy with the AS/400 Integration File System (AS/400 IFS) files and directory and the OS/400 library and file authorities you assign to these profiles. Never give these profiles more system authority than they need. Be sure to follow all of IBMs security recommendations in their HTTP manuals to ensure that you have locked down your user security as much as possible before exposing your AS/400 on the Internet. The secret here is to minimize your exposure as much as possible while also allowing the user profiles to do the work for which they were intended.
Figure 1: You can set the UserID parameter for your server configuration with the green- screen WRKHTTPCFG command, or through the Basic option of the HTTP Configuration and Administration GUI.
Figure 2: Heres how I typically lock down the QTMHHTTP profile to prevent anyone using it as an interactive sign on.