Previous
Previous
 
Next
Next

Configuring Security Settings

Instance administrators can configure security settings, such as turning off cookies used to populate the login form in Application Express, controlling access to accounts, and setting up password policies.

Topics:

Turning Off Cookies Used to Populate the Login Form

Instance administrators can control if a convenience cookie is sent to a user's computer whenever a developer or administrator logs in to a workspace from the Application Express Login page. By default, the Set Workspace Cookie option is set to Yes.

If selected, Oracle Application Express sends a persistent cookie that:


Note:

If your computer has received this cookie, you can physically remove it from its persistent location on disk using browser tools or system utilities. The cookie is named ORA_WWV_REMEMBER_UN. In older releases of Oracle Application Express, this cookie was named ORACLE_PLATFORM_REMEMBER_UN. It may exist for each Oracle Application Express service accessed having distinct hostname and path components.

To prevent a cookie from being sent to the user's computer when logging in:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Locate the Security section.

  5. For Set Workspace Cookie, select No.

  6. Click Apply Changes.

Disabling Access Oracle Application Express Administration Services

Instance administrators can restrict user access to Oracle Application Express Administration Services. This prevents any user from logging in to Oracle Application Express Administration Services.

To disable user access to Oracle Application ExpressAdministration Services:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Locate the Security section.

  5. For Disable Administrator Login, select Yes.

  6. Click Apply Changes.

Setting this value and logging out prevents anyone from logging in to Oracle Application Express Administration Services.

Enabling Administrator Login

To reverse this setting and enable administrator login:

  1. Connect in SQL*Plus and connect to the database where Oracle Application Express is installed as SYS, for example:

    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      connect sys as sysdba
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      connect sys as sysdba
      

    When prompted enter the appropriate password.

  2. Run the following statement:

    ALTER SESSION SET CURRENT_SCHEMA = APEX_040000;
    
  3. Run the following statements:

    BEGIN
      APEX_INSTANCE_ADMIN.SET_PARAMETER('DISABLE_ADMIN_LOGIN', 'N');
      commit;
    END;
    /
    

Disabling Access Workspace Login

Developers and Workspace administrators log into the Oracle Application Express development environment to access the Application Builder, SQL Workshop, Team Development and Administration.

To restrict access to these applications, select Yes from Disable Workspace Login. This option effectively sets a Runtime Only environment while still allowing Instance administrators to log into Instance Administration. Selecting Yes in production environments prevents developers from changing applications or data.

To disable user access to the Internal workspace:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Locate the Security section.

  5. From Disable Workspace Login, select Yes.

    Selecting Yes prevents users from logging in to the Internal workspace.

  6. Click Apply Changes.

Controlling Public File Upload

Use the Allow Public File Upload attribute to control whether unauthenticated users can upload files in applications that provide file upload controls.

To control file upload:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Locate the Security section.

  5. From Allow Public File Upload, select one of the following:

    • Yes enables unauthenticated users to upload files in applications in the Internal workspace.

    • No prevents unauthenticated users from uploading files in applications in the Internal workspace.

  6. Click Apply Changes.

Restricting User Access by IP Address

Instance administrators can restrict user access to an Oracle Application Express instance by creating a Runtime setting named RESTRICT_IP_RANGE.

To restrict user access by IP address:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Locate the Security section.

  5. For Disable Administrator Login, select No.

  6. In Restrict Access by IP Address, enter a comma-delimited list of IP addresses. Use an asterisk (*) to specify a wildcard.

    You can enter IP addresses from one to four levels. For example:

    141, 141.* ...
    192.128.23.1 ...
    

    Note:

    When using wildcards, do not include additional numeric values after wildcard characters. For example, 138.*.41.2.

  7. Click Apply Changes.

Requiring HTTPS

Secure Socktets Layer (SSL) is a protocol for managing the security of data transmitted on the Internet. For Web applications, SSL is implemented by using the HTTPS protocol. Oracle recommends that you run Oracle Application Express applications using SSL (HTTPS protocol) to prevent any sensitive data from being sent over an unencrypted (cleartext) communication channel.

