Deploying an ADF Secure Application using WLS Console
By Juan Camilo Ruiz on Jun 07, 2010
Last week I worked on a requirement from a customer that wanted to understand how to deploy to WLS an application with ADF Security without using JDeveloper. The main question was, what steps where needed in order to set up Enterprise Roles, Security Policies and Application Credentials. In this entry I will explain the steps taken using JDeveloper 126.96.36.199. 0
Instead of building a sample application from scratch, we can use Andrejus 's sample application that contains all the security pieces that we need.
Open and migrate the project. Also make sure you adjust the database settings accordingly.
Creating the EAR file
Review the Security settings of the application by going into the Application -> Secure menu and see that there are two enterprise roles as well as the ADF Policies enforcing security on the main page.
Make sure the Application Module uses the Data Source instead of JDBC URL for its connection type, also take note of the data source name - in my case I have:
To facilitate the access to this application once we deploy it. Go to your ViewController project properties select the Java EE Application category and give it a meaningful name to the context root as well to the Application Name
Go to the ADFSecurityWL Application properties -> Deployment and create a new EAR deployment profile. Uncheck the Auto generate and Synchronize weblogic-jdbc.xml Descriptors During Deployment
Deploy the application as an EAR file.
Deploying the Application to WLS using the WLS Console
On the WLS console create a JNDI data source. This is the part that I found more tricky of the hole exercise given that the name should match the AM's data source name, however the naming convention that worked for me was
Now, deploy the application manually by selecting deployments ->Install look for the EAR and follow the default steps.
If this is the firs time you deploy the application, once the deployment finishes you will be asked to Activate Changes on the domain, these changes contain all the security policies and application roles insertion into the WLS instance.
Creating Roles and User Groups for the Application
To finish the after-deployment set up, we need to create the groups that are the equivalent of the Enterprise Roles of ADF Security.
Now we can run the application and test the security constraints