enPortal Security

< enportal | 5.4 | admin | user administration

Page Contents

1. Input validation

Part of Edge enPortal’s cross-site scripting protection involves checking request parameters for validity against a list of patterns and it will reject requests with disallowed characters in a URL (or decoded form of the URL).

This approach can produce occasional false positives since there are applications that actually expect characters that do not comply with the RFC. All aspects of the HTTP request are tested, including request, headers, and body. Captures will cause display of HTTP 500 responses. Updates to the output encoding scheme are also implemented to improve system efficiency and to eliminate XSS attacks. All attacks are logged in PORTAL_HOME/logs/jspsystem.log. The default behavior is to deny requests that contain malicious characters if the page that initiated the request is not from the portal server. The settings for XSS request validations are in the PORTAL_HOME/config/config.properties file.

In instances where the application requires/expects these special characters, the portal administrator/integrator is required to place an override for the matching URL, header, referrer, query field pattern. Otherwise, the portal simply denies the request and logs the failure.

The following documents some of the validation rule syntax:

Global Input Validation Rules

These Rules define an ordered set of request validators that search for
cross-site scripting attacks within input characters. The ordering
establishes a priority for evaluation, allowing general validation rules
to be skipped by defining rules that are evaluated before the general case.

Specific Usage: These rules are processed in order, based on the alphanumeric
ordering of the $INSTANCEKEY value. To override the general validation rule,
define an earlier validator rule that matches the requests whose input
validation is to be bypassed.

Syntax: for request.validator property namespace:

.log_attacks:  Global flag for logging attacks which result in terminated 
          requests.  Default is on.
.log_info:     Global flag for info logging of the request.validator 
          Note: This is very noisy and will fill up the jsp-system.log
.$INSTANCEKEY: defines an individual rule, using the following subfields:
 .if.request.matches:   A precondition that matches against the request string 
                type: regular expression
 .if.referer.indicates:   A precondition for the HTTP Referer Header of requests.
                Qualifies are comparison of the host between the request's 
                URL and the request's referer header URL.
                type: options are [ SELF ], whereSELF is default 
                SELF indicates that the HTTP page that initiated 
                this request was originally loaded from this 
.if.header.$NAME.matches  A precondition tied to an HTTP Request's header 
                type: regular expression 
                $NAME: indicates the name of the HTTP Request 
                header that will be tested for matches

.then:      Selects the behavior that this rule proceeds with when all of 
          the conditionals evaluate positively 
          type: options are [ ALLOW, TESTFIELDS ], where ALLOW is default
          - ALLOW : skips remaining evaluation rules, allowing the request
          - TESTFIELDS : activates full examination of request fields 
          using the expression declared in this rules field.matches

.field.matches:  A XSS attack search expression evaluated on a request's fields 
         type: regular expression
         All fields of a request are tested against this expression 
         in order to identify characters indicating an XSS attack
.field.onMatch:  Selects the behavior for cases where the evaluation of the 
         field.matches expression finds a match.
         type: options are [ DENY ], where DENY is the default 
         DENY indicates that the http request will not be processed

2. Credentials for SSO

The enPortal proxied content requires Single Sign-On (SSO) to back-end applications to be provisioned. When the enPortal password can be used for back-end applicaiton login, it will be stored in memory for the session only and used. For many cases when a different password must be sent to the back-end application, enPortal handles SSO password storage by using a crypto package for these passwords. enPortal requires an interface that allows it to extract the unencrypted form of the password to submit on the request to the back-end web application.

Additionally, the enPortal distribution includes a default encryption key that is used for securely storing authentication passwords in the database and XML files. The customer may choose to add a level of security to the system by using included tools to create a custom key for encrypting passwords. External application passwords used for Single Sign-On are encrypted by enPortal using strong encryption (the NIST sponsored AES algorithm). Creating a custom key will enhance security by creating a custom private key applicable to only the individual system.

3. Secure configuration

Edge enPortal supports a number of configurations to aid in hardening the system. For instance, on UNIX, enPortal uses a secondary account (portal:portal) which is used to run the processes. Only when a privileged port is required does the customer require running the application as root. enPortal downgrades to the portal account when starting up the portal, jsp, and web worker processes. Only the initial web startup request is run as root.

