Oracle APEX Tutorial 10 - Access Control - Part 1 - Video Training

By M&S Consulting (Kevin) on Aug 6th, 2009
Filed Under Technical Tips // Tags: ,

Introduction

Security. We hear about it everywhere. Make this more secure, make this less secure. In the computer industry this is also true, and a constant need for any system or application. APEX allows for basic security by user login, but there is more you might need to do. For this, we have Access Controls. This tutorial will walk you though adding a custom authentication control setup to an application. If you haven’t already, we reccomend you review our article Oracle APEX Tutorial Preparation and OEHR Sample Data Install to familiarize yourself with APEX. This tutorial also uses a second downloaded file, which the link is below.

Part 1 - Creating the Base Application and Controls

Location of ACL_EMPLOYEE.zip file

http://www.oracle.com/technology/products/database/application_express/packaged_apps/acl_employees.zip

Simply download the .zip file and extract it, keeping note of where you put the extracted file.

YouTube Preview Image

High Level Steps

1) Creating and Testing the Base Application (0:30)
2) Create the Access Controls (3:30)
3) Add User to Access Control List (4:56)
4) Create and Link the Custom Authentication Function (6:10)

Times in parenthesis are the approximate start time for that step

Notes and Resources

Authentication Options

APEX offers you three primary ways you can authenticate your users. The built in APEX option, no authentication, and by database account. All of our tutorials so far have used the APEX built in option. Within this option you can build more layers of controls, as we are in this example, or leave it as is. What this boils down to is wether or not you want to have to create APEX system level accounts or program level accounts for each user. In this example, we are creating program level accounts based off the acl_employees data. Using this method, we don’t have to create additional APEX system accounts, and you can better contain access to the program and to the APEX system. The actual needs may vary and you should consult your IT deparment to ensure you are complying with any in-house security standards you may have in place.

Application Modes

We have the option of four modes in which the application can run in. You can choose to run a given application in one of ‘Full Access to all’ , ‘Restricted Access’, ‘Public Access’, or ‘Administrative Access Only’. We are using the second of these, as it allows us to define view, edit and administrative levels of access and assign users to one of those groups. The mode you need can vary by application and the needs and policies of your group. Each level of access except for Full Access still allows some restriction, based on the level you chose.

Access Inclusion

When you set a specific access level as we are in this example, it means that is the minimum level needed to use that item. Any access above that is included in the permissions. IE If you go to a page that is set for view, if you have view, edit or admin rights you can use it, but if you try and go to a edit restricted page, anyone with view rights is locked out, and only edit or higher (admin) will be able to proceed.

Code and Pasted Text

PL/SQL fuction

CREATE OR REPLACE FUNCTION acl_custom_auth (
p_username IN VARCHAR2,
p_password IN VARCHAR2)
RETURN BOOLEAN IS
BEGIN
FOR c1 IN (SELECT 1
FROM acl_employees
WHERE upper(userid) = upper(p_username)
AND upper(last_name) = upper(p_password))
LOOP
RETURN TRUE;
END LOOP;
RETURN FALSE;
END;
/

Authorization Function Command

return acl_custom_auth
Bookmark and Share

Related Information:

  1. Oracle APEX Tutorial 10 - Access Control - Part 2 - Video Training Security. We hear about it everywhere. Make this more secure, make this less secure. In the computer industry this is...
  2. Oracle APEX Tutorial 8 - Up and Downloading Files - Part 1 - Video Training Reports and data entry constitue the bulk of what most of these tutorials cover, and what many businesses need. However,...
  3. Oracle APEX Advanced Tutorial 1 - Creating a Tabular Form - Video Walkthrough This tutorial is designed to walk you through section 2 of the Oracle APEX Advanced Tutorial, Creating a Tabular Form....
  4. Oracle APEX Tutorial 3 - Drilldown Report Part 1- Video Training This tutorial covers section 4 of the Oracle APEX Advanced Tutorials, Creating a drilldown report...
  5. Oracle APEX Tutorial 2 - Parameterized Report Part 1 - Video Training This Tutorial is a guided walkthrough of section 3 of the Oracle APEX Advanced Tutorials....
  6. Oracle APEX Tutorial 4 – Form Layout – Part 3 – Video Training APEX gives you a lot of power and flexibility with its built in wizards. They are very good at creating...
  7. Oracle APEX Tutorial 2 - Parameterized Report Part 2 - Video Training This Tutorial is a guided walkthrough of section 3 of the Oracle APEX Advanced Tutorials....
  8. Oracle APEX Tutorial 8 - Up and Downloading Files - Part 2 - Video Training Reports and data entry constitue the bulk of what most of these tutorials cover, and what many businesses need. However,...

Leave a Reply


Archives

Recent Comments

  • SaintClair said: Thanks a million for this priceless material. May God richly bless you!
  • ashok.aggarwal said: Thank you for your comment, Stuart. I’m glad this helped you.
  • Stuart said: I’d really like to thank you for your post. It was really that simple.
  • ashok.aggarwal said: Your specific question is not very clear, however, in the context of implementing a LIKE...
  • Jonas said: Finally in print that a user is required to show the email option. Thanks.

Calendar

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031  

Featured Testimonial

"M&S has taken 'partnership' to a new level. They are not only a deeply skilled service provider, the M&S team is actually a mission critical component to our operations, taking on new initiatives as well as maintaining custom, open source, and COTS solutions."

CEO, MedPivot

Free SQL Service