[0001]
[0002]
[0003]
[0004]
[0005]
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069]
[0070]
[0071]
[0072]
[0073]
[0074]
[0075]
[0076]
[0077]
[0078]
[0079]
[0080]
[0081]
[0082]
[0083]
[0084]
[0085]
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107]
[0108]
[0109]
[0110]
[0111]
[0112]
[0113]
[0114]
[0115]
[0116]
[0117]
[0118]
[0119]
[0120]
[0121]
[0122]
[0123]
[0124]
[0125]
[0126]
[0127]
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134]
[0135]
[0136]
[0137]
[0138]
[0139]
[0140]
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
[0149]
[0150]
[0151]
[0152]
[0153]
[0154]
[0155]
[0156]
[0157]
[0158]
[0159]
[0160]
[0161]
[0162]
[0163]
[0164]
[0165]
[0166]
[0167]
[0168]
[0169]
[0170]
[0171]
[0172]
[0173]
[0174]
[0175]
[0176]
[0177]
[0178]
[0179]
[0180]
[0181]
[0182]
[0183]
[0184]
[0185]
[0186]
[0187]
[0188]
[0189]
[0190]
[0191]
[0192]
[0193]
[0194]
[0195]
[0196]
[0197]
[0198]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204]
[0205]
[0206]
[0207]
[0208]
[0209]
[0210]
[0211]
[0212]
[0213]
[0214]
[0215]
[0216]
[0217]
[0218]
[0219]
[0220]
[0221]
[0222]
[0223]
[0224]
[0225]
[0226]
[0227]
[0228]
[0229]
[0230]
[0231]
[0232]
[0233]
[0234]
[0235]
[0236]
[0237]
[0238]
[0239]
[0240]
[0241]
[0242]
[0243]
[0244]
[0245]
[0246]
[0247]
[0248]
[0249]
[0250]
[0251]
[0252]
[0253]
[0254]
[0255]
[0256]
[0257]
[0258]
[0259]
[0260]
[0261]
[0262]
[0263]
[0264]
[0265]
[0266]
[0267]
[0268]
[0269]
[0270]
[0271]
[0272]
[0273]
[0274]
[0275]
|1Authorization Configuration (Basics)|

|^ WASD offers a comprehensive and versatile authentication and authorization
environment.  A little too comprehensive, often leaving the new administrator
wondering where to begin.  The role of this chapter is to provide a starting
place, especially for sources of authentication, along with some basic
configurations.
|link%|../features/##Authentication and Authorization| of
|link%|../features/##|WASD Features and Facilities||
contains a detailed explanation of all
aspects.  All examples here assume a standard installation and environment.

|^ Just to clarify. |*Authentication| is the verification of a user's identity,
usually through username/password credentials. |*Authorization| is allowing a
certain action to be applied to a particular path based on that identity.

|^ Changes to the authorization configuration file can be validated at the
command-line before reload or restart.  This detects and reports any
syntactical and configuration errors but of course cannot check the
|/intent| of the rules.

|code|
$ HTTPD /DO=AUTH=CHECK
|!code|

|^ If additional server startup qualifiers are required to enable specific
authorization features then these must also be provided when checking.  For
example:

|code|
$ HTTPD /DO=AUTH=CHECK /SYSUAF /PROFILE
|!code|

