Oracle® HTML DB
Release 2.0
  Go To Table Of Contents
Contents

Previous
Previous
Next
Next
 

Establishing User Identity Through Authentication

Authentication is the process of establishing each user's identify before they can access your application. Authentication may require a user identify a username and password or could involve the use of digital certificates or a secure key.

When you create an authentication scheme, you have the option of choosing from a number of preconfigured authentication schemes, copying an authentication scheme from an existing application, or creating your own custom authentication scheme.

Topics:

Understanding How Authentication Works

You determine how your application interacts with users. If all users have the same rights and privileges they are referred to as public users. However, if your application needs to track each user individually, you need to specify an authentication method.

Authentication establishes the identity of each user who accesses your application. Many authentication processes require a user provide some type of credentials such as a username and password. These credentials are then evaluated and they either pass or fail. If the credentials pass, the user has access to the application. Otherwise, access is denied.

Once a user has been identified, the HTML DB engine keeps track of each user by setting the value of the built-in substitution string APP_USER. As a user navigates from page to page, the HTML DB engine sets the value of APP_USER to identify the user. The HTML DB engine uses APP_USER as one component of a key for tracking each user's session state.

From a programming perspective, you can access APP_USER using the following syntax:

  • From PL/SQL:

    V('APP_USER')
    
    
  • As a bind variable from either PL/SQL or SQL:

    :APP_USER
    
    

You can use APP_USER to perform your own security checks and conditional processing. For example, suppose you created the following table:

CREATE TABLE my_security_table (
  user_id   VARCHAR2(30),
  privilege VARCHAR2(30));

Once created, you could populate this table with user privilege information and then use it to control the display of pages, tabs, navigation bars, buttons, regions, or any other control or component.

Determining Whether to Include Authentication

As you create your application, you need to determine whether to include authentication. You can:

  • Choose to not require authentication. Oracle HTML DB does not check any user credentials. All pages of your application are accessible to all users.

  • Select a built-in authentication scheme. Create an authentication method based on available preconfigured authentication schemes. Depending on which scheme you choose, you may also have to configure the corresponding components of Oracle 10giAS, Oracle Internet Directory, or other external services.

  • Create custom authentication scheme. Create a custom authentication method, giving you complete control over the authentication interface. To implement this approach, you must provide a PL/SQL function the HTML DB engine executes before processing each page request. This function's Boolean return value determines whether the HTML DB engine processes the page normally or displays a failure page.

Creating an Authentication Scheme

To create an authentication scheme:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application home page, click Shared Components.

    The Shared Components page appears.

  5. Under Security, select Authentication Schemes.

    The Authentication Schemes page appears.

  6. To create a new authentication scheme, click Create.

  7. Specify how the scheme should be created by selecting one of the following:

    • Based on preconfigured scheme

    • As a copy of an existing scheme

    • From scratch

  8. Follow the on-screen instructions

Using the Authentication Scheme Repository

Once created, available authentication schemes display in the Authentication Schemes Repository.

To navigate to the Authentication Schemes Repository:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. On the Application home page, click Shared Components.

    The Shared Components page appears.

  5. Under Security, select Authentication Schemes.

    The Authentication Schemes page appears. You can change the appearance of the page by making a selection from the View list. Available options include:

    • Icons (the default) displays each authentication scheme as a large icon. To edit an authentication scheme, click the appropriate icon.

    • Details displays each application item as a line in a report.

      In Details view you can:

      • Edit an authentication scheme by selecting the scheme name

      • View a list of the steps performed on each page by clicking the Show icon

      • Apply an authentication scheme to an application by clicking the make current link

Viewing the Current Authentication Scheme for an Application

To view the current authentication scheme for an application:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. Click Edit Attributes.

  5. Click Edit Security Attributes.

  6. Locate the Authentication section. The current authentication scheme displays next to Authentication Scheme.

  7. To link to the Authentication Scheme pages and select the scheme name.

Changing the Current Authentication Scheme for an Application

To change the authentication scheme for an application:

  1. Navigate to the Authentication Schemes:

    1. Click the Application Builder icon on the Workspace home page.

    2. Select an application.

    3. On the Application home page, click Shared Components.

      The Shared Components page appears.

    4. Under Security, select Authentication Schemes.

  2. Click the Change Current tab at the top of the page.

  3. Select a new authentication scheme and click Next.

  4. Click Make Current.

Viewing Authentication Scheme Utilization

The Authentication Schemes report lists authentication scheme utilization for all applications in the current workspace.

To view the Authentication Schemes report:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

    The Applications home page appears.

  4. From the Tasks list, select View Application Reports.

  5. Click Cross Application Reports.

  6. Select Authentication Schemes.

  7. Click the application ID to link to the appropriate Application home page.

About Preconfigured Authentication Schemes

When you select a preconfigured authentication scheme, Oracle HTML DB creates an authentication scheme for your application that follows a standard behavior for authentication and session management. The following list describes available preconfigured authentication schemes:

  • Open Door Credentials enables anyone to access your application using a built-in login page which captures a username. This can be useful during application development.

  • HTML DB Account Credentials refers to the internal user accounts (also known as "cookie user" accounts) created and managed in the Oracle HTML DB user repository. Using method, your application can easily authenticate against these accounts.

  • LDAP Credentials Verification requires you specify configuration parameters about the external Lightweight Directory Access Protocol (LDAP) directory you will be using.

  • No Authentication (using DAD) gets the username from the data access descriptor (DAD), either as the value stored in the DAD configuration or, if the account information is not stored in the DAD configuration, as the username captured using the basic authentication challenge.

  • Oracle Application Server Single Sign-On (HTML DB engine as Partner App) delegates authentication to the Oracle AS Single Sign-On (SSO) Server. To you use authentication scheme, your site must have already been registered as a partner application with the SSO server. For more information, contact your administrator.

  • Oracle Application Server Single Sign-On (My application as Partner App) delegates authentication to the SSO server. Requires you register an application with SSO as a partner application.

