Wednesday, January 27, 2016

Solution to ADFC-0619: Authorization check failed

Problem Statement:
My ADF Application, with security implemented through jazn-data when deployed on Weblogic box, the authorization does not happen and i often i receive
oracle.adf.controller.security.AuthorizationException: ADFC-0619: Authorization check failed: 'oracle.jbo.uicli.binding.JUFormDef@d856cd' 'VIEW'.

This issue has been discussed @:
https://community.oracle.com/message/9646751
http://oracle.developer-works.com/article/4786269/ADFC-0619%3A+Authorization+check+failed%3A+'homePageDef'+'VIEW'+-+Solved

Root Cause:
The root cause for the issue is when an ADF application with security enabled is deployed through weblogic console the <Domain_home>/config/fmwconfig/system-jazn-data.xml do not get updated and hence the server is not aware of the security policies and the page remains unavailable

Solution:

I was stuck with this issue for more than 2 weeks and following solutions were implemented:

1. Instead of going for Authentication and Authorization go for Authentication only


Not sure why this works, but it induces a new issue.
Issue with this approach if if trying to access a page with permission given to anonymous-role, the application would route to the login page in this case and user is forced to login

2. Try to deploy the application on server through Jdeveloper


This solves the issue but in most of the cases the prod servers wont be available for developers to access and makes this approach unpractical

3. Deploy through em console

This approach finally worked in my case. Deploy the application on Admin Server through em console. Make sure in Deployment Settings: Click on Configure Application Security to modify the default settings and in Configure Application Security provide following:

Select Application Policy Migration as “Append”.
Uncheck the “Remove Policies during Application undeployment
Provide Application setting id as "<Application_name>"
Click Apply



NOTE: THIS STEP WOULD UPDATE THE system-jazn-data.xml FILE

Now undeploy the application from Admin Server and deploy it on the managed server with same settings keeping the system-jazn-data.xml intact(i guess deployment to managed server can be done even from WL Console but never tried it)

probably Dimitar Dimitrov speaks of the same stuff manually in the thread



Please share your thoughts on this issue if you face it




1 comment:

  1. In case someone else should stumble upon this:

    If you deploy an ADF application via weblogic console, select the ADF managed server AND!!! the AdminServer as target for the system-jazn-data.xml to be published.

    This article helped me to finally find out why roles haven't been published. Thanks

    ReplyDelete