3HTTPd Server Account and Environment5

HFRD Hypertext Services - Technical Overview

p [next] [previous][contents]
1

3 - HTTPd Server Account and Environment




G The HTTPd server account should be a standard account, preferably in aJgroup of its own (definitely at least a non-system, non-user group), with 2sufficient quotas to handle the expected traffic. 

VMS Account



/ The following provides a guide to the account:J

  Username: HTTP$SERVER                      Owner:  HyperText DaemonT  Account:  HTTPD                            UIC:    [377,377] ([HTTPD,HTTP$SERVER])>  CLI:      DCL                              Tables: DCLTABLES!  Default:  HT_ROOT:[HTTP$SERVER]  LGICMD:   LOGIN  Flags:  Restricted DisNewMail%  Primary days:   Mon Tue Wed Thu Fri-  Secondary days:                     Sat SunH  Primary   000000000011111111112222  Secondary 000000000011111111112222H  Day Hours 012345678901234567890123  Day Hours 012345678901234567890123H  Network:  ##### Full access ######            ##### Full access ######H  Batch:    ##### Full access ######            ##### Full access ######H  Local:    -----  No access  ------            -----  No access  ------H  Dialup:   -----  No access  ------            -----  No access  ------H  Remote:   -----  No access  ------            -----  No access  ------F  Expiration:            (none)    Pwdminimum:  6   Login Fails:     0@  Pwdlifetime:         90 00:00    Pwdchange:      (pre-expired)R  Last Login:            (none) (interactive), 11-MAY-1995 08:44 (non-interactive);  Maxjobs:         0  Fillm:       300  Bytlm:       300000;  Maxacctjobs:     0  Shrfillm:      0  Pbytlm:           0;  Maxdetach:       0  BIOlm:       512  JTquota:       1024;  Prclm:         100  DIOlm:       512  WSdef:         1000;  Prio:            4  ASTlm:       600  WSquo:         2000;  Queprio:         0  TQElm:       100  WSextent:     20000;  CPU:        (none)  Enqlm:       256  Pgflquo:     200000  Authorized Privileges:    NETMBX    TMPMBX  Default Privileges:    NETMBX    TMPMBX


Account LOGIN.COM




= The following is suggested as the LOGIN.COM for theMserver account. It provides a secure DCL environment for the server image toexecute within.

  $ SET NOCONTROL=Y  $ SET NOON  $ IF F$MODE() .EQS. "OTHER"  $ THEN'  $    IF F$TRNLNM("MULTINET") .EQS. ""&  $       THEN HTTPD = "$HT_EXE:HTTPD"/  $       ELSE HTTPD = "$HT_EXE:HTTPD_MULTINET"  $    ENDIF     $    HTTPD_LOOP:7  $       HTTPD /LOG=HT_LOGS:'F$GETSYI("NODENAME")'.LOG?  $!      (non-error exit, must be a restart, loop immediately))  $       IF $STATUS THEN GOTO HTTPD_LOOP@  $!      (error exit, wait, then try to start the server again)  $       WAIT 00:01:00  $       GOTO HTTPD_LOOP  $!   END_HTTPD_LOOP:  $    STOP/ID=0	  $ ENDIF  $ IF F$MODE() .EQS. "BATCH"  $ THEN@  $    PURGE /KEEP=3 HT_SERVER_LOGS:'F$GETSYI("NODENAME")'80.LOG   $    RUN SYS$SYSTEM:LOGINOUT -!           /DETACHED /AUTHORIZE -M           /INPUT=NL: /OUTPUT=HT_SERVER_LOGS:'F$GETSYI("NODENAME")'_HTTPD.LOG  $    STOP/ID=0	  $ ENDIF.  $!(interactive and network modes stop here!)
  $ STOP/ID=0


Privileged Image