The following additional details allow the enPortal administrator to further lock down the system:

  1. Ability to setup and configure password policy, including a number of security options including forcing account locks after consecutive failures.

  2. Ability to only allow a single concurrent session per user; to prevent users from logging in at the same time from multiple places.

  3. Disabling domain and user cookies used to pre-fill login windows.

  4. Updating custom login pages and disabling default login pages which remember user, domain, and password information from remembering selections.

  5. Disabling default accounts, creating custom administration accounts, or configuring specific resources with /portalAdministration rights (role assignment).

  6. Reviewing any applications integrated in the portal which do not provide security based on authorization, and adding appropriate CRS access control rules.

  7. Determine all the ports needed to be open; lock down all not listed here:
    • Between the web clients and the portal server: port 443 (Apache),
    • Between the portal jsp server and the backend applications. Typically need access over http to the server and port the backend application is running on.
    • Between the portal serverapp process and the database. The server and port the database is running on.

  8. Internal Portal Ports needed to be locked down to prevent access from outside: 8200 (between apache and tomcat), 8300 (between tomcat and portal server), along with the port between database and portal server.

  9. Tomcat is secured because it does not communicate with outside world (it is a not standalone web server).

  10. Apache is secured with latest apache, openssl, mod_jk build, plus following update to portal’s custom-httpd.conf:
    • KeepAliveTimeout set to 15
    • LimitRequestBody 512000
    • ServerTokens Prod
    • apache conf directory permission check: to be performed as part of the OS lockdown
    • apache bin directory permission check: to be performed as part of the OS lockdown
    • apache log directory permission check: to be performed as part of the OS lockdown
    • remove manual from apache install: to be performed as part of the OS lockdown

  11. XSS and Vulnerability Tool Hardening:
    • By default, some trust is associated with HTTP requests whose Referer tags indicate local origination. This is conifgurable via Rule 77 in webapps/enportal/WEB-INF/config/config.properties which is enabled by default. However, while browsers do not allow changing the Referer dynamically without the user intentionally setting a new value, the Referer in the HTTP request is spoofed by most security attack tools and would yield failed test results if local origin Referers are trusted. Although all XSS issues (that are known) have been dealt with on the response side and thus should not pose a security risk, if there is a need to employ multiple layers of security against XSS attacks, it may be required to comment this rule, which will cause all requests (regardless of Referer) to be checked for XSS attacks via Rule 99 below. Disabling Rule 77 may result in some minimal loss of functionality, including:
      • RegEx Evaluator channel (/system/proxy/Regex Evaluator) will not be able to handle grouping characters (). The input, pattern, and replace fields will not be able to handle any entered text that is matched by the regex pattern. [\'\"].*[;]|[<>\(\)]
      • Channel creation wizard will not be able to create Parameters that is matched by the regex pattern. [\'\"].*[;]|[<>\(\)]
      • The following configuration items could conceivably be affected if the user input happens to match the regex pattern ([\'\"].*[;]|[<>\(\)])
        • SSO token for passwords
        • Portal user passwords
        • XMLImport file name
        • Proxied channel parameters
        • Regex Evaluator
        • Expression Evaluator
        • Display name for menu (folder) and channels
    • By default user and domain credentials are echoed in HTTP responses (but not the password). Some security analysis tools will identify this as a security vulnerability, and users can disable this functionality by editing webapps/enportal/WEB-INF/config/config.properties and setting jsp.usercookies=false.
    • CRS XSS Rules: handleXSS.xml is created and placed in WEB-INF/xmlroot/server/crs/runtimehandlers directory. This file can be assigned to a channel or to the Proxy class of pim packages for specific integration need. Or it can be moved to WEB-INF/xmlroot/server/crs/defaulthandlers directory for system wide checking.
  12. SSL Browser Caching
    • By default, Appboard now marks all content (excpet for images, CSS, or Javascript) as non-cacheable, which is a suggestion to browsers not to retain such content for efficiency purposes. There is a property (request.ssl.cache, specified in WEB-INF/config/config.properties) which can be toggled to "true" and will cause XML, HTML, and SWF content to be cached, as well. Setting this to "true" may slightly increase client performance with the increased risk of possibly sensitive content being retained by browsers.

4. Patching

Edge Technologies Inc. provides security patches for custom web component based on the latest Apache baseline. Patches are also provided as needed for Tomcat, the base portal product, and Product Integration Modules (PIMs).