Skip to main content

Application authorization scheme

When building an application in Oracle Application Express, we can restrict access to pages, regions, buttons, items,... by using Authorization Schemes. In this blog post I will focus on applying scheme to (all) pages.

For example, I can create a simple scheme, which will just check if I am a valid user:


After that, I can go to a page in my application and I can apply this scheme:


If I log into the application with user that is not ALJAZ and I go to the page with this scheme, I will see following message:



In general, if we want that our application is secure, then we should apply authorization scheme to all pages. Normally our application starts with just a few pages, but in time it will just grow. And sometimes, it can happen that we forget to add authorization scheme to newly created pages. By doing that, every user that can log in in the application has access to this pages. But at least users must still login to access this pages, right? What about if we are using Single Sign On to allow access to our applications? In this case, once I'm logged in (and authenticated) into my company's network, I have access to all unprotected pages in all APEX applications.

We can agree that it is a good idea to check our applications, if there are unprotected pages. To do that, we can simply use Advisor Utility and it will check this (among many other useful checks). For example in my demo application page 1 is unprotected and I can see this result:



One option that we have is that we go to all those pages and we apply authorization scheme. But this still does not solves the original problem - that we might forget to apply scheme on newly created pages. But there is one really nice feature/setting in APEX that will solve exactly this problem - Application Authorization Scheme. We can find this setting, if we to Edit Application Security Attributes ( Edit Application / Security Tab )


By setting Application Authorization Scheme, we are applying this scheme to all unprotected pages in our application (if page all ready has an authorization scheme, then scheme on a page will be used). Additional setting that we can specify, is if this scheme is also applied on public pages. 

In this way even when we create new pages, this pages are protected. 

Aljaz

Popular posts from this blog

Change image prefix when using ORDS in standalone mode

In Oracle Application Express we can specify instance wide image prefix ( we provide this when installing APEX or later if we run apex/utilities/reset_image_prefix.sql ). Purpose of this blog post in not to explain what image prefix is, but if you would like to know more about it, then I recommend that you read a blog post from Joel Kallman - Image Prefix changes in Oracle Application Express 4.2.2 My blog post is about what we need to do, if we are changing image prefix and at the same time we are using Oracle REST Data Services (ORDS) in standalone mode . If we need to change image prefix, first thing is to run apex/utilities/reset_image_prefix.sql script and here we specify new image prefix - for example /i_test/ After this change when accessing APEX login page we will see this warning: I find this warning very useful. It's telling us that we have to verify that we have copied images directory to right location and also that our new path is /i_test/ . In case w

APEX Alpe Adria

APEX Alpe Adria There are different ways how a story can start. The story about the  APEX Alpe Adria conference started in the beautiful city of Rovinj in Croatia. I was travelling from the  SiOUG event  to the  HrOUG event . Since the HrOUG event takes place on the island, I was waiting for the boat transfer. I was standing at the end of the peer and thinking it's good that we have an event in Slovenia and also in Croatia, but at the same time, would it be great to do something together? To do something together, you need other people who would support this idea, and by "coincident", who do I see standing on the peer waiting for a boat transfer ... Dario Bilić. Dario is a good friend of mine. At that time, he was helping with the APEX track for the HrOUG event. I explained my idea to Dario. He suggested, let's also reach out to Peter Raganitsch and we can organise the dedicated APEX event for the  Alpe Adria region . Sure enough, Peter supported this idea without an

New Look & Feel for Radio Group in Oracle Application Express 5.1

With Oracle Application Express version 5.1 we are getting lots of new features. Among most notable or exposed are for sure Interactive Grids, JET Charts and Live Template Options. But we can also find some smaller (and really nice) enhancements. One of this is new look and feel of Radio Group item. We can spot this for example when we use Create New Page wizard in Page Designer: So what do we need to do, if we want to have this look and feel in our applications. Just adding combo box item to our page is not enough, it will have the same effect as in version 5.0. It will look like this : Basically we need to change three things. Number of Columns: should match number of elements in group or you can also set it to some bigger value (for example 100) Display Null Value: NO  Template Option -> Region Group Display: Display as Pill Button After this three small changes we now have new look and feel for our radio group: For me personally the s