You can configure both your Oracle Application Express instance and all related applications to require HTTPS by setting the Require HTTPS attribute to Yes on the Manage Service page.


Note:

If you set Require HTTPS to Yes, you will only be able to log in to an Oracle Application Express workspace or Oracle Application Express Administration Services over HTTPS.

To require HTTPS for an Oracle Application Express instance:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Locate the Security section.

  5. For Require HTTPS, select Yes.

  6. Click Apply Changes.

Reversing HTTPS Requirement

To reverse the Require HTTPS instance-level requirement:

  1. Connect in SQL*Plus or SQL Developer with the Application Express engine schema as the current schema, for example:

    • On Windows:

      SYSTEM_DRIVE:\ sqlplus /nolog
      connect sys as sysdba
      
    • On UNIX and Linux:

      $ sqlplus /nolog
      connect sys as sysdba
      

    When prompted enter the appropriate password.

  2. Run the following statement:

    ALTER SESSION SET CURRENT_SCHEMA = APEX_040000;
    
  3. Run the following statements:

    BEGIN
        APEX_INSTANCE_ADMIN.SET_PARAMETER('REQUIRE_HTTPS', 'N');
        commit;
    end;
    /
    

Controlling RESTful Access

Use the Allow RESTful Access attribute to control whether developers can expose report regions as RESTful services.


See Also:

"Implementing Web Services" in Oracle Application Express Application Builder User's Guide

To enable RESTful Access:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Locate the RESTful Access section.

  5. From Allow RESTful Access, select one of the following:

    • Yes enables developers to expose report regions as RESTful services.

    • No prevents developers from exposing report regions as RESTful services.

  6. Click Apply Changes.

Configuring Session Timeout

Use the attributes under Session Timeout for Oracle Application Express to reduce exposure to abandoned computers with an open Web browser at the application level.

To manage session settings for an Oracle Application Express instance:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Under Session Timeout For Application Express, specify the following attributes:

    • Maximum Session Length in Seconds - Enter a positive integer representing how many seconds a session can exist for Oracle Application Express applications (that is, Application Builder, SQL Workshop, and so on). Leave the value NULL to revert the value to the default of 28800 seconds (or 8 hours). This session duration may be superseded by the operation of the job that runs every eight hours which deletes sessions older than 24 hours.

    • Maximum Session Idle Time in Seconds - Enter a positive integer representing how many seconds a session may remain idle for Oracle Application Express applications (that is, Application Builder, SQL Workshop, and so on). Leave the value null to revert the value to the default of 1 hour (3600 seconds).

  5. Click Apply Changes.

Excluding Domains from Regions of Type URL and Web Services

It is possible to restrict regions of type URL and Web services for the entire Oracle Application Express instance. The Instance administrator defines excluded domains and regions of type URL. If a Web reference or region of type URL contains an excluded domain, an error displays informing the user that it is restricted.

To exclude a domain from regions of type URL and Web services:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. In Domain Must Not Contain, enter a colon-delimited list of excluded domains.

  5. Click Apply Changes.

Enabling Login Controls for All Workspaces

By default, no login controls are enabled across an Oracle Application Express instance. Instance administrators can enable login controls for all accounts in all workspaces across an entire development instance. Account login controls include:

If the Instance administrator does not enable login controls for an entire instance then each Workspace administrator can enable controls on a workspace-by-workspace basis. See "Enabling Account Login Controls for a Workspace".

Note that Account Login control affect applications that use the Application Express user account creation facilities and authentication against those accounts.

