ADF Security using sqlauthenticator issue unable to login

Hi,
AM using jdev 11.1.2.3
I followed these blogs to configure adf security using sql authenticator
http://biemond.blogspot.in/2008/12/using-database-tables-as-authentication.html
http://hazem-adf-tips.blogspot.in/2012/06/adf-security-database-authentication.html
am unable to login.. I can able to see the users and roles in WL admin console. When i am giving the user credentials it is redirecting to error page saying unauthorized .
plz can anybody help me out from this issue.
Thanks,
Nitesh

HI Timo,
I have created application roles admin and user. Unable to create enterprise role with same name. When i am trying to map application role with enterprise role it is not displaying in mapping window..
The following log message
Removing existing role admin
creating new role admin.
with this it is recreating the new role and role id gets change when ever i m restarting my server and deploying the application..
Thanks,
Nitesh

Similar Messages

  • How to crate new user in adf security using jspx page

    how to crate new user in adf security using code in java file.plz help me this work will submited to day plz help me...

    sigh
    Search really would help and point you in the right direction. You'd find [url http://forums.oracle.com/forums/thread.jspa?messageID=4584464]this, for example.

  • Session expired (timeout) without ADF Security using.

    Hello!
    I have a problem with my application in which i use own security realization without ADF Security using. I realized custom implementation of javax.servlet.http.HttpSessionListener interface, in which i log session creation and expiration events. On WebLogic I realized customDBMS authentification class. Session timeout defined in web.xml (<session-timeout>5</session-timeout>), in weblogic.xml session timeout not define.
    Problem description: when session expired (popup warning displayed before this) and press OK button in popup with session expired warning, I see what no any log about session destroying from my HttpSessionListener implementation, so I cant understand, what session expired and process this event in my servlet filter. So I stay at same page (but without data in tables, coz binding variables in VO queries is not defined). If I am not click OK in the popup and wait about minute, then appear a log message about the destroying the session from my HttpSessionListener implementation. Why is the delay between the appearance of warning session expired and the actual destroying of the session in WebLogic?
    I use JDeveloper 11.1.1.6.0, application deployed in integrated WebLogic 10.3.5.0

    Hi,
    Why is the delay between the appearance of warning session expired and the actual destroying of the session in WebLogic?Because warning is given about 2-3 min before session expire
    That is why
    If I am not click OK in the popup and wait about minute, then appear a log message about the destroying the session from my HttpSessionListener implementation.

  • I accessed the page protected by ADF security using direct url access attac

    hi,
    I played with my application which is based on SRDemo code (with added ADF security handling protection of resources) using direct url access scenarios. I was able to access a protected page as authenticated but not authorized user. I'll try to explain what I did.
    There are two folders/web resources in my application, faces/folderA/* and faces/folderB/*.
    roleA only is configured to access first web resource and the roleB is configured to access the second resource.
    I used ADF security to authorize only roleA for page in folderA and to authorize only roleB for page in folderB.
    I configured error pages in web.xml:
    <error-page>
    <error-code>400</error-code>
    <location>faces/error/error400.jspx</location>
    </error-page>
    <error-page>
    <error-code>401</error-code>
    <location>faces/error/error401.jspx</location>
    </error-page>
    <error-page>
    <error-code>403</error-code>
    <location>faces/error/error403.jspx</location>
    </error-page>
    <error-page>
    <error-code>404</error-code>
    <location>faces/error/error404.jspx</location>
    </error-page>
    <error-page>
    <exception-type>java.lang.Throwable</exception-type>
    <location>faces/error/error500.jspx</location>
    </error-page>
    Other config params are:
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>infrastructure/ABLogin.jspx</form-login-page>
    <form-error-page>faces/error/error401.jspx</form-error-page>
    </form-login-config>
    </login-config>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>AB Prototype</web-resource-name>
    <url-pattern>faces/ABAbout.jspx</url-pattern>
    <url-pattern>faces/ABHelp.jspx</url-pattern>
    <url-pattern>faces/ABLogout.jspx</url-pattern>
    <url-pattern>faces/ABWelcome.jspx</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>A</role-name>
    <role-name>B</role-name>
    </auth-constraint>
    </security-constraint>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>AZone</web-resource-name>
    <url-pattern>faces/folderA/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>A</role-name>
    </auth-constraint>
    </security-constraint>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>BZone</web-resource-name>
    <url-pattern>faces/folderB/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>B</role-name>
    </auth-constraint>
    </security-constraint>
    <filter>
    <filter-name>adfBindings</filter-name>
    <filter-class>oracle.adf.model.servlet.ADFBindingFilter</filter-class>
    <init-param>
    <param-name>unauthorizedErrorPage</param-name>
    <param-value>faces/error/error401.jspx</param-value>
    </init-param>
    </filter>
    <filter>
    <filter-name>adfFaces</filter-name>
    <filter-class>oracle.adf.view.faces.webapp.AdfFacesFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jsp</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfBindings</filter-name>
    <url-pattern>*.jspx</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jsp</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>adfFaces</filter-name>
    <url-pattern>*.jspx</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>resources</servlet-name>
    <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>adfAuthentication</servlet-name>
    <servlet-class>oracle.adf.share.security.authentication.AuthenticationServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    Once I authenticated as user in roleA I was trying to directly access URLs accessible only by users in roleB. In the beginning everything worked OK: I was dispatched to error401.jspx page with message Not authorized... etc.
    But I kept trying to access different URLs, like http://localhost:8988/AB/faces, http://localhost:8988/AB/faces/folderB, http://localhost:8988/AB/faces/folderB/pageB.jspx, http://localhost:8988/AB
    (not necessarily in that order, I played for a couple of minutes and the system would always dispatch to error401.jspx page if unauthorized attempt. But all of sudden, to my surprise, I got the pageB.jspx page while logged in as user belonging to roleA!)
    Not sure how that happened but the connectedUser on pageB (#{userInfo.authenticated}) shows that I am logged in as user whose role is A.
    I checked Authorization in ADF security and it is still correct: pageB is only accessible to roleB and pageA is only accessible to roleA.
    I hope I made some stupid mistake in my configuration?

    Hi,
    ADF Security is JAAS permission based and not container managed. Note that unless you explicitly configured ADF Security you don't use ADF Security but container managed security, which is all that I can see in your configurations.
    Not sure which version fo JDeveloper you use, but if you could change the following setting
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>AZone</web-resource-name>
    <url-pattern>faces/folderA/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>A</role-name>
    </auth-constraint>
    </security-constraint>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>BZone</web-resource-name>
    <url-pattern>faces/folderB/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>B</role-name>
    </auth-constraint>
    </security-constraint>
    to contain jspx file references instead of wildcards like in faces/folderB/* then what you see should no longer be possible. There was a known issue with the security settings in SRDemo that was caused by a defect in OC4J container managed security. I would expect this issue to be fixed in a more recent version of OC4J.
    However, the work around until then is to protect all JSPX files in a directory instead of using wild card matches
    Frank

  • DS 5.2.4 Upgrade Issue - Unable to login to console

    Hello! I have not been able to login to DS console after I have patched it to 5.2.4. I have found another thread with the same issue with solution https://forums.oracle.com/forums/thread.jspa?messageID=8517561 (add ldap library into runtime linking environment using crle) provided but I'm still unable to login to console after I applied the solution. Please kindly advise! Thank you.
    [10/Apr/2012:18:59:52] info (21546): SunONE-WebServer-Enterprise/6.0SP3 B05/19/2004 02:48
    [10/Apr/2012:18:59:52] info (21546): Access Host filter is: *.abc
    [10/Apr/2012:18:59:52] info (21546): Access Address filter is: *
    [10/Apr/2012:18:59:52] info (21547): Installing a new configuration
    [10/Apr/2012:18:59:52] info (21547): [LS ls1] http://abc.com, port 390 ready to accept requests
    [10/Apr/2012:18:59:52] info (21547): A new configuration was successfully installed
    [10/Apr/2012:18:59:52] info (21547): Using the Java HotSpot(TM) Server VM v1.4.2_03 from Sun Microsystems Inc.
    [10/Apr/2012:18:59:52] info (21547): Java VM classpath: /var/Sun/mps/bin/https/jar/NSServletLayer.jar:/var/Sun/mps/bin/https/jar/NSJavaUtil.jar:/var/Sun/mps/
    bin/https/jar/NSJavaMiscUtil.jar:/var/Sun/mps/bin/https/jar/servlet.jar:/var/Sun/mps/bin/https/jar/servlet-2.3-filters-api.jar:/var/Sun/mps/bin/https/jar/jsp
    engine.jar:/var/Sun/mps/java/ldapjdk.jar:/var/Sun/mps/java/jss311.jar:
    [10/Apr/2012:18:59:52] info (21547): Loading IWSSessionManager by default.
    [10/Apr/2012:18:59:52] info (21547): IWSSessionManager: Maximum number of sessions is 1000
    [10/Apr/2012:19:00:05] failure (21547): for host ::ffff:x.x.x.xtrying to GET /admin-serv/authenticate, cgi-parse-output reports: the CGI program /var/S
    un/mps/bin/admin/admin/bin/userauth did not produce a valid header (program terminated without a valid CGI header. Check for core dump or other abnormal term
    ination)
    [10/Apr/2012:19:04:38] failure (21547): for host ::ffff:x.x.x.xtrying to GET /admin-serv/authenticate, cgi-parse-output reports: the CGI program /var/S
    un/mps/bin/admin/admin/bin/userauth did not produce a valid header (program terminated without a valid CGI header. Check for core dump or other abnormal term
    ination)
    Edited by: Albert.C on Apr 11, 2012 10:37 AM
    Edited by: Albert.C on Apr 11, 2012 10:39 AM

    Hi anyone can advise me on this?

  • ADF Security Log Out issue

    Hi,
    We have implemented ADF security and using form based authentication. The problem we are facing is during logout, in IE we see a NullPointerException, before the login page is displayed. Please note that this functionality works fine in Firefox and Chrome. Also this happens only in standalone weblogic server. It works perfectly fine in a cluster. The logout link is command link which goes to logout.jspx. The implementation in logout.jspx is as follows
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <jsp:forward page="/adfAuthentication">
    <jsp:param name="logout" value="true"/>
    <jsp:param name="end_url" value="#{initParam.loginURL}"/>
    </jsp:forward>
    </jsp:root>
    the loginURL is configured in web.xml as */faces/login.jspx.*
    The exception stack trace is .
    <Dec 10, 2012 7:44:44 AM UTC> <Notice> <WebLogicServer> <BEA-000360> <Server
    started in RUNNING mode>
    <Dec 10, 2012 7:45:51 AM UTC> <Warning> <oracle.adf.share.ADFContext>
    <BEA-000000> <Automatically initializing a DefaultContext for getCurrent.
    Caller should ensure that a DefaultContext is proper for this use.
    Memory leaks and/or unexpected behaviour may occur if the automatic
    initialization is performed improperly.
    This message may be avoided by performing initADFContext before using
    getCurrent().
    For more information please enable logging for oracle.adf.share.ADFContext at
    FINEST level.>
    <Dec 10, 2012 7:45:51 AM UTC> <Error>
    <oracle.adf.controller.internal.binding.TaskFlowRegionModel> <BEA-000000>
    <1i9kmqwku_121>
    <Dec 10, 2012 7:45:51 AM UTC> <Warning>
    <oracle.adf.view.rich.component.fragment.UIXRegion> <ADF_FACES-00009> <Error
    processing viewId: /InventoryUIShell URI:
    /oracle/communications/inventory/ui/framework/templates/InventoryUIShell.jspx
    actual-URI: /oracle/communications/platform/cui/fragments/mainArea.jsff.
    oracle.adf.controller.internal.InvalidViewPortIdException: ADFC-14000: View
    port ID '1i9kmqwku_33' is invalid.
    at
    oracle.adfinternal.controller.state.ControllerState.setCurrentViewPort(Control
    lerState.java:1319)
    at
    oracle.adfinternal.controller.ControllerContextImpl.setCurrentViewPort(Control
    lerContextImpl.java:135)
    at
    oracle.adfinternal.controller.ControllerContextImpl.setCurrentViewPort(Control
    lerContextImpl.java:52)
    at
    oracle.adf.controller.internal.binding.TaskFlowRegionModel.doProcessEndRegion(
    TaskFlowRegionModel.java:320)
    at
    oracle.adf.controller.internal.binding.TaskFlowRegionModel.processEndRegion(Ta
    skFlowRegionModel.java:237)
    at
    oracle.adf.view.rich.component.fragment.UIXRegion$RegionContextChange.undoChan
    geImpl(UIXRegion.java:1209)
    at
    oracle.adf.view.rich.context.DoableContextChange.suspend(DoableContextChange.j
    ava:49)
    at
    oracle.adf.view.rich.context.DoableContextChange.undoChange(DoableContextChang
    e.java:103)
    at
    oracle.adf.view.rich.component.fragment.UIXRegion._endInterruptibleRegion(UIXR
    egion.java:726)
    at
    oracle.adf.view.rich.component.fragment.UIXRegion.decodeChildrenImpl(UIXRegion
    .java:576)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXCompo
    nentBase.java:972)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXCompo
    nentBase.java:797)
    at
    org.apache.myfaces.trinidad.component.UIXSwitcher.processDecodes(UIXSwitcher.j
    ava:88)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXC
    omponentBase.java:986)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXCompo
    nentBase.java:972)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXCompo
    nentBase.java:797)
    at
    org.apache.myfaces.trinidad.component.UIXSwitcher.processDecodes(UIXSwitcher.j
    ava:88)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXC
    omponentBase.java:986)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXCompo
    nentBase.java:972)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXCompo
    nentBase.java:797)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXC
    omponentBase.java:986)
    at
    oracle.adf.view.rich.component.fragment.UIXRegion.decodeChildrenImpl(UIXRegion
    .java:565)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXCompo
    nentBase.java:972)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXCompo
    nentBase.java:797)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXC
    omponentBase.java:986)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXCompo
    nentBase.java:972)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXCompo
    nentBase.java:797)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXC
    omponentBase.java:986)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXCompo
    nentBase.java:972)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.processDecodes(UIXCompo
    nentBase.java:797)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildrenImpl(UIXC
    omponentBase.java:986)
    at
    org.apache.myfaces.trinidad.component.UIXComponentBase.decodeChildren(UIXCompo
    nentBase.java:972)
    Any pointers to resolve this would be helpful.
    Thanks,

    Hi,
    Check these
    http://tompeez.wordpress.com/2010/07/26/logout-with-confirmation-dialog/
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/jan2011-otn-harvest-300940.pdf

  • Users using Windows Authentication unable to login after upgrade to SQL Server 2012 SP2 CU1

    We upgraded from SQL Server 2008 R2 to SQL Server 2012 SP2 CU1.  Upgrade was successful.  Users that have SQL Server Management Studio 2012 can successfully log in via Windows Authentication, but users with an older version of SQL Server Management
    Studio are unable to log in via Windows Authentication. 
    The error they receive is listed below:
    Connect not connect to XXXXXXX
    Login Failed.  The login is from an untrusted domain and cannot be used with Windows Authentication. 
    (Microsoft SQL Server, Error: 18452)
    If we switch to Mixed authentication, users can log in via SQL Server Authentication.
    Our security policy prohibits SQL Authentication. 
    Outside of having the staff upgrade to SQL Server 2012 SQL Server Management Studio, is there any setting I can set/unset to allow older version of SQL Server Management studio to connect to SQL Server 2012?
    Thanks.
    DJ

    Glad to see that you were able to resolve the issue yourself, but for the curious, could you explain what this
    Extended Protection is?
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Process of login with ADF security

    Hi,
    I was looking at how to implement the process of Login with the ADF security using JDev 11g and I feel very good...
    My question is if it is possible to use this tool in case of use a container as Tomcat 6.x or JBoss. If it is possible to use ADF security for these containers, what should be configured to work?

    Hi,
    ok, I'd like to use authorization with ADF security, but as you say it is not possible in Tomcat. well, but could implement it, if there must be 3 users with different roles of the little system that I want to develop. Any idea?. There maybe a small example with user roles to use without authorization of ADF security?.

  • Use Adf Security In jspx page

    Hi guys,
    Currently I am using default adf security.is there any way to use same security on my login jspx page.
    Thanks,
    Raul

    hi user,
    i hope that you are looking for
    http://www.fireboxtraining.com/blog/2012/02/09/oracle-adf-11g-authentication-using-custom-adf-login-form/
    http://docs.oracle.com/cd/E26098_01/web.1112/e16182/adding_security.htm
    please see the if you want custom login.
    Figure 35-3 Using the Configure ADF Security Wizard to Generate a Simple Login Page
    there is lot of youtube videos. just google it out.
    this is to timo:
    What do you mean by  '...I am using default adf security...'
    if i am understood correctly. while creating new fusion web apps while configuring adf-security HTTP Basic Authentication is comes as default option. he mentioning in that way.
    do You want to secure the login page itself? This doesn't make sense as you need to login to get to the login page.
    i hope he is not asking like as you mentioned.
    from my experience i will interpret like this
    "Currently I am using default adf security".
    he is currently using default adf security(HTTP Basic Authentication).
    is there any way to use same security on my login jspx page.
    he need use the same adf-security concept on custom login page.
    Thanks

  • Problem with using Request dispatcher in my login,jspx

    Hi
    I am using Jdev 11g and new to adf.
    I am trying to work with adf security.
    I designed a login.jspx page and loginproxy.jspx accoridng to the following link
    http://groundside.com/blog/DuncanMills.php?title=j2ee_security_a_jsf_based_login_form&more=1&c=1&tb=1&pb=1
    I have added this code in login.java
         ExternalContext ectx =    FacesContext.getCurrentInstance().getExternalContext();
         HttpServletRequest request =    (HttpServletRequest)ectx.getRequest();
         HttpServletResponse response =    (HttpServletResponse)ectx.getResponse();
         RequestDispatcher dispatcher =   request.getRequestDispatcher("loginnew.jspx");
    RequestDispatcher dispatcher =   request.getRequestDispatcher("j_security_check");
        request.setAttribute("j_username", username);
        request.setAttribute("j_password", password);
         dispatcher.forward(request,response);
    When it tries to execute dispatch statement, it goes in an infinite loop and finally gets me a stack overflow error and also in the cosole it prints series of exceptions like
    ActionListenerImpl><processAction> javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.controller.ControllerException
    javax.faces.el.EvaluationException: javax.servlet.ServletException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class oracle.adf.controller.ControllerExceptionI have to validate the user against database hence i created a login.jspx with a backing bean so that i can access the username and password and validate the credentials against db and redirect user to the appropriate page.
    The functionality i want to implement is very simple but i just cant get it to work using adf security.
    any help is highly appreciated.
    thanks
    at

    Hi Pedja,
    Thanks for the prompt reply.
    I have been following the link you mentioned to create ADF security and successfully implementedthe first part where if i directly give any internal page url it redirects me back to login page.
    Instead of using weblogic-sql authenticator, i wanted to manually authenticate the user in loginbean.java where i check the username passowrd against the db.
    I had also implemented the method to access username,password mentioned in the following thread
    Re: ADF security on my jspx  page as login page
    Insted of using authentication.login, i am calling the db method to do the validation.
    The thing is after my db validation it does redirect me to the success page(menu.jspx). but when i click links on menu.jspx it redirects me back to login page.
    so i understand that user is not yet set in the session.
    I am stuck at the point how do i code the login.jspx, currently my login.jspx does not have any j_security_check and i think this is what is creating the problem.
    while searching for adding jsecurity in jspx i landed on the blog of 2006 and started using that.
    Can you please point me to some link which explains how to code login.jspx , i have been trying hard for couple of days.
    Thanks again
    ash

  • 401 - unauthorised in ADF Security.

    Hi.
    Am trying to develop a login page using ADF security in jdeveloper 11.1.1.6.0.
    I have followed this link
    ADF security on my jspx  page as login page
    This is my code which i have used in my login bean.
    public String doLogin() {
    String un = _username;
    byte[] pw = _password.getBytes();
    FacesContext ctx = FacesContext.getCurrentInstance();
    HttpServletRequest request =
    (HttpServletRequest)ctx.getExternalContext().getRequest();
    CallbackHandler handler = new SimpleCallbackHandler(un, pw);
    try {
    Subject mySubject = Authentication.login(handler);
    ServletAuthentication.runAs(mySubject, request);
    ServletAuthentication.generateNewSessionID(request);
    /*   String loginUrl = "/adfAuthentication?success_url=/faces" +
    ctx.getViewRoot().getViewId();*/
    String loginUrl = "/adfAuthentication?success_url=/faces/Runtime.jspx";
    System.out.println ("Loginto to be printed"+loginUrl);
    HttpServletResponse response =
    (HttpServletResponse)ctx.getExternalContext().getResponse();
    sendForward(request, response, loginUrl);
    } 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);
    } catch (LoginException le) {
    reportUnexpectedLoginError("LoginException", le);
    return null;
    private void sendForward(HttpServletRequest request,
    HttpServletResponse response,
    String forwardUrl){
    FacesContext ctx = FacesContext.getCurrentInstance();
    RequestDispatcher dispatcher = request.getRequestDispatcher(forwardUrl);
    System.out.println ("dispatcher inside send forward :"+dispatcher);
    try {
    dispatcher.forward(request, response);
    } catch (ServletException se) {
    reportUnexpectedLoginError("ServletException", se);
    } catch (IOException ie) {
    reportUnexpectedLoginError("IOException", ie);
    ctx.responseComplete();
    private void reportUnexpectedLoginError(String errType, Exception e){
    FacesMessage msg =
    new FacesMessage(FacesMessage.SEVERITY_ERROR, "Unexpected error                                                          
    during login",
    "Unexpected error during login (" + errType +
    "), please consult logs for detail");
    FacesContext.getCurrentInstance().addMessage(null, msg);
    e.printStackTrace();
    When i entered my username and password it shows an error as 401 - Unauthorized.
    Dont know where i went wrong? pls help me.!
    Regards,
    Prasad K T.

    Prasad, the link is a bit older. You may want to check this article from Frank: Oracle ADF: Security for Everyone
    which comes with a working sample.
    Timo

  • Migrating ADF Security from file-based provider to LDAP provider

    We have deployed a small application using ADF Security with file-based provider in OAS and it works fine.
    Now we want to migrate to ADF Security using LDAP provider.
    In order to make this possible we followed the next steps:
    - Migrate all the roles and policies from the file to OID with JAZNMigrationtool.
    - In OAS we've changed the Application Security Provider to 'Oracle Identity Management'.
    - Reset the OC4J instance.
    But there was no success, the application continues working with the file-based provider.
    What more is necessary to configurate?

    Hi,
    if you use EM make sure you change the setting for the application, not the general OC4J setting.
    You can also deploy the provider settings with the orion-application.xml file added to your project
    Frank

  • ADF Security Framework

    Hi,
    Has somebody successfully implemented ADF Security framework with LDAP provider?
    I followed this nice article by Frank http://www.oracle.com/technology/products/jdev/howtos/1013/adfsecurity/adfsecurity_10132.html
    and it works but very slow - I must say I have maybe 100 VO's attributes on page, but to wait 3minutes to get rendered the page is too long. Maybe some bottleneck somewhere so I am asking...
    thanks,
    Branislav

    Hi
    I have also used ADF security using LDAP with less VO's per page without any problems.
    I must tell you however that during development I use file based security and change it to LDAP later on during deployment on the application server (I use 10.1.3.1).If you combine this with SSO then you end up with a neat solution -- that in my case more or less works satisfactorily. :-)
    Thanassis

  • ADF Security Design Question

    Hi All,
    I am developing an ADF web application. The security design is such that user authentication is mapped to database users. The design I see several pros and cons
    1) Different database users means I cannot take advantage of connection pooling.
    2) The architect argues SQL querying can be controlled at database level for each user.
    I have never been involved in such a web application. Can anybody please guide me if this is the way to go for ADF web application, any other pros and cons. The database is Oracle 11g. I still believe that application security should not be tied to the database security.
    Worst case if I have to go with this design, How to implement ADF security using database users.
    Thanks

    I blogged a use case for using Proxy Authentication with JPA here http://blogs.oracle.com/olaf/2010/04/using_oracle_proxy_authenticat.html. (Being a sample it includes a setter for user name, but a case with a JAAS Subject and Principal is easily adaptable).
    I'll dig out an ADF BC example and blog about it, too.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • ADF Security unable to run/deploy

    Hi all,
    I want to use ADF Security in my new project, so I created an simple test application in my JDeveloper 11g R1.
    What I have done is simple, I created a new application using Fusion Web Application Template, and then I run the Config ADF Security Wizard from Application->Secure menu. In the wizard, I selected generate default login page, and welcome page. Then I try to run the login.html.
    But I failed with the following error messages, can anybody help me?
    Thanks in advanced.
    2009年11月16日 下午02:13:17 oracle.mds.internal.lcm.logging.MDSLCMLogger info
    資訊: Application ID : wsm-pm
    2009年11月16日 下午02:13:17 oracle.mds.internal.lcm.logging.MDSLCMLogger info
    資訊: "Metadata Services: Metadata archive (MAR) not found."
    <2009年11月16日 下午02時13分37秒 CST> <Notice> <LoggingService> <BEA-320400> <The log file C:\Documents and Settings\itssdu10\Application Data\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
    <2009年11月16日 下午02時13分37秒 CST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to C:\Documents and Settings\itssdu10\Application Data\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log00001. Log messages will continue to be logged in C:\Documents and Settings\itssdu10\Application Data\JDeveloper\system11.1.1.1.33.54.07\DefaultDomain\servers\DefaultServer\logs\DefaultDomain.log.>
    <2009年11月16日 下午02時13分37秒 CST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
    2009年11月16日 下午02:13:38 oracle.wsm.audit.Auditor <init>
    資訊: Created J2EE application auditor for componentType=oracle.security.jps.internal.audit.AuditServiceImpl$Auditor@95c8c2
    2009年11月16日 下午02:13:38 oracle.adf.share.config.ADFConfigFactory getInstance
    資訊: ADF Config instance implementation in use is : oracle.adf.share.config.MDSConfigFactory
    2009年11月16日 下午02:13:41 oracle.adf.share.config.ADFMDSConfig parseADFConfiguration
    資訊: Configuration file:/META-INF/adf-config.xmlcannot not be read by MDS. Reading directly from the classpath
    <2009年11月16日 下午02時13分42秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <2009年11月16日 下午02時13分42秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <2009年11月16日 下午02時13分42秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7101 for protocols iiop, t3, ldap, snmp, http.>
    <2009年11月16日 下午02時13分42秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.16.127.167:7101 for protocols iiop, t3, ldap, snmp, http.>
    <2009年11月16日 下午02時13分42秒 CST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "DefaultServer" for domain "DefaultDomain" running in Development Mode>
    <2009年11月16日 下午02時13分42秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <2009年11月16日 下午02時13分42秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    DefaultServer startup time: 53578 ms.
    DefaultServer started.
    [Running application TestLogin on Server Instance DefaultServer...]
    <2009年11月16日 下午02時13分49秒 CST> <Warning> <J2EE> <BEA-160195> <The application version lifecycle event listener oracle.security.jps.wls.listeners.JpsAppVersionLifecycleListener is ignored because the application TestLogin is not versioned.>
    2009年11月16日 下午02:13:49 oracle.mds.internal.lcm.logging.MDSLCMLogger info
    資訊: Application ID : TestLogin
    2009年11月16日 下午02:13:49 oracle.mds.internal.lcm.logging.MDSLCMLogger info
    資訊: "Metadata Services: Metadata archive (MAR) not found."
    2009年11月16日 下午02:13:49 JpsApplicationLifecycleListener Policy Migration
    資訊: Application [TestLogin] is being deployed, start policy migration with jps.policystore.migration set to OVERWRITE.
    2009年11月16日 下午02:13:49 JpsApplicationLifecycleListener Policy Migration
    資訊: Application policy migration for [TestLogin] is completed successfully.
    2009年11月16日 下午02:13:50 JpsApplicationLifecycleListener Policy Migration
    資訊: Codebase policy migration for [TestLogin] is completed successfully.
    <2009年11月16日 下午02時13分50秒 CST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1258352028648' for task '0'. Error is: 'java.lang.NullPointerException'
    java.lang.NullPointerException
         at oracle.security.pki.l.c(Unknown Source)
         at oracle.security.pki.l.b(Unknown Source)
         at oracle.security.pki.OracleSSOKeyStoreSpi.engineLoad(Unknown Source)
         at oracle.security.pki.OracleSecretStore.load(Unknown Source)
         at oracle.security.pki.OracleWallet.getSecretStore(Unknown Source)
         Truncated. see log file for complete stacktrace
    java.lang.NullPointerException
         at oracle.security.pki.l.c(Unknown Source)
         at oracle.security.pki.l.b(Unknown Source)
         at oracle.security.pki.OracleSSOKeyStoreSpi.engineLoad(Unknown Source)
         at oracle.security.pki.OracleSecretStore.load(Unknown Source)
         at oracle.security.pki.OracleWallet.getSecretStore(Unknown Source)
         Truncated. see log file for complete stacktrace
    >
    <2009年11月16日 下午02時13分50秒 CST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'TestLogin'.>
    <2009年11月16日 下午02時13分50秒 CST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    java.lang.NullPointerException
         at oracle.security.pki.l.c(Unknown Source)
         at oracle.security.pki.l.b(Unknown Source)
         at oracle.security.pki.OracleSSOKeyStoreSpi.engineLoad(Unknown Source)
         at oracle.security.pki.OracleSecretStore.load(Unknown Source)
         at oracle.security.pki.OracleWallet.getSecretStore(Unknown Source)
         Truncated. see log file for complete stacktrace
    java.lang.NullPointerException
         at oracle.security.pki.l.c(Unknown Source)
         at oracle.security.pki.l.b(Unknown Source)
         at oracle.security.pki.OracleSSOKeyStoreSpi.engineLoad(Unknown Source)
         at oracle.security.pki.OracleSecretStore.load(Unknown Source)
         at oracle.security.pki.OracleWallet.getSecretStore(Unknown Source)
         Truncated. see log file for complete stacktrace
    >
    [02:13:50 PM] Weblogic Server Exception: weblogic.application.WrappedDeploymentException
    [02:13:50 PM] See server logs or server console for more details.
    [02:13:50 PM] #### Deployment incomplete. ####
    oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
    oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:341)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:235)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
         at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
         at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:442)
         at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
         at oracle.jdevimpl.runner.adrs.AdrsStarter$6$1.run(AdrsStarter.java:1469)
    Caused by: oracle.jdeveloper.deploy.DeployException: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:483)
         at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:332)
         ... 11 more
    Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
         at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:465)
         ... 12 more
    #### Cannot run application TestLogin due to error deploying to DefaultServer.
    [Application TestLogin stopped and undeployed from Server Instance DefaultServer]
    Samson Fu

    I found the deployment was failed inside JDeveloper from the error message, so the application is not able to run from JDeveloper. I don't understand why JDeveloper unable to run the application that generate by the build-in wizard. I've tried to reinstall my JDeveloper 11g, but still cannot have it work.
    Regards,
    Samson Fu

Maybe you are looking for

  • Adobe Reader XI and SharePoint Online

    We are mapping SharePoint sites as drives for our users, which utilizes WebDav.  When users are opening documents that are digital signature enabled, it is prompting them to check in/check out or open, as expected.  However, despite which option is c

  • How to get my usernames to appear from the drop down box then password automatically put in?

    =( ugh... I used to have my settings where it remembered my user name from the drop down box - so I would just type the first letter of my user name and a drop down box would appear and I could just click on my user name for that particular site and

  • ITunes sync hangs only when syncing photos to Apple TV

    I just got an Apple TV, and updated it to the last software v2.4; iTunes is also running latest v 9x. I have a large library and the first sync took a long time but it got done successfully. But when I select images I want to sync in the 'photos' tab

  • W/tax error

    hi i got one error msg while running the challan " w/tax line items are being cleared  along with other line items" Regards Raj

  • Plotting a graph in real-time without reading from a file

    Hello there. I am trying to plot a graph. I have succeeded in plotting the graph by first writing the data to a text file (.TXT), then reading from that text file. However, I feel this method will take up a lot of memory. Thus, I was wondering whethe