ADF Security Authorization

As it's written in Oracle® Application Development Framework Developer’s Guide For Forms/4GL Developers B25947-01 I created file adf-config.xml file like this
<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=" http://xmlns.oracle.com/adf/config
../../../../../bc4jrt/src/oracle/adf/share/config/schema/config.xsd"
xmlns=" http://xmlns.oracle.com/adf/config "
xmlns:sec=" http://xmlns.oracle.com/adf/security/config ">
<sec:adf-config-child xmlns=" http://xmlns.oracle.com/adf/security/config ">
<JaasSecurityContext
     initialContextFactoryClass="oracle.adf.share.security.JAASInitialContextFactory"
     authorizationEnforce="true"
     jaasProviderClass="oracle.adf.share.security.providers.jazn.JAZNSecurity Context" >
</JaasSecurityContext>
</sec:adf-config-child>
</adf-config>
Assigned permissions to my roles in Authorization editior on iterators etc.. But it did get any effect.
All roles have full access to iterators!
ADFContext.getCurrent().getSecurityContext().isAuthorizationEnabled() returns false

Hi,
here's the adf-config file from my woking app
<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/adf/config ../../../../../bc4jrt/src/oracle/adf/share/config/schema/config.xsd"
xmlns="http://xmlns.oracle.com/adf/config"
xmlns:sec="http://xmlns.oracle.com/adf/security/config">
<sec:adf-config-child xmlns="http://xmlns.oracle.com/adf/security/config">
<JaasSecurityContext initialContextFactoryClass="oracle.adf.share.security.JAASInitialContextFactory"
jaasProviderClass="oracle.adf.share.security.providers.jazn.JAZNSecurityContext"
authorizationEnforce="true"/>
</sec:adf-config-child>
</adf-config>
Note that I don't use debug but run it from JDeveloper and the security settings are enforced. Did you set up the web.xml file - in other words, are you able to authenticate?
Frank