To enable login controls for all workspaces:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Scroll down to Account Login control.

  5. Under Account Login Control:

    1. Require User Account Expiration and Locking - Select Yes to enable this feature for all workspaces across an entire Oracle Application Express instance. This feature applies to end-user accounts created using the Application Express end-user account management interface.

      Select No to relinquish control to each Workspace administrator.

    2. Maximum Login Failures Allowed - Enter a number for the maximum number of consecutive unsuccessful authentication attempts allowed before a developer or administrator account is locked. If you do not specify a value in this field, the default value is 4.

      This setting applies to Instance administrator and developer accounts. It does not apply to end user accounts.

      The value you enter is used as the default for the workspace-level Maximum Login Failures Allowed preference, if the Workspace administrator does not specify a value. That preference is used for end-user accounts within the respective workspace.

    3. Account Password Lifetime (days) - Enter a number for the maximum number of days a developer or administrator account password may be used before the account expires. If you do not specify a value in this field, a default value is 45 days.

      This setting applies to accounts used to access the Application Express administration and development environment only. It does not apply to end-user accounts used by applications developed in Application Express.

      The value you enter is used as the default workspace-level End User Account Lifetime preference, if the Workspace administrator specifies no value. That preference is used for end-user accounts within the respective workspace.

  6. Click Apply Changes.


Tip:

This feature applies only to accounts created using the Application Express user creation and management facilities. It provides additional authentication security for applications. See "Managing Application Express Users".

About Password Policies

Instance administrators can enable password policies for:

Configuring Password Policies

To configure password policies:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. To set up a password policy for Workspace administrators, developers, and end users, scroll down to Workspace Password Policy and specify the attributes described in Table: Workspace Password Policy Attributes.

    Workspace Password Policy Attributes

    Attribute Description

    Minimum Password Length

    Enter a number for the minimal character length for passwords.

    Minimum Password Differences

    Enter a positive integer or 0.

    When users change their password, the new password must differ from the old password by this number of characters. The old and new passwords are compared, character-by-character, for differences such that each difference in any position common to the old and new passwords counts toward the required minimum difference.

    Must Contain At Least One Alphabetic Character

    Select Yes to require that user passwords contain at least one alphabetic character. The Alphabetic Characters field lists the letters considered alphabetic characters.

    Must Contain At Least One Numeric Character

    Select Yes to require that user passwords contain at least one numeric character: 0,1,2,3,4,5,6,7,8, 9.

    Must Contain At Least One Punctuation Character

    Select Yes to require that user passwords contain at least one punctuation character. The Punctuation Characters field lists the symbols considered punctuation characters.

    Must Contain At Least One Upper Case Character

    Select Yes to require that user passwords contain at least one uppercase alphabetic character.

    Must Contain At Least One Lower Case Character

    Select Yes to require that passwords for users contain at least one lowercase alphabetic character.

    Must Not Contain Username

    Select Yes to prevent user passwords from containing the username, regardless of case.

    Must Not Contain Workspace Name.

    Select Yes to prevent user passwords from containing the workspace name, regardless of case.

    Must Not Contain

    Enter words, separated by colons, that may not be included in user passwords. These words may not appear in the password in any combination of uppercase or lowercase.

    This feature improves security by preventing the creation of some simple, easy-to-guess passwords based on words like hello, guest, welcome, and so on.

    Alphabetic Characters

    Enter new text or edit the existing text. This is the set of characters used in password validations involving alphabetic characters.

    Punctuation Characters

    Enter new text or edit the existing text. This is the set of characters used in password validations involving punctuation characters.


    Next, set up a password policy for service administrators.

  5. Scroll down to the Service Administrator Password Policy and specify one of the following:

    1. Use policy specified in Workspace Password Policy - Applies the password rules specified above in Workspace Password Policy to service administrator passwords.

    2. Use default strong password policy - Applies the default strong password policy to service administrator passwords. To learn more, see item Help.

  6. Click Apply Changes.

Restricting Access to Oracle Application Express by Database Access Descriptor (DAD)

mod_plsql and the embedded PL/SQL gateway support a directive which enables you to name a PL/SQL function which will be called for each HTTP request. You can use this functionality to restrict the procedures that can be invoked through the embedded PL/SQL gateway or mod_plsql. The function returns TRUE if the named procedure in the current request is allowed and FALSE if it is not allowed. You can use this function to enforce access restrictions for Oracle Application Express on a per-database access descriptor (DAD) basis.


See Also:

Oracle Application Express Listener Installation Guide

Oracle Application Express ships with a request validation function named wwv_flow_epg_include_modules.authorize. This function specifies access restrictions appropriate for the standard DAD configured for Oracle Application Express.

