Search This Blog

Monday, July 7, 2025

Set Up Database Account Credentials

 


Setting up database account credentials in Oracle APEX enables you to authenticate users using their Oracle database usernames and passwords. This method connects your application security directly to the database, making it suitable for administrative tools or internal systems where users already have individual database access. By using database authentication, you can take advantage of Oracle’s built-in user management and password policies without creating a separate user table or external authentication system.

Setting up database account credentials in Oracle APEX means configuring your application to authenticate users using their Oracle database usernames and passwords. This approach is best suited for internal tools or administrative applications where users already have access to the database and where tight integration with Oracle’s user management and password policies is preferred.

To begin, go to your application in Oracle APEX, then navigate to Shared Components > Authentication Schemes. Click Create, then choose Based on a Preconfigured Scheme from Gallery. From the list of available options, select Database Account and click Next. Give the scheme a name such as "DB Account Login" and finish the wizard. Once created, click on the new scheme and select Set as Current to make it active.

When this authentication scheme is active, Oracle APEX will prompt users to enter their database username and password when logging in. APEX passes these credentials to the Oracle database for validation using standard database authentication. If the login is successful, the session starts and the user is granted access to the application.

You do not need to create a custom login page when using this scheme, as APEX automatically generates a login form that accepts database credentials. However, if desired, you can still customize the login page for styling or additional messaging without altering the authentication logic.

Database user accounts must already exist in the Oracle database. To create them, a DBA can use standard SQL commands such as:

CREATE USER sample_user IDENTIFIED BY password123;

GRANT CREATE SESSION TO sample_user;

Each user must have the CREATE SESSION privilege to log in. You can also assign specific roles or object privileges based on your security model.

It’s important to note that APEX will treat the logged-in database user as the session user. If you want to restrict access to specific users, you can add authorization schemes to your pages or use PL/SQL expressions to check SYS_CONTEXT('USERENV', 'SESSION_USER').

For logout behavior, APEX ends the session but does not invalidate the database account, as the authentication is handled outside of APEX. You may want to configure a logout URL in the authentication scheme to redirect users to the login page or another screen.

Be cautious when using this method in public or internet-facing applications. Since it depends on Oracle database credentials, exposing this form outside of a trusted network could pose security risks. Always enforce HTTPS and strong password policies when using database account authentication.

Setting up database account credentials in Oracle APEX is a straightforward way to connect application access to existing Oracle user management. It is most useful for internal environments where users are trusted, technically capable, and already have individual accounts in the Oracle database.

Follow these steps to configure Database Account Credentials authentication for your application:

1.    Navigate to the Workspace home page.

2.    Open App Builder.

3.    Select an application.

4.    On the Application home page, go to Shared Components.

5.    Under Security, select Authentication Schemes.

6.    On the Authentication Schemes page, click Create.

7.    Choose Based on a pre-configured scheme from the gallery and click Next.

8.    Under Name

·        Name: Enter a reference name for the authentication scheme.

·       Scheme Type: Select Database Accounts.

9.    Click Create Authentication Scheme.

This setup allows users to authenticate using their database account credentials.

Configuring database account credentials in Oracle APEX provides a direct and efficient way to secure access to applications in environments where users are already managed at the database level. It ensures that authentication is handled by Oracle’s proven security mechanisms and eliminates the need for redundant user systems. While this approach may not be ideal for all applications, it is a reliable choice for internal tools and technical user groups who already maintain Oracle database credentials.

 

No comments:

Post a Comment

HOW DO I USE A STATIC LOV IN A DROPDOWN IN ORACLE APEX

HOW DO I USE A STATIC LOV IN A DROPDOWN IN ORACLE APEX Introduction Dropdown lists are a common feature in Oracle APEX applications, allo...