About DAD Credentials Verification

DAD database authentication uses the Oracle database native authentication and user mechanisms to authenticate users using a basic authentication scheme. To use DAD credentials verification:

  • Each application user must have a user account in the Oracle database.

  • You must configure a PL/SQL DAD for basic authentication (without account information).

    This results in one username/password challenge for browser session for your application users. The user identity token is then made available in the APP_USER item.

DAD database authentication is useful when you need to implement an authentication method that requires minimal setup for a manageable number of users. Ideally these users would already have self-managed accounts in the database and your use of this authentication method would be short lived (for example, during the demonstration or prototyping stages of development).

The main drawback of this approach is burdensome account maintenance, especially if users do not administer their own passwords, or if their database accounts exist only to facilitate authentication to your application.

About HTML DB Account Credentials

HTML DB Account Credentials authentication uses internal user accounts (also known as "cookie user" accounts) created and managed in the Oracle HTML DB user repository. Workspace administrators can create and edit user accounts using the Manage Users page. HTML DB Account Credentials is a good solution when:

  • You want control of the user account repository

  • Username and password based approach to security is sufficient

  • You do not need to integrate into a single sign-on framework

This is an especially good approach when you need to get a group of users up and running on a new application quickly.


See Also:

"Managing Users" for information about creating and managing user accounts

About LDAP Credentials Verification

Any authentication scheme that uses a login page may be configured to use Lightweight Directory Access Protocol (LDAP) to verify the username and password submitted on the login page. Application Builder includes wizards and edit pages that explain how to configure this option. These wizards assume that an LDAP directory accessible to your application for this purpose already exists and that it can respond to a SIMPLE_BIND_S call for credentials verification. When you create a LDAP Credentials authentication scheme, the wizard requests and saves the LDAP host name, LDAP port, and the DN string. An optional pre-processing function can be specified to adjust formatting of the username passed to the API.

About Single Sign-On Server Verification

Oracle HTML DB applications can operate as partner applications with Oracle Application Server's Single Sign-On (SSO) infrastructure. To accomplish this, you must register your application (or register the HTML DB engine) as the partner application. To register your application or the HTML DB engine as a partner application, follow the Oracle Application Server instructions for registering partner applications and install the Oracle 9iAS SSO Software Developer Kit (SDK).

If you choose this approach, your application will not use an integrated login page. Instead, when a user accesses your application in a new browser session, the HTML DB engine redirects to the Single Sign-On login page. After the user is authentication by SSO, the SSO components redirect back to your application, passing the user identity and other information to the HTML DB engine. The user can then continue to use the application until they log off, terminate their browser session, or until some other session-terminating event occurs.

About Creating an Authentication Scheme from Scratch

Creating an authentication scheme from scratch gives you complete control over your authentication interface. This is the best approach for applications when any of the following is true:

  • Database authentication, or other methods are not adequate.

  • You want to develop your own login form and associated methods.

  • You want to delegate all aspects of user authentication to external services such as Oracle 10gAS Single Sign-On.

  • You want to control security aspects of Oracle HTML DB session management.

  • You want to record or audit activity at the user or session level.

  • You want to enforce session activity or expiry limits.

  • You want to program conditional n-way redirection logic before Oracle HTML DB page processing.

  • You want to integrate your application with non-Oracle HTML DB applications using a common session management framework.

  • Your application consists of multiple applications that operate seamlessly (for example, more than one Oracle HTML DB application ID).


See Also:

"HTMLDB_CUSTOM_AUTH" for more information

About Session Management Security

When running custom authentication, Oracle HTML DB attempts to prevent two improper situations:

  • Intentional attempts by a user to access session state belonging to someone else. However, users can still type in an arbitrary application session ID into the URL.

  • Inadvertent access to a stale session state (probably belonging to the same user from an earlier time). This would commonly result from using bookmarks to application pages.

Oracle HTML DB checks that the user identity token set by the custom authentication function matches the user identity recorded when the application session was first created. If the user has not yet been authenticated and the user identity is not yet known, the session state being accessed does not belong to someone else. These checks determine whether the session ID in the request can be used. If not, the HTML DB engine redirects back the same page using an appropriate session ID.

Building a Login Page

When you create a new application in Oracle HTML DB, a login page is created. The alias for the page is 'LOGIN'. You can use this page as the 'invalid session page' in an authentication scheme. The page is constructed with processes that call the Oracle HTML DB login API to perform credentials verification and session registration.

You can also build your own login pages using the pre-built pages as models and tailoring all of the user interface and processing logic to your requirements.

To create a login page for your application:

  1. Navigate to the Workspace home page.

  2. Click the Application Builder icon.

  3. Select an application.

  4. Click Create Page.

  5. Select Login Page.

  6. Specify Login page attributes and click Create.

About Deep Linking

Deep linking refers to the ability to link to an Oracle HTML DB page out of context (for example, from a hyperlink in an e-mail or workflow notification). When you link to a page out of context and the application requires the user be authenticated, the user will be taken to the login page. After credentials verification, the HTML DB engine automatically displays the page that was referenced in the original link. Deep linking is supported for applications that use authentication schemes.