|^ A server's currently loaded authorization rules may also be interrogated
from the Server Administration menu (see
|link%|../features/##Server Administration| of
|link%|../features/##|WASD Features and Facilities||).

|2SYSUAF/Identifier Authentication|

|^ This setup allows any active account to authenticate using the local VMS
username and password.  By default not every account may authenticate this way,
only those holding specified VMS rights identifiers.  The examples provided in
this section allows access to the WASD online Server Administration facility,
and so may be followed specifically for that purpose, as well as serve as a
general guide.

|bullet|

|item| Define the following logical before calling the server startup
procedure.  To make such a definition permanent add it to the system or Web
environment startup procedures.  This logical contains a startup qualifier that
configures the server to allow authentication from the SYSUAF, using VMS rights
identifiers
(|link%|../features/##Authentication Policy| of
|link%|../features/##|WASD Features and Facilities||).

|code|
$ DEFINE /SYSTEM WASD_STARTUP_SERVER "/SYSUAF=ID"
$ @|/device||:[WASD_ROOT.LOCAL]STARTUP.COM
|!code|

After a change to a command-line qualifier of the server such as the above
it needs to be restarted using the following directive.

|code|
$ HTTPD/DO=RESTART
|!code|

|item| Decide on an identifier name.  This can be an existing identifier, or
one created for the purpose.  For this example the identifier will be
"WASD_WEBADMIN".  Any identifier can be created using actions similar to the
following example.

|code|
$ SET DEFAULT SYS$SYSTEM
$ MCR AUTHORIZE
UAF> ADD /IDENTIFIER WASD_WEBADMIN
|!code|

|item| Modify the authorization configuration file, accessed by the server
using the system logical WASD_CONFIG_AUTH, to contain the following.  This
allows full access to the online Server Administration facility and [.LOCAL]
directory (and no world access).  Additional paths may be added as required,
and of course multiple identifiers may be created and used for multiple realms
and paths.

|code|
["Web Admin"=WASD_WEBADMIN=id]
/httpd/-/admin/* r+w
/wasd_root/local/* r+w
|!code|

|item| The identifier must then be granted to those accounts allowed to
authenticate in this way.

|code|
$ SET DEFAULT SYS$SYSTEM
$ MCR AUTHORIZE
UAF> GRANT /IDENTIFIER WASD_WEBADMIN SYSTEM
|!code|

|item| Using this approach useful discrimination may be exercised.  For
instance, one identifier for Web administrators, another (or others) for
different authentication requirements.

|code|
["Web Admin"=WASD_WEBADMIN=id]
/wasd_root/local/* r+w
/httpd/-/admin/* r+w
["Area Access"=|/area-identifier-name||=id]
/web/area/* r+w ; r
|!code|

|^ Of course the one account may hold multiple identifiers and so may have
access to various areas.

|code|
UAF> GRANT /IDENTIFIER WASD_WEBADMIN SYSTEM
UAF> GRANT /IDENTIFIER |/area-identifier-name| SYSTEM
|!code|

|^ Using VMS rights identifiers allows significant granularity in providing
access.

|!bullet|

|0After Changes|

|^ If the WASD_CONFIG_AUTH configuration file is changed, or rights identifiers are
granted or revoked from accounts, the server should be directed to reload the
file and purge any cached authorization information.

|code|
$ HTTPD/DO=AUTH=LOAD
$ HTTPD/DO=AUTH=PURGE
|!code|

|2Other Authentication|

|^ Other sources of authentication are available, either by themselves or used
in the same configuration file (different realms and paths) as those already
discussed
(|link%|../features/##Authentication Sources| of
|link%|../features/##|WASD Features and Facilities||).
Non-SYSUAF sources do not require any startup qualifier to be enabled.

|bullet|

|item| |*ACME| DOIs (Authentication and Credential Management Extension,
Domains of Interpretation) may be used to authenticate requests.

|code|
["Whatever you want to call it!"=|/doi||=ACME]
/web/area/* r+w
|!code|

|item| |*Simple lists| contain usernames and unencrypted passwords.  These are
plain-text files, created and modified using any desired editor.

|code|
["Whatever you want to call it!"=|/list-name||=list]
/web/area/* r+w
|!code|

|^ This is a |_very| simple arrangement, with little inherent security.  Lists
are more useful when grouping names together for specifying which group may do
what to where.

|item| |*HTA databases| are WASD-specific, binary repositories of usernames,
encrypted passwords, capabilities, user and other detail.

|code|
["Whatever you want to call it!"=|/HTA-database-name||=HTA]
/web/area/* r+w
|!code|

|^ These databases may be administered using the online Server Administration
facility
(|link%|../features/##HTTPd Server Revise| of
|link%|../features/##|WASD Features and Facilities||).
 
or the HTAdmin command-line utility
(|link%|../features/##HTAdmin| of
|link%|../features/##|WASD Features and Facilities||).

are quite secure and versatile.

|item| |*External agents| are authentication and authorization scripts executed
on demand, under the control-of but external to the server.  It is possible for
a site to write its own, custom authorization agent.

|code|
["Whatever you want to call it!"=|/agent-name||=agent]
/web/area/* r+w
|!code|

Two variations on a versatile LDAP authenticator and a CEL-compatible
authenticator, along with example code is available in the
|link%|/wasd_root/src/agent/"|WASD_ROOT:[SRC.AGENT]| directory.

|item| |*X.509| establishes identity based on Public Key
Infrastructure (PKI) authentication certificates.  This is only available for
SSL transactions.

|code|
[X509]
/web/area/* r+w
|!code|

|item| |*RFC1413| IETF document describes an identification protocol that can
be used as a form of |/authentication| within this realm.

|code|
["Whatever you want to call it!"=RFC1413;A_PROJECT=list]
/web/area/* r+w ; r
|!code|

|!bullet|

|2Read and Write Groupings|

|^ WASD allows separate sources for groups of usernames to control read and
write access in a particular realm
(|link%|../features/##Realm, Full-Access, Read-Only| of
|link%|../features/##|WASD Features and Facilities||).

|^ These groups may be provided via simple lists, VMS identifiers, HTA
databases and authorization agents.  The following example shows an identifier
authenticated realm with full and read-only access controlled by two simple
lists.  For the first path the world has no access, for the second read-only
access (with the read-only grouping becoming basically redundant information).

|code|
["Realm Name"=|/identifier_name||=id;|/full_access_name||=list;|/read-only_name||=list]
/web/area/* r+w ; 
/web/another-area/* r+w ; r
|!code|

|2Considerations|

|^ Multiple authentication sources (realms) may be configured in the one
WASD_CONFIG_AUTH file.

|^ Multiple paths may be mapped against a single authentication source.

|^ Any path may be mapped only once (for any single virtual service).

|^ Paths may have additional access restrictions placed on them, including
client host name, username, etc.
(|link%|../features/##Access Restriction Keywords| of
|link%|../features/##|WASD Features and Facilities||).

|^ The configuration file is loaded and stored by the server at startup.  If
changed it must be reloaded to take effect.  This can be done manually using

|code|
$ HTTPD/DO=AUTH=LOAD
|!code|

|^ Authentication information is cached.  Access subsequently removed or
modified will not take effect until the entry expires, or is manually purged
using

|code|
$ HTTPD/DO=AUTH=PURGE
|!code|

|^ Failed attempts to authenticate against a particular source are limited. 
When this is exceeded access is always denied.  If this has happened the cache
must be manually purged before a user can successfully authenticate

|code|
$ HTTPD/DO=AUTH=PURGE
|!code|