Enable ADF Security in ADF application

Home/ADF/Enable ADF Security in ADF application

Enable ADF Security in ADF application

In this section, we have described enabling ADF Security in ADF Fusion Web Application. The following topics are covered in this example

  • Enable ADF Security in ADF application and create a login page
  • Enable Authentication by
    • Create an application Role ‘Administrator.’
    • Create a test user ‘admin’ and assign the user to role ‘Administrator.’
  • Enable Authorization by
    • Grant the role Administrator to JSF page and TaskFlow, so user requires a login to see the JSF and TaskFlow components

Download the ADFSecurityApp

Enable ADF Security in ADF Application and create a login page

In my ADF Fusion web application, I have a bounded task flow which has a View activity. Once we enable ADF security, all the activities in the task flow require access

082116_2003_EnableADFSe1 Enable ADF Security in ADF application

The View.jsff page belongs to the view activity contains an output text component as shown below

082116_2003_EnableADFSe2 Enable ADF Security in ADF application

Created an index.Jsf page and assigned the task flow as a region component as shown below

082116_2003_EnableADFSe3 Enable ADF Security in ADF application

Enable ADF Security: click on the application menu, security and select Configure ADF Security as shown below

082116_2003_EnableADFSe4 Enable ADF Security in ADF application

In the ‘Configure ADF Security‘ wizard, Select ADF Authentication and Authorization

082116_2003_EnableADFSe5 Enable ADF Security in ADF application

Select ‘No Automatic Grants’ and click Next. By selecting this, any resource ( jsf/jsff page, taskflow, images ) in this application requires authentication

082116_2003_EnableADFSe6 Enable ADF Security in ADF application

Enable both the check boxed if you want to redirect a specific page upon successful login and click Finish. The ADF Security is enabled for the application

082116_2003_EnableADFSe7 Enable ADF Security in ADF application

Enable Authentication by Creating Roles and Users

Open the jazn-data.xml under Description/Meta-INF in Application Resources as shown below

082116_2003_EnableADFSe8 Enable ADF Security in ADF application

Create Role:

In the jazn-data.xml, select the Application Roles, Using the Green Plus icon, create a role called ‘Administrator’ as shown below

082116_2003_EnableADFSe9 Enable ADF Security in ADF application

Create User and assign the user to Role:

Click the tab ‘Test Users and Roles’, Click the Green Plus icon and create a user called ‘admin’

Note: This test user are for testing the application security in integrated WebLogic server

082116_2003_EnableADFSe10 Enable ADF Security in ADF application

 

Click the Green Plus icon under the Application Roles, select ‘Assign Application Roles’, Select the Administrator and click Ok

082116_2003_EnableADFSe11 Enable ADF Security in ADF application

The final wizard will be like below. The user admin is associated with Administrator

082116_2003_EnableADFSe12 Enable ADF Security in ADF application

Enable Authorization:

Select the ‘Resource Grants’ tab, select ‘Task Flow’ in Resource Type, select the task flow under resources you want to give grant, Select the Green Plus icon and select ‘Add Application Role.’

082116_2003_EnableADFSe13 Enable ADF Security in ADF application

Select the Role we just created and click Ok. Here the role ‘Administrator’ is granted to access the given task flow

082116_2003_EnableADFSe14 Enable ADF Security in ADF application

View is selected by default,

082116_2003_EnableADFSe15 Enable ADF Security in ADF application

Like the same way, select the Resource type as Webpage, Resource as the index.JSF page and Granted to Administrator. The Administrator role is granted to index.jsf

082116_2003_EnableADFSe16 Enable ADF Security in ADF application

Run the Application

Run the index.jsf page in WebLogic , the below like login page appear on the page. Login with the test user account

082116_2003_EnableADFSe17 Enable ADF Security in ADF application

The index.jsf appears on the page

082116_2003_EnableADFSe18 Enable ADF Security in ADF application

pgn Enable ADF Security in ADF application

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
pgn Enable ADF Security in ADF application
By | 2016-08-27T19:23:15+00:00 August 21st, 2016|Categories: ADF|Tags: , , , , , |0 Comments
Like us on Facebook.
Connect!