Similar Messages

  • JDev11 R.1. ADF Security Authorization

    Hi,
    I would like to know if it might be possible to use authenticatication via RDBMS authentication provider of Weblogic App. Server and ADF Security Authorization together in a JDev 11 application?. I am reading documentation and it says that; 'ADF Security relies on the jazn-data.xml file for the policy store whether you are using the XML-based identity store or the LDAP identity store. One could define roles and its access rights in jazn-data.xml and might expect authentication and isUserInRole services coming from the authentication service without defining users (role members) at design time. Is it or will it be possible in future?
    Best Regards.

    Hi
    I think it is too early and I don't know if they will ever build this. ( because they also have to support other app servers). Is RDBMS authentication provider of Weblogic App. Server a JAAS implementation?
    in TP4 you had a db login module , don't know if this is supported in 11g production.
    jps-config.xml
    <serviceInstance provider="jaas.login.provider" name="testlogin">
    <description>Sample LoginModule</description>
    <property value="oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule" name="loginModuleClassName"/>
    <property value="REQUIRED" name="jaas.login.controlFlag"/>
    <property value="ovs_user" name="table"/>
    <property value="jdbc/OVSDS" name="data_source_name"/>
    <property value="role_name" name="groupMembershipGroupFieldName"/>
    <property value="password" name="passwordField"/>
    <property value="ovs_user_role_view" name="groupMembershipTableName"/>
    <property value="role_name" name="usernameField"/>
    <property value="role_name" name="pw_encoding_class"/>
    <property value="oracle.security.jazn.login.module.db.util.DBLoginModuleMD5Encoder" name="groupMembershipGroupFieldName"/>
    </serviceInstance>
    <serviceInstance provider="jaas.login.provider" name="oracledb.loginmodule">
    <property value="true" name="debug"/>
    <property value="true" name="addAllRoles"/>
    <property value="passwd" name="passwordField"/>
    <property value="role_name" name="groupMembershipGroupFieldName"/>
    <property value="jdbc/authschemaDS" name="data_source_name"/>
    <property value="REQUIRED" name="jaas.login.controlFlag"/>
    <property value="application_roles" name="groupMembershipTableName"/>
    <property value="oracle.security.jazn.login.module.db.DBTableOraDataSourceLoginModule" name="loginModuleClassName"/>
    <property value="FINEST" name="log.level"/>
    <property value="username" name="usernameField"/>
    <property value="application_users" name="table"/>
    <property value="username" name="user_pk_column"/>
    <property value="username" name="roles_fk_column"/>
    <property value="tolower" name="casing"/>
    <property value="oracle.security.jazn.login.module.db.util.DBLoginModuleClearTextEncoder" name="pw_encoding_class"/>
    </serviceInstance>
    thanks Edwin
    Edited by: biemond on Oct 19, 2008 10:50 AM

  • ADF Security Authorization question

    For whatever reason, it seems to be not working for me. Well, I will try to test it a non_SRDemo environment.
    By the way, what is the connects what is set in dialog permisssions and the updateable value? Isn't there something in the code that I can check?
    Thanks

    Hi,
    there is no connection in code. An attribute that has a read-only permission is set to updateable = false, which then is accessible via EL.
    Just go for the non SRDemo testcase. It will give either you a solution or me a workspace to reproduce the non-working case
    Frank

  • Implementing authorization using Oralce ADF security

    Hi,
    We have successfully deployed a Jdev (10.1.3) ADFBC application to IAS with the authentication and part of the authorization.
    Now we want to use another level of granularity to allow object instance access control based on Java Permissins using JAAS. Like "binding container", "iterator binding", "attribute binding" and "methodAction binding".
    We tried to follow the "Oracle Application Development Framework Developer's Guide", chapter 30. Everything went well until we got to 30.7.2--Setting authorization on ADF binding Containers, list 3. "The Authorization Editor shows the pre-defined permissions for the binding container, along with the principles (roles and users) as defined by your resource provider". The roles and users we defined in our web.xml or jaza-data.xml do not show up in the authorization editor.
    The SRDemoADFBC does not use this technique. Anybody has any idea how to do this?
    Remember Frank said he was working on an end-to-end ADF security application and it could be ready by the end of this year. Is it ready yet?
    Thank you,
    Annie

    Hi Vinod,
    In my post, I present it as a best practice to have a one to one mapping of application roles and enterprise roles though it is not required. If you have 10 application roles you should create 10 enterprise roles, but again this is not required. For testing, you could create only one enterprise role, then make that role as member to all your application roles.
    To simplify the case you can do the following STEPS:
    In jazn.xml:
    1) Let say in jazn.xml you have the following 5 application roles:
    <li>ApplicationRole1
    <li>ApplicationRole2
    <li>ApplicationRole3
    <li>ApplicationRole4
    <li>ApplicationRole5
    2) Still in jazn.xml, create one Enterprise Role "EnterpriseAdmin".
    3) Make the"EnterpriseAdmin" as member of the 5 application roles above.
    In weblogic console:
    4) Go to the User and Groups page of myrealm (Home >Summary of Security Realms >myrealm >Users and Groups).
    5) Create a new group named "EnterpriseAdmin" and instead of the Default Authenticator, set the authenticator to the name of SQLAuthenticator that you have created.
    6) Create a user in the SQLAuthenticator and make it a member of the "EnterpriseAdmin".
    7) Run your secured application in JDeveloper and login with the user credentials that you created in step#6.
    Regards,
    Pino

  • ADF security removes applied authorizations

    hi,
    I created a mockup page containing only panelPage inside a form. In page definition I edited authorization so that role roleA has all privileges on the page as well as roles roleB and roleC (both roleB and roleC are sub-roles of role roleA as defined in system-jazn-data.xml).
    After I finished configuring ADF security I saved all and compiled the project. Then I re-opened the page definition, clicked on Edit Authorization to check if authorizations are still there, but they were gone!?
    I tried several times but each time ADF security settings magically gets removed.
    I think the reason is that some of the roles are sub-roles of another role. Is there a workaround?

    it seems that if you try to configure ADF security for a role which has another role as a member ADF security goes into a state where the only way out is to completely delete original roles and then re-configure but this time with no roles as members of other roles. I wonder if this feature (roles as members of other roles) will be supported in ADF security and in which version of Jdev. I am using 10.1.3.2

  • GOTCHA's with Setting up ADF Security with JDev 11.1.1.6.0

    If you're getting into ADF security, you're probably going to want to get rid of that ugly default login.html page. I mean, it gets the job done, but we want something a little better. And if you want something a little better and you're using JDev 11.1.1.6.0, it behooves you to read this post!
    First off, get acquainted with these four posts. All good stuff. They'll walk you through the 1st half of what you need to know. Y'know, the non-Gotcha half.
    http://one-size-doesnt-fit-all.blogspot.com/2010/07/adf-security-revisited-again-again.html
    http://myadfnotebook.blogspot.com/2011/11/adf-security-basics.html
    http://andrejusb.blogspot.com/2010/11/things-you-must-know-about-adf-faces.html
    http://java2go.blogspot.com/2010/12/creating-centered-page-layout-using-adf.html
    Are you getting either of the following errors?
    <CodebasePolicyHandler> <migrateDeploymentPolicies> Migration of codebase policy failed. Reason: {0}.
    oracle.security.jps.JpsException: java.lang.IllegalArgumentException: oracle.security.jps.internal.core.principals.JpsAnonymousRoleImpl
    Error 500--Internal Server Error
    java.lang.RuntimeException: Cannot find FacesContextI'll show you where they're coming from. Follow along.
    1) Create a new application.
    2) Create three .jspx pages called login, error, and welcome.
    3) Generate PageDef files for them by right-clicking on the file and selecting "Go To PageDefinition". You'll want these so that you may apply security against them.
    4) Right-Click on your Application and select Secure->Configure ADF Security
    5) ADF Authentication and Authorization -> Form Based Authentication (Use the search symbol to select your created login and error pages. Should be something like "/faces/login.jspx") -> No Automatic Grants -> Finish
    Right-Click your welcome.jspx and select run. You'll get this error before your web page opens up in your browser and then proceeds to wig out.
    <CodebasePolicyHandler> <migrateDeploymentPolicies> Migration of codebase policy failed. Reason: {0}.
    oracle.security.jps.JpsException: java.lang.IllegalArgumentException: oracle.security.jps.internal.core.principals.JpsAnonymousRoleImplThat just won't do. Let's fix it, shall we?
    6) Open your newly JDev created jazn-data.xml file. It's located in the Application Resources panel (usually located by Data Controls and your Projects expandable panels)
    7) Resource Grants -> Resource Type (Web Page dropdown) -> error page should have a key symbol by it. Delete the anonymous role in the "Granted To" column. Now click the green button to add an Application Role. Huh, there's TWO of them? How bout that? Looks like we're going to have to delete some XML code!
    8) Click the Source tab on the bottom of the page to open up the XML View. You'll see the following piece of erroneous code. Erroneous, I say!
      <policy-store>
        <applications>
          <application>
            <name>SecurityError</name>
            <app-roles>
              // Hello, I'm the app role that has sucked away two hours of your life that you can never, ever get back
              <app-role>
                <name>anonymous-role</name>
                <class>oracle.security.jps.internal.core.principals.JpsAnonymousRoleImpl</class>
                <display-name>anonymous-role</display-name>
              </app-role>
             // Whew, the end of that app role
            </app-roles>
            <jazn-policy>
              <grant>9) You're going to want to delete that app role XML
    10) Go back into your jazn-data.xml file and create some users. For example, bob and jane. Create an Enterprise role called "admin". Put bob and jane as members into this Enterprise role. Create an Application role called managers. Map managers to your Enterprise role admin.
    11) Go back to the Resource Grants tab -> Resource Type (Web Page) and delete any "Granted To" authorizations that may assigned to any of the pages. Assigned a "Granted To" application role of "anonymous-role" to the error and login pages. Assign "managers" to welcome.
    12) Run your welcome page. Yay, the error is gone. How sweet it is.
    Now you want to refactor/move your login and error page somewhere else? Great, just right-click and select factor. Refactor to some place like /public_html/jspx/<your login page>.jspx. Re-run your welcome page.
    // You fool!
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not FoundThat's not so good. Let's fix that.
    1) Open up web.xml. It's located at ViewController/WEB-INF/web.xml.
    2) Click the security tab and you'll see Form-Based Authentication with a login page and error page. Click that Search glass and locate your new file. Do the same for the error page. You should see something like "/jspx/login.jspx" come back.
    3) Re-run your welcome page.
    // Suckered AGAIN!
    Error 500--Internal Server Error
    java.lang.RuntimeException: Cannot find FacesContextThis is a tricky one. The search icon brings back a faulty address. Since we're using a .jspx page, it needs to be "/faces/jspx/login.jspx". Repeat for the error page. Re-run your welcome.jspx.
    Ahh!! Now THAT's how we do it in Kingsport!
    Finally, a custom .jspx login works. Now what are you doing here? Shouldn't you be playing some Diablo 3?
    Will

    Ha :-)
    Point being good summaries like yours tend to get lost on the forums because of the volume of posts. With a blog people have the chance to subscribe to your posts so it's just a better vehicle all round for posting content to help others.
    I highly recommend writing blogs even if it's for scratch notes, because you'll learn a lot in structuring your thoughts. It's also a really good way to get noticed in the community because bloggers stand out.
    But your call, no pressure of course ;-)
    CM.

  • Creating a WebCenter Application with PageCutomizable and ADF Security

    I created a Webcenter App in Jdev 11.1.1.2.0 with webcenter extension.
    I have 2 JSPX files.
    One called mainTemplate.jspx
    - contains header, footer in ADF and a center facet.
    One called Welcome.jspx created from mainTemplate
    - contains page customizable > panel customizable > layout customizable > various custom panel configs.
    ADF security is configured with BASIC, authentication only. Because form authentication seems harder to get working.
    We have one weblogic user, and currently deploy to the integrated WLS, although we'll deploy out to a full server once security/composer is working.
    The problem is, when we run the Welcome.jspx, and because we added a reference to a logged in var, it requests http login fine.
    We then refresh the page and see that we are indeed logged in as 'weblogic'.
    Is weblogic a special user? should I create a new one? Is there any setup required on the Integrated WLS to get this working?
    However when we click on 'add Content' using the composer we get a permission error.
    +<RegistrationConfigurator><handleError> Server Exception during PPR, #1+
    javax.el.ELException: oracle.adf.view.page.editor.security.ComposerSecurityException: You do not have permission to edit the page
    +     at com.sun.el.parser.AstValue.invoke(AstValue.java:161)+
    +...+
    Caused by: oracle.adf.view.page.editor.security.ComposerSecurityException: You do not have permission to edit the page
    +     at oracle.adfinternal.view.page.editor.bean.DialogBean.setDialogHelp(DialogBean.java:129)+
    +     at oracle.adfinternal.view.page.editor.bean.DialogBean.showResourceCatalog(DialogBean.java:356)+
    +     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)+
    +...+
    I tried using the Customization allowed var in the property inspector, but could not map 'allowed by' to a user or role that my setup would recognise. The doco specifies 'admin' which does not work for me.
    In my catalog I have a WCM portlet taskflow, which will require its own permissions.
    I tried enabling permissions for the test-all role to all of my pages/taskflows, leaving just the 'view' permission to the anonymous role.
    I also tried authentication/authorization profiles, and building my own jspx login/error pages, but no luck there either, the login button doesn't seem to tirgger my java doLogin class, even though I set the binding on the button using the method expression builder to the bean method.
    *note: I didn't try the welcome/login/error page auto create as they generate html files, I created JSFs with full UI in there. Am I required to use those html types instead of jspx? I found that the redirection worked by appending the jspx reference with '/faces/Login.jspx'. The problem seemed to have been somewhere else.
    If we have any Webcenter Composer / Security gurus out there, help would be greatly appreciated.
    Our main goal is to create a Webcenter App which has security/composer/navigation and a catalog with WCM/Siebel portlets similar to the Avitek demo without using WC Spaces.
    Thanks.
    Thanks.
    Edited by: Guillaume_Davies_SC on Apr 20, 2010 7:28 PM

    When you want to achieve this you need to configure ADF security with basic authentication & authorization. THe authorization is the part that takes care of what a user may and may not do in an application. Authentication is just the log in part.
    When you have configured your application for authorization as well, you have to create roles and groups.
    You will also have to set the authorization of your pages. Open a jsxp and in the design or source view, right click and "edit authorization". You then have to add roles to your pages and define their rights. Then you can set the authorization for edit,cuustomize,personlise,view,...
    Hope this helps.

  • How to integrate a SSO based in cookie with ADF Security

    At work they asked me to integrate a existing SSO based in cookie with the new ADF + Jdeveloper 11g + WLS. After google for days and read a lot of blogs and official documentation I've made a custom LoginModule. I made it very simple, it's just an "if" inside the login() function with the username, if the username is "john" I put to the Subject some Principals. My steps are:
    1- Create a new app based on "Fusion application" template.
    2- Make a new ADF Taskflow with only one view inside (the entry point of the taskflow). The jspx only contains a welcome message.
    3- Run the ADF Security wizard, all the steps with the default option, I don't change anything.
    4- Put some users and some roles in jazn-data.xml, and maping them to an application role. Then I grant permissions to the application role to view the previous task flow.
    At this point everything is ok. I run the taskflow and a basic login popup prompts me to write my username and password. Now I try to remove everything useless for me, like idstore, credentials, anonymous, etc. I only want a LoginModule that get the HttpRequest and passes it to an already done class that returns a true/false depending if the cookie is correct or not but, as I said before, my LoginModule is so simple now and even didn't try to do something more complicated than an if. The steps I try are:
    in jps-config.xml
    5- Remove idstore.xml and credentials.
    6- (loginmodule tab) Make a new login module, and put here my class. The class is in the ViewController project and JDeveloper find it navigating through the heriarchy, so I have visibility. I put REQUIRE flag, add all roles and debug mode.
    7- In the security context unmark the idstore.loginmodule and mark myLoginModule. Also delete the anonymous security context.
    All that I got until now is a 500 error (Internal server error - Authorization Exception). Sometimes (the close i've ever been to do something correct) the browser ask me for user/password but then only recognizes the users that already are in WLS (idstore from previous tests), but NOT the "john" user that is inside my custom LoginModule. Even more, if I run the WLS from JDeveloper 11g in debug mode, the runtime never stops at breakpoints inside my custom login module. It seems that my LoginModule isn't deployed or I made some error maping the roles.
    So, my questions are:
    - I'm in the good way? If I want an authentication based in cookie/httprequest I have to do a custom LoginModule? My goal is to do a re-usable code, and re-use the code that my co-workers have done. They have a class that with only the HttpRequest determines if a user is logged or not.
    - If I'm in the good way... how can I put my custom LoginModule in the WLS? I tried to search something in the Administration Panel (localhost:7101/console) but I did'nt find nothing.
    - In case I'd got the custom LoginModule working fine in WLS... how can I get a HttpRequest from a LoginModule and avoid the username/password dialog? I've to make a filter and pass it to the my LoginModule? If it's correct... how?
    I don't post my code because is so simple, it's based on DBTableLoginModule but without all the database access code.
    Thanks to all!
    P.D.: If this message isn't in the correct forum, I'm sorry. Feel free to move it.
    P.D.2: Sorry about my english, I'm spanish. I know i've to practise a lot :)

    Hi Frank,
    Thanks a lot for your answer. Just one more easy question: what I need to do is a custom Authentication Module (which will read the cookie)? If only you can point me to the correct chapter of the WLS documentation I'll be very pleased.
    In future releases of JDeveloper will be easier to do this kind of things related to security?
    Riveck

  • Problem with ADF security and task flow calls

    Hi.
    I am using JDeveloper 11.1.2.0.0.
    I encountered a problem when tried to apply ADF security to my application.
    The way to reproduce the problem:
    1. Create new Fusion Web Application;
    2. Import Business Components from Tables from any existing schema and add at least one table to the ApplicationModule.
    3. Create "welcome page" (for instance, welcome.jsf). Add a button with fixed action outcome "test".
    4. Create test page, for instance, test.jsf. Drag and drop any view object from Data Controls onto the page and create a form with navigation controls. Add a button with fixed action outcome "return".
    5. Create bounded task flow, name it "test", drag and drop our test page on it - the page will be the default activity. Add a task flow return activity. Add a control flow case from the default view activity to the return activity, set From Outcome property to "return". So our return button should cause the task flow to exit.
    6. Open adfc-config.xml in diagram mode and place our welcome page on it. Then drag and drop the test task flow to create a task flow call activity. Add a control flow case from welcome page to task flow call activity, set the From Outcome property to "test". So our test button should call the test task flow.
    7. Configure application to run the unbounded task flow starting with Welcome view activity.
    At this point all works as expected: when application runs, the welcome page is displayed with test button. Pressing the test button results in displaying the test page, return button leads back to the welcome page.
    Now let's configure ADF Security.
    Run the ADF Security configuration wizard, choose ADF Authentication and Authorization.
    On the second page select Form-Based Authentication, check the Generate Default Pages flag.
    On the third page choose No Automatic Grants.
    On the next page keep the Redirect Upon Successful Authentication unchecked. Press Finish.
    Open jazn-data.xml to configure roles, users and resource grants:
    1. Create application role test-role.
    2. Grant the test-role privileges to view the test task flow.
    3. Create user and grant him the test-role.
    Now we have the public available welcome page and the test page with restricted access.
    When application runs, the welcome page is displayed as expected. Pressing the test button redirect us to auto-generated login page. After successful authorization the test page is displayed. But nothing happens if we click now the return button for the first time. When we click the return button once more, the application crushes with Error-500 and message "Target Unreachable, identifier 'bindings' resolved to null". The exact error trace depends on UI control bindings, but looks like this:
    javax.el.PropertyNotFoundException: //C:/Users/DUDKIN/AppData/Roaming/JDeveloper/system11.1.2.0.38.60.17/o.j2ee/drs/Test1/ViewControllerWebApp.war/test.jsf @10,120 value="#{bindings.Id.inputValue}": Target Unreachable, identifier 'bindings' resolved to null
         at com.sun.faces.facelets.el.TagValueExpression.isReadOnly(TagValueExpression.java:122)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer._getUncachedReadOnly(EditableValueRenderer.java:476)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:390)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.wasSubmitted(EditableValueRenderer.java:345)
         at oracle.adfinternal.view.faces.renderkit.rich.EditableValueRenderer.decodeInternal(EditableValueRenderer.java:116)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.decodeInternal(LabeledInputRenderer.java:56)
         at oracle.adf.view.rich.render.RichRenderer.decode(RichRenderer.java:342)
         at org.apache.myfaces.trinidad.render.CoreRenderer.decode(CoreRenderer.java:274)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.__rendererDecode(UIXComponentBase.java:1324)
    (the rest of lines skipped).
    Any suggestions?
    Edited by: user13307311 on Apr 16, 2013 11:39 PM

    @Lovin_JV_941794
    The welcome page is public available since it does not have appropriate PageDef file.
    Login page comes not from the welcome page, it comes after attempt to access the test page. So after the login succeeded the test page appears, because redirect to welcome page after successful login is not configured. I do not need to return the welcome page at this moment, I need to go to the test page.
    It seems the task flow call stack to be destroyed after redirect to login page.
    Edited by: user13307311 on Apr 17, 2013 12:45 AM

  • ADF Security in JDeveloper 10.1.3.2

    Hi,
    i used this link http://www.oracle.com/technology/products/jdev/howtos/1013/adfsecurity/adfsecurity_10132.html
    to apply security to my AD application using the JAN but i faced a problem which is ,if i logged in using the user i create on the OTC i always get this error HTTP Error 403 - Forbidden "You are not authorized to view this page", Although i didn't apply the authorization on my pages yet.
    can anyone help?
    Thanx

    Hi,
    using ADF Security, security is enabled as soon as you switch on ADF Security. Its a pessimistic thinking that is that you don't have access unless explicitly granted access
    Frank

  • ADF Security Wizzard

    All,
    the ADF Security Wizzard adds the following line to my jsp-config.xml which results in an exception as soon as a BC4J-connection is opened:
    jsp-config.xml:
    <property value="doasprivileged" name="oracle.security.jps.jaas.mode"/>
    exception:
    oracle.adf.share.security.ADFSecurityRuntimeException: Unable to fetch JpsUser principal from the current subject Betreff:
         Principal: DBUserPrincipal: test
         Principal: [JpsAuthenticatedRoleImpl: authenticated-role]
         at oracle.adf.share.security.providers.jps.CSFCredentialStore.extractJpsUser(CSFCredentialStore.java:824)
         at oracle.adf.share.security.providers.jps.CSFCredentialStore.getUserPrincipal(CSFCredentialStore.java:804)
         at oracle.adf.share.security.providers.jps.CSFCredentialStore.fetchCredential(CSFCredentialStore.java:320)
         at oracle.adf.share.security.credentialstore.CredentialStore.fetchCredential(CredentialStore.java:108)
         at oracle.adf.share.jndi.CredentialStoreHelper.fetchCredential(CredentialStoreHelper.java:93)
         at oracle.adf.share.jndi.ReferenceStoreHelper.loadCredentials(ReferenceStoreHelper.java:812)
         at oracle.adf.share.jndi.ReferenceStoreHelper.createReference(ReferenceStoreHelper.java:579)
         at oracle.adf.share.jndi.ReferenceStoreHelper.getReferencesMapEx(ReferenceStoreHelper.java:329)
         at oracle.adf.share.jndi.ContextImpl.load(ContextImpl.java:661)
         at oracle.adf.share.jndi.ContextImpl.init(ContextImpl.java:335)
         at oracle.adf.share.jndi.ContextImpl.<init>(ContextImpl.java:81)
         at oracle.adf.share.jndi.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:15)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
         at javax.naming.InitialContext.init(InitialContext.java:223)
    [2008-06-04T18:52:34.941+02:00] [adf] [WARNING] [] [share.jndi.ReferenceStoreHelper] [tid: 12] [ecid: 0000HdKVbj000000000000000002g6lsq000000003,0] [APP: current-workspace-app] Incomplete connection information
    [2008-06-04T18:52:53.984+02:00] [adf] [WARNING] [] [controller.faces.lifecycle.FacesPageLifecycle] [tid: 12] [ecid: 0000HdKVbj000000000000000002g6lsq000000003,0] [APP: current-workspace-app] ADFc: Error while opening JDBC connection.[[
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:253)
         at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:168)
         at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:545)
         at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:327)
         at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:104)
         at oracle.jbo.server.ConnectionPool.getConnection(ConnectionPool.java:70)
         at oracle.jbo.server.ConnectionPoolManagerImpl.getConnection(ConnectionPoolManagerImpl.java:56)
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:997)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1253)
         at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6397)
    Wizzard Settings:
    enforce authorization
    redirect upon successful authentification
    no identity store
    enable credential store
    no policy store
    no anonymous provider
    custom login module with some settings
    form-based Authentification
    Cheers
    Andy

    hi,
    if you delete this line
    <property value="doasprivileged" name="oracle.security.jps.jaas.mode"/>
    in the jsp-config.xml you can at least use your application with authentication but authorization doesn't work b/c the subject does not contain the principals:
    ADFContext.getCurrent().getSecurityContext().getUserRoles();
    returns an empty String[].
    Is there a workaround?
    Cheers Andy

  • Error While Login ADF Security Sample Application

    Hi All,
    Jdevloper Version : 11.1.1.5.0
    we are Creating ADF Login Application contains login.jspx and main.jspx pages.
    we define ADF Security on this Sample Application.
    when we provide valid credentials to login(username and password) it shows Error:
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead.
    The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism,
    that an old resource is permanently unavailable and has no forwarding address. 
    ManagedBean(BackingbeanScope) doLogin():
             public String doLogin() {
            String un = _userName;
            byte[] pw = _password.getBytes();
            FacesContext ctx = FacesContext.getCurrentInstance();
            HttpServletRequest request =(HttpServletRequest)ctx.getExternalContext().getRequest();
            try {
                Subject subject =Authentication.login(new URLCallbackHandler(un, pw));
                weblogic.servlet.security.ServletAuthentication.runAs(subject,request);
                String loginUrl = "/adfAuthentication?success_url=/faces/main.jspx";
                HttpServletResponse response =(HttpServletResponse)ctx.getExternalContext().getResponse();
                RequestDispatcher dispatcher =request.getRequestDispatcher(loginUrl);
         ctx.responseComplete();
        catch (FailedLoginException fle)
                    FacesMessage msg =new FacesMessage(FacesMessage.SEVERITY_ERROR, "Incorrect Username or Password", "An incorrect Username or Password was specified");
                    ctx.addMessage(null, msg);
            return null;
    In ADF Security We Define :
    User : admin1
    Enterprise Role  : ManagerGroup(added user admin1 to this EnterpriseRole)
    Application Role : Manager
    Resource Grants  : Resource Type : Web Page
                               login page
                              main  page -  Granted Role(Manager)
    jazn-data.xml file
    <?xml version = '1.0' encoding = 'UTF-8' standalone = 'yes'?>
    <jazn-data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/jazn-data-11_0.xsd">
      <jazn-realm default="jazn.com">
        <realm>
          <name>jazn.com</name>
          <users>
            <user>
              <name>admmin1</name>
              <display-name>admmin1</display-name>
              <credentials>{903}y2I4TDwMavn90VxJJfPfgxtBsRnF0qiaMoxzP93XF74=</credentials>
            </user>
          </users>
          <roles>
            <role>
              <name>ManagerGroup</name>
              <display-name>ManagerGroup</display-name>
              <members>
                <member>
                  <type>user</type>
                  <name>admmin1</name>
                </member>
              </members>
            </role>
          </roles>
        </realm>
      </jazn-realm>
      <policy-store>
        <applications>
          <application>
            <name>ADFLogin</name>
            <app-roles>
              <app-role>
                <name>Manager</name>
                <class>oracle.security.jps.service.policystore.ApplicationRole</class>
                <display-name>Manager</display-name>
                <members>
                  <member>
                    <name>ManagerGroup</name>
                    <class>oracle.security.jps.internal.core.principals.JpsXmlEnterpriseRoleImpl</class>
                  </member>
                </members>
              </app-role>
            </app-roles>
            <jazn-policy>
              <grant>
                <grantee>
                  <principals>
                    <principal>
                      <name>Manager</name>
                      <class>oracle.security.jps.service.policystore.ApplicationRole</class>
                    </principal>
                  </principals>
                </grantee>
                <permissions>
                  <permission>
                    <class>oracle.adf.share.security.authorization.RegionPermission</class>
                    <name>multiofonds.adf.common.view.pageDefs.mainPageDef</name>
                    <actions>view</actions>
                  </permission>
                </permissions>
              </grant>
            </jazn-policy>
          </application>
        </applications>
      </policy-store>
    </jazn-data>
    Please help us how to resolve it.
    Thanks,
    kumar

    A best practice in this situation is to check on a running sample e.g. Oracle ADF: Security for Everyone
    I guess your resource grants are not set correctly.
    Timo

  • ADF Security, Task Flow as a region in a page resource grant

    JDeveloper 12c (12.1.2); Application uses ADF form based security, external LDAP provider (Active Directory)
    After sign-in page (upon successful authentication/authorization) user is forwarded to a page that executes VO method prior to render. I am new to task flow concept and am told to achieve this like:
    - create bounded task flow, with method call activity (execute exposed AM method that calls VO method, runs custom SQL) and view activity as page fragment.
    - then drop the above task flow into a page as a region
    In ADF security setup, I gave resource grant task-flow to certain application role. Started the application, login and got 403 error. Then went back and gave resource grant 'view' to the actual page that contains task flow. It worked fine.
    So the question is, when protecting application (implemented with task flows) with ADF security, I thought it is enough to grant those task flows to whatever application roles (groups) and inherently any page that uses that task flow(s) (as a region) will be protected?
    From this test, it seems that I have to assign each page (that has task flow as a region) to application roles individually?

    Hi,
    any page that is contained in a bounded task flow is protected  by the task flow permission grant, this is correct. If this is not what you see, please file a bug with support or send me a simple reproducible test case please. My mail address (replace all < name > with the described symbol.
    frank <dot> nimphius <at> oracle <dot> com
    The test case will need to be in a ZIP file nemaed to "unzip" and should be able for me to run stand alone (please no database scripts to run prior to try the test case)
    Frank

  • ADF Security not working 401 error

    I am having problems with securing my ADF using LDAP after the server I was using was rebuilt and all software re-installed.....
    This did work before the rebuild so I am guessing that there are some settings that were no configured after the rebuild.
    We are using weblogic and Jdeveloper 11.1.1.6 and When I use the Wizard to secure my app and if I pick "ADF Authentication" I get the login in page and I can log into the application and things work.
    I then try to go in and use the "ADF Authentication and Authorization" option and deploy and I get a 401 - Unauthorized error..
    It used to work so I am pretty sure I am setting the Enterprise roles / Application Roles etc... correctly but wondered if anyone might be able to point me to what settings might be the issue etc.
    Thank you in advance for any assistance.

    After turning off ADF security in application - it works.
    When ADF security is turned on - it doesn't.
    When opening the same application with ADF security on in previous version of JDev - it works again.
    Our application uses custom login bean, but it is not even reaching login bean after login form submit (sample is made as http://www.youtube.com/watch?v=mAWBezngA1s)

  • Providing ADF security  to fusion WebAppliaction (ADF 11g)

    I created ADF application contains single page .
    i am able to deploy this on standalone WLS10.3
    But i need to provide the security to my application.
    I am reading the chapter :
    Enabling ADF Security in a Fusion Web Application in develpers guide.
    is there any other sources like demos / blogs/step by step tutorials about security which is helpful for begginers.if you have , pls provide me.
    Sailaja

    Here are some links:
    - [Adding Security(Oracle Doc)|http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/adding_security.htm#BGBCEDDD]
    - [ADF Security Part 1: Container Managed Security (By Frank Nimphius)|http://www.oracle.com/technology/products/jdev/tips/fnimphius/adfsec_camt1/adfsec1.htm]
    - [ADF Security Part 2: Setup and Authentication (By Frank Nimphius)|http://www.oracle.com/technology/products/jdev/tips/fnimphius/adfsec_camt2/ADF%20Security%20Authentication%20and%20Setup.htm]
    - [ADF Security Part 3: Authorization (By Frank Nimphius)|http://www.oracle.com/technology/products/jdev/tips/fnimphius/adfsec_camt3/ADF%20Security%20-%20Authorization.htm]
    - [ADF Security Part 5: ADF BC Entity Security (By Frank Nimphius)|http://www.oracle.com/technology/products/jdev/tips/fnimphius/adfsec_camt5/ADF%20Entity%20Object%20Security%20through%20ADF%20Security.htm]
    Sireesha

Maybe you are looking for

  • How to change Payload

    Dear expertise, Can we change the inbound payload message in XI. Suppose I have the following inbound payload message which I got from a File(through Sender File Adapter).   <?xml version="1.0" encoding="UTF-8" ?> - <ns0:MT_Request xmlns:ns0="http://

  • Fonts are to small in my Photoshop Elements 10 software.

    When I try to put names or dates on a photograph the fonts are to small.  Even if I increase it to 72 the fonts are so small on the picture the words are not big enough to read.   How do I fix this?

  • Output format problem.

    Hey guys! You've always helped me out and I hope you can help me out with this problem I have. I was asked to give two videos a specific output, one of them I developed in After Effects, the other is a Quicktime (.MOV) video. I'm actively trying but

  • 6520 Horizontal white stripes in yellow test bar

    My 6520 all in one printer doesn't print yellow like it should. I ran the utilities and replaced the cartridge with another new HP cartridge and it still has horizontal stripes in the yellow test bar.

  • Latest iPod Shuffle download has error

    When I try to install (and now download and run the latest software for the Shuffle, I get an error message that there was an "Error Reading Setup Initialization File". How do I get the software to download so I can update my kid's iPod w/the latest