During installation, the installer also creates a PL/SQL function in the Oracle Application Express product schema (APEX_040000). You can change and recompile this function to restrict access. The source code for this function is not wrapped and can be found in the Oracle Application Express product core directory in the file named wwv_flow_epg_include_local.sql. The source code is as follows

CREATE OR REPLACE FUNCTION
wwv_flow_epg_include_mod_local(
    PROCEDURE_NAME IN VARCHAR2)
RETURN BOOLEAN
IS  
BEGIN  
    RETURN FALSE; -- remove this statement when  
you add procedure names to the "IN" list
    IF UPPER(procedure_name) IN (
          '') THEN  
        RETURN TRUE;  
    ELSE  
        RETURN FALSE;  
    END IF;  
END wwv_flow_epg_include_mod_local;
/

To add names of procedures that should be allowed:

  1. Remove or comment out the RETURN FALSE statement that immediately follows the BEGIN statement:

    ...
    BEGIN  
        RETURN FALSE; -- remove this statement when 
    you add procedure names to the "IN" list
    ...
    
  2. Add names to the clause representing procedure names that should be allowed to be invoked in HTTP requests. For example to allow procedures PROC1 and PROC2 the IN list you would write IN ('PROC1', 'PROC2').

After changing the source code of this function, alter the Oracle Application Express product schema (APEX_040000) and compile the function in that schema.

To alter the product schema, APEX_040000

  1. Log in to SQL Command Line (SQL*Plus) as SYS.

  2. Alter the product schema (APEX_040000) by entering the following command:

    ALTER SESSION SET CURRENT_SCHEMA APEX_040000; 
    
  3. Compile the function wwv_flow_epg_include_local.sql.

The wwv_flow_epg_include_mod_local function is called by Oracle Application Express's request validation function which itself is called by the embedded PL/SQL gateway or mod_plsql. The Oracle Application Express function first evaluates the request and based on the procedure name, approves it, rejects it, or passes it to the local function, wwv_flow_epg_include_mod_local, which can evaluate the request using its own rules.

When you create new Database Access Descriptors for use with Oracle Application Express, the request validation function directive should be specified. Specifically, the function wwv_flow_epg_include_modules.authorize should be named in the directive PlsqlRequestValidationFunction in the Database Access Descriptor entry in dads.conf.

If you have no additional restrictions beyond those implemented in the wwv_flow_epg_include_modules.authorize function, there is no need to take any action with respect to the source code for the wwv_flow_epg_include_mod_local function.

The PL/SQL Request Validation Function directive is only available in Oracle Application Server 10g and Oracle HTTP Server 11g or later, as well as the embedded PL/SQL gateway in Oracle Database 11g or later. This directive is not available in Oracle HTTP Server Release 9.0.3.

Defining Authorized URLs

In previous releases of Oracle Application Express, developers can use a URL as an argument in Oracle Application Express procedures that redirect to the defined URL. Examples include APEX_UTIL.COUNT_CLICK (p_url parameter) and WWV_FLOW_CUSTOM_AUTH_STD.LOGOUT (p_next_url parameter).

Instance administrators can define a list of authorized URLs. When a URL is provided as an argument to these procedures, it is verified internally against this list.

To manage the Authorized URLs list:

  1. Log in to Oracle Application Express Administration Services. See "Logging in to Oracle Application Express Administration Services".

  2. Click Manage Instance.

  3. Under Instance Settings, click Security.

  4. Click the Authorized URLs tab.

  5. To add a new URL:

    1. Click Create.

    2. Authorized URL - Enter an authorized URL that can be used as the parameter value to certain Application Express procedures.

      The entire authorized URL value will be compared with the URL parameter value in Oracle Application Express procedures. If there is an exact match up to and including the entire length of the Authorized URL value, then the URL parameter value will be permitted.

    3. Description - Enter a description of the URL.

    4. Click Apply Changes.

  6. To edit an existing URL:

    1. Click the Edit icon adjacent to the URL.

    2. Edit the Authorized URL and Description fields.

    3. Click Apply Changes.

  7. To delete an existing URL:

    1. Click the Edit icon adjacent to the URL.

    2. Click Delete.