J As this image is to be installed with privileges unauthorized use should Ebe prevented by applying an ACL similar to the following against the executable image: (

  $ SET SECURITY HT_EXE:HTTPD.EXE -?    /ACL=((IDENT=HTTP$SERVER,ACCESS=R+E),(IDENT=*,ACCESS=NONE))


> This can be done once, at installation, or for peace-of-mind 9(a.k.a. VMS-ish paranoia) at each server startup. 

G As the HTTP$SERVER account should be completely unprivileged, and the FHTTPd image requires NETMBX, TMPMBX, PRMMBX, PSWAPM, SYSNAM and SYSPRVKprivileges, it must be installed using a command similar to the following: (

  $ INSTALL = "$SYS$SYSTEM:INSTALL"J  $ INSTALL ADD HT_EXE:HTTPD.EXE /PRIVILEGE=(PRMMBX,PSWAPM,SYSPRV,SYSNAM) 
 

Logical Names




J The following logical names are essential for the operation of the HTTPd *server and must be defined before startup:



I The following logical name is created by the executing HTTPd server and (defines the name of the control mailbox:



J The following logical names are created by the executing HTTPd server if %the HTTPd monitor utility is enabled:

)

Server Process Logging Directory




H The server process log directory (output for the detached HTTPd server Mprocesses) may require explicit access controls for the HTTPd account. This 9can be done by applying an ACL similar to the following: /

  $ SET SECURITY HT_ROOT:[LOG]SERVER.DIR ->    /ACL=((IDENT=HTTP$SERVER,ACCESS=R+W+E, OPTIONS=DEFAULT), --          (IDENT=HTTP$SERVER,ACCESS=R+W+E), -3          (IDENT=*,ACCESS=NONE, OPTIONS=DEFAULT), -           (IDENT=*,ACCESS=NONE))


D As with the ACL on the server executable this can be done once, at Oinstallation (or, if right over the top, at each server startup). Appropriate (disk quotas may also need to be applied. 

Startup



F Putting all this together the HTTPd server startup procedure becomes $something similar to the following: H

  $ DEFINE /SYSTEM /TRANSLATION=CONCEALED HT_ROOT DSA811:[HT_ROOT.]  $!*  $ SET SECURITY HT_ROOT:[LOG]SERVER.DIR ->    /ACL=((IDENT=HTTP$SERVER,ACCESS=R+W+E, OPTIONS=DEFAULT), --          (IDENT=HTTP$SERVER,ACCESS=R+W+E), -3          (IDENT=*,ACCESS=NONE, OPTIONS=DEFAULT), -           (IDENT=*,ACCESS=NONE))  $!(  $ IF F$GETSYI("ARCH_NAME") .EQS. "VAX"/  $    THEN DEFINE /SYSTEM HT_EXE HT_ROOT:[VAX]/  $    ELSE DEFINE /SYSTEM HT_EXE HT_ROOT:[AXP]	  $ ENDIF  $!(  $ DEFINE /SYSTEM HT_LOGS HT_ROOT:[LOG]6  $ DEFINE /SYSTEM HT_SERVER_LOGS HT_ROOT:[LOG.SERVER]A  $ DEFINE /SYSTEM HTTPD$CONFIG HT_ROOT:[000000]HTTPD$CONFIG.CONF;  $ DEFINE /SYSTEM HTTPD$MAP HT_ROOT:[000000]HTTPD$MAP.CONF%  $ DEFINE /SYSTEM HTTPD$GMT "+10:30"  $!#  $ INSTALL = "$SYS$SYSTEM:INSTALL"$  $ IF F$TRNLNM("MULTINET") .NES. ""  $ THEN&  $    SET SECURITY HT_EXE:HTTPD.EXE -B       /ACL=((IDENT=HTTP$SERVER,ACCESS=R+E),(IDENT=*,ACCESS=NONE))%  $    INSTALL ADD HT_EXE:HTTPD.EXE -;                   /PRIVILEGE=(SYSPRV,SYSNAM,PRMMBX,PSWAPM)  $ ELSE/  $    SET SECURITY HT_EXE:HTTPD_MUTLINET.EXE -B       /ACL=((IDENT=HTTP$SERVER,ACCESS=R+E),(IDENT=*,ACCESS=NONE)).  $    INSTALL ADD HT_EXE:HTTPD_MULTINET.EXE -;                   /PRIVILEGE=(SYSPRV,SYSNAM,PRMMBX,PSWAPM)	  $ ENDIF?  $ SUBMIT /QUEUE=SYS$BATCH /USER=HTTP$SERVER /NOLOG /NOPRINT -*           HT_ROOT:[HTTP$SERVER]LOGIN.COM 
!

3.1 - HTTPd Command Line




3.1.1 - Server Startup




C When starting up the server several characteristics of the may be Nspecified using qualifiers on the command line. If not specified appropriate defaults are employed.



< Note: buffer sizes apply on a per-request (thread) Hbasis, and may be tailored for specific environments at server startup. 

3.1.2 - Server Control



G A foreign command for the HTTPD control functionality will need to be =assigned in the adminstration users' LOGIN.COM, for example: 

  HTTPD == "$HT_EXE:HTTPD"


= The control functionality (via the /DO= qualifier) Gis available to the privileged user. If a non-default server port, or Pmultiple servers on the one system are being used, then it will be necessary to Aappend a /PORT= qualifier to the any command, and issue it multiple times. "

3.1.2.1 - Server Shutdown



I The running server may be elegantly shut down, without loss of existing Cclient requests, using the following command on the server system: 

  $ HTTPD /DO=EXIT


K The running server may be immediately and unconditionally shut down using ,the following command on the server system: 

  $ HTTPD /DO=ABORT


I The running server may be elegantly restarted, without loss of existing Cclient requests, using the following command on the server system: 

  $ HTTPD /DO=RESTART
!

3.1.2.2 - Mapping Reload




G The mapping rules may be reloaded into the running server using+the following command on the server system:

  $ HTTPD /DO=MAP

3.1.2.3 - Counter Reset




E The server counter values are carried over when a server (re)starts F(provided the system has stayed up). To reset these counters use the (following command on the server system: 

  $ HTTPD /DO=ZERO


L Note that the count of the number of time the counters have been zeroed is not reset by this command. 

3.1.2.4 - Logging



? The HTTPd server request log may be opened (enabled) or6closed (disabled) using the following commands:

  $ HTTPD /DO=LOG=OPEN
and
  $ HTTPD /DO=LOG=CLOSE


; Any records still in the RMS buffers may be flushed using:

  $ HTTPD /DO=LOG=FLUSH
!

3.1.2.5 - Authentication




> Also see 4.1 - Authentication.

F The HTTPd's authentication facility tracks failures and after a givenMthreshold consistently rejects authentication requests for the given usernameKwithout actually validating the username/password. This is done to prevent&password attacks via the HTTPd server.

4 The authentication database may be displayed using:

  $ HTTPD /DO=AUTH=ALL


E Authentication database failure records only may be displayed using:

  $ HTTPD /DO=AUTH=FAIL


> Any failure records may have their count reset to zero using::

  $ HTTPD /DO=AUTH=RESET=realm:username





p [next] [previous][contents]