Adf Struts + Logon + Security

Hi All
I have developed an adf web application and have some questions about logging on and security. I have read the jaas security documents and understand the process. The application will have several users.
My question is what is the best way to log users onto the model layer.
Should I use one username and password for the schema and deploy the application and maintain a user table and use the jaas security with this. Will I get record locking ?
Should every user get there own schema username and password and pass this username and password to the app module logon ?
Anyone got any other suggestions ?
Can anyone give me some advice on what ways they have handled user logons to an adf struts application.
Any help would be greatly appreciated.
Thank you
Darren

Hi,
Should I use one username and password for the schema and deploy the application and maintain a user table and use the jaas security with this. Will I get record locking ?
Actually the account a user authenticates with is not the account he works in. In web applications it is common to use a shared application account to access the database.
If you want to keep the user security provider as a table in the database then you can do this as well, with no risk of locks
Anyone got any other suggestions ?
Use container managed security with a JAAS login module that authenticates the user against the database table. This decouples application logic from security logic
see: http://www.oracle.com/technology/products/jdev/collateral/papers/10g/adfstrutsj2eesec.pdf
Frank

Similar Messages

  • Help with simple display and add in ADF/Struts app

    I created a simple ADF/Struts application based on the HR schema. I have a department view object and entity object based on the Departments table. From the Struts page flow designer, I create a data page action (viewDepartments) that binded to a departments view object by dragging the departments view object as a "Read-Only" form from the palette with the navigation buttons --- this page will just display the departments. Next, I created another data page action (addDepartments) that allows a user to add a department. I did this by dragging the departments view object from the palette as an "Input Form" and then dragging the "Create" operation onto the data page action. Each data page action has its own JSP of course.
    I'm noticing that every time when I go to to the "addDepartments.do" and then go to "viewDepartments.do", a blank record is added to the view object. Why is this? Also, I want the Submit button to do the "save and commit" in one step. How do I do that?
    If it helps, I can email anybody the workspace file so that you can see this behavior.
    Thanks.

    Try following this step by step tutorial to see if it will make things better for you.
    http://otn.oracle.com/obe/obe9051jdev/adftojsp/defaultendtoend.htm#t3

  • Adf-Struts/JSP/BC4J- and setting date fields from jsp

    Hi,
    I'm working with the new ADF Frameworks (JDev 9.0.5.1) and ran into some questions regarding exception handling using BC4J, Struts and JSPs.
    I have a DATE column in database and an entity and VO with a datefield with type oracle.jbo.domain.Date.
    My JSP shows a textfield and the user should enter a valid date. Everything fine, until date is of wrong format or contains illegal characters...
    Problem:
    ADF tries to do a setAttribute on the datefield in VO row which expects a parameter with type oracle.jbo.domain.Date. When the user entered e.g. "NiceWeather" as date, I get an IIlegalArgumentException while converting to the correct Date format. This exception isn't thrown by bc4j as AttrValException and therefore my JSP renders a global error instead of a message directly behind the date field.
    I tried to validate the datefield in my DataForm and in my Action in the validateModelUpdates() method, but with no fitting solution.
    Any ideas how to validate a datefield with adf/struts/jsp/bc4j?
    Thanks for your help!
    Torsten.

    Torsen - In the first instance I'd recommed that you try and handle it declaritively using the Struts Validator Framework . See http://otn.oracle.com/products/jdev/howtos/10g/StrutsValidator/struts_validator_howto.html
    There is a section in there on how to use the validator with ADF databound pages and you can check the format the user enters via generated JavaScript.
    Also check out the matching sample project:
    http://otn.oracle.com/sample_code/products/jdev/10g/ADFandStrutsValidator.zip - this has a data field check on it as well

  • How to use ActionForm validate() method in ADF/Struts project

    Hi
    We are developing a project using ADF/Struts. We are not planning to use entity level validation. Rather we prefer to have it at Struts Form Bean level. So we need to have validate() method in Form Bean.
    That mean we need to have seperate bean for all the actions /jsp. The ADF's DataForm form bean is not gonna work for us. Is that correct.
    Please let me know...am I in the right direction.
    That could be a different discussion why we don't prefer entity level validation

    You can use the Struts validator plug-in (there's a howto on doing that on OTN) and it will handle the basics for you through XML definitions.
    If you want to specifically have a Form bean with a Validate() then the issue is that the current "DataForm" is a generic bean driven of the databinding files, so yes you'd have to write a bean per screen to use instead and loose that benefit of having a universal Bean. (Internally the DataPage and DataActions will respect the ActionForm APIs so you can pluf your own ActionForm subclass in with no problem.
    Plan B might be to leave the DataForm Bean in place and instead override the lifecycle of the datapage, probably in prepareModelUpdates()

  • ADF Struts on Login Box with User on DB

    Dear All,
    I read the respond on my last post about the login box and it was help me a lot.
    Now, my problem are how to make a login box on ADF Struts technology which the username and password verification from user and privilage on oracle database?
    Noone can connect to menu and the privilage from oracle database regulate the data that will be display.
    I hope somebody will help me with the step by step configuration. I'm new in these technology...
    Thanks a lot

    this is probably a question for the JDEV forum.
    Regards
    Grant ROnald
    Forms Product Management

  • Login Box example and source code on adf struts and JSP

    Dear all..
    I want to make application using ADF struts and JSP using oracle 10g Jdeveloper.
    The user should login into the login box and verify everyone who has right to enter the home.jsp.
    Anybody could help me with the source code as well as the step by step explanation...
    I'm looking forward the help...

    http://www.oracle.com/technology/products/jdev/collateral/papers/10g/reviewer/viewlets/reviewer_struts_viewlet_swf.html

  • ADF Struts JSP SelectList

    JDeveloper 10g JSP, Struts and ADF application.
    I am developing a search form that has a number of criteria fields one of which is a selectlist.
    The code that is generated when I drop the data control as a single select list onto the jsp page is as follows:
    <html:select property="SearchCodeType">
    <html:optionsCollection label="prompt" value="index" property="SearchCodeType.displayData"/>
    </html:select>
    The list is populated and I can select a value, however the value I need is the value of the prompt not the value of index (the prompt is a string) to be assigned to the parameter SearchCodeType when I submit so I can use this when adjusting the where clause of my view object to return the correct results.
    I am looking for a Struts/ADF/JSP solution.

    Have you guys find a way to save(commit) the multi-selection that is created as a part of the list. Steve Muenek put me in the right directions but if you guys have find a way or code please let me know since the time is running short and I would hate to move to another tool to get this functionality.
    I have the implementation methods using BC4J/View Object and do understand I'll need to override the create() method but just don't know how to read the records using the iterator or from the array of strings that is saved after the user has created multiple selections.
    We are using ADF Struts at least for now.
    Thanks a lot,
    Kamran

  • [freelance job] Experienced ADF/Struts/JSP View-Controller developer

    Hi,
    I'm looking for a freelance "10.1.2 JDeveloper":
    - First task: Development of multi-lingual Struts View and Controller for login, logout, contact, free registration(create/modification of account info, new password, ...) pages.
    Period: may, june 2005 and more if first collaboration is succesful.
    Skills on following technologies are required:
    - View: Struts tags , Struts-el tags , JSTL , JSP , Servlets => no javascript, no UIX, no faces
    - Controller: ADF/Struts
    - Model: Oracle ADF-BC 10.1.2 Oracle 10g Database
    We provide the static html pages + css files and the ADF-BC model components.
    We develop/enhance the Model service methods based on your requirements.
    You "translate" the static html pages to Struts/Struts-EL/JSTL/JSP and the necessary ADF-Struts controllers that inter-act with our ADF-BC Model.
    Contact: [email protected]
    Regards
    Fred
    PS Sorry for polluting this technical forum with this kind of request.

    Dear all..
    I have change the block program, but still can't run..
    My EmpAction.java like these
    ==============================================
    package BindTest7.view;
    import BindTest7.model.EmpViewImpl;
    import java.text.DateFormat;
    import java.text.ParseException;
    import
    oracle.adf.controller.struts.actions.DataActionContext;
    import
    oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.ViewObject;
    import java.util.Date;
    public class EmpAction extends DataForwardAction
    protected void prepareModel(DataActionContext ctx) throws Exception {
    super.prepareModel(ctx);
    ctx.getBindingContainer().findIteratorBinding("FindEmpView1Iterator")
    .setFindMode(true);
    public void onSearch(DataActionContext ctx) {
    ctx.getBindingContainer().findIteratorBinding("EmpView1Iterator")
    .executeQuery();
    //-public void onFilter(DataActionContext ctx)
    //recovery view
    ApplicationModule
    am=ctx.getBindingContainer().getDataControl().getApplicationModule();
    ViewObject EmpView=am.findViewObject("EmpView");
    //recovery dates
    String
    d1Str=ctx.getHttpServletRequest().getParameter("hiredate");
    String
    d2Str=ctx.getHttpServletRequest().getParameter("endDate");
    java.text.SimpleDateFormat formatter =
    new java.text.SimpleDateFormat("dd/MM/yyyy");
    Date d1=null;
    Date d2=null;
    // parse method could try a ParsingException,
    // it doesn't happpeend when dates are correct
    try
    d1=formatter.parse(d1Str);
    d2=formatter.parse(d2Str);
    catch (Exception e)
    //set where clausole
    EmpView.setWhereClauseParams(null);
    EmpView.setWhereClause("Hiredate>=:1 and Hiredate<=:2");
    EmpView.setWhereClauseParam(0,d1);
    EmpView.setWhereClauseParam(1,d2);
    EmpView.executeQuery();
    ===============================================
    Please help me....
    I just want to make a little modification on Steve Muench's Example
    by placing two input form for hiredate column so that
    the user only put the date
    on the query " between hiredate :1 and :2
    I'm waiting...
    regard
    erie

  • ADF/Struts Generated tag code variations? Struts html:text vs Html input

    Hi,
    JDev 10.1.2.1
    ADF/Struts
    I noticed that the JDev IDE generates different code for a same component/binding combination.
    Example:Data Control of type Input form with same VO selection.
    Generated code for 1 field:
    case 1)
    JSP code:
    <tr>
    <td>
    <c:out value="${bindings['TitleLang1'].label}"/>
    </td>
    <td>
    <html:text property="TitleLang1"/>
    </td>
    </tr>
    HTML output:
    <tr>
    <td>
    Short Title Language 1
    </td>
    <td>
    <input type="text" name="TitleLang1" value="Preliminary Demo">
    </td>
    </tr>
    case 2)
    JSP code:
    <tr>
    <td>
    <c:out value="${bindings['TitleLang1'].label}"/>
    </td>
    <td>
    <input type="text" name="<c:out value='${bindings.TitleLang1.path}'/>" value="<c:out value='${bindings.TitleLang1}'/>"/>
    </td>
    </tr>
    HTML output:
    <tr>
    <td>
    Short Title Language 1
    </td>
    <td>
    <input type="text" name="VB_TitleLang1" value="Preliminary Demo"/>
    </td>
    </tr>
    Case 1 generated code is obvious to me, the html name of the field equals the field binding id.
    In Case 2, the VB_ prefix is added and the binding variable references bindings.fieldName.path?
    Could someone explain me the second flavor?
    When should we use the path reference and replace the Struts html:text tag with html input tag?
    Thanks
    Fred

    I dont think you can mix static values and rt expressions together in attribute values.
    String onBlurString = "dontLeaveItEmpty(this);referenceEntered(" + recordNumber + ")" ;
    html:text styleClass="textFieldInTable" name="refrences" property="referenceName" onblur="<%=onBlurString%>" />cheers,
    ram.

  • Problem commit w/intermedia adf struts uix & 1 step submit/commit to user

    JDev 9051, ADF, Struts, ix & Intermedia
    Problem:
    Inserting intermedia data type (ORDSYS.ORDIMAGE) AND wanting the "commit to happen behind the scenes" so the user does not have to press submit and then commit.
    I am having a problem committing a record to the DB when the form contains an intermedia data type. If I do not fill in the image column (using file upload) it works fine. My work around for now is to commit twice.
    To create a new entry that contains intermedia data type (ORDSYS.ORDIMAGE) I am using the following flow of events.
    NOTE: THIS DOES NOT WORK IF I UPLOAD AN IMAGE, HOWEVER, IF I LEAVE THE IMAGE COLUMN BLANK IT WORKS FINE.
    01. start at browseInventory.uix
    02. press create button which triggers event named createInventoryEvent
    03. which gives control to createInventoryFoward
    04. which fires Data Action named createInventoryAction
    05. which forwards to formInventory.uix
    06. user supplies data and presses the submit button which triggers event named commitInventoryEvent
    07. which gives control to commitInventoryFoward
    08. which fires Data Action named commitInventoryAction
    09. which forwards to browseInventory.uix
    NOTE: THIS WORKS IF I DO UPLOAD AN IMAGE (COMMIT TWICE)
    01. start at browseInventory.uix
    02. press create button which triggers event named createInventoryEvent
    03. which gives control to createInventoryFoward
    04. which fires Data Action named createInventoryAction
    05. which forwards to formInventory.uix
    06. user supplies data and presses the submit button which triggers event named commitInventoryEvent
    07. which gives control to commitInventoryFoward
    08. which fires Data Action named commitInventoryAction
    09. which (on success) fires Data Action named commitInventoryAction_2
    10. which forwards to browseInventory.uix
    BTW - is there some codes I can use to display an image (Struts Config - Page Flow) on the OTN forums if I am hosting the image?
    Thanks,
    Bill G...

    Did you ever get a soluction for the duoble commit thingie?
    cause I cuirrently have the smae problem. It seems that it uses the first commit to instantiate the object, and the second commit to actually upload it to the database.

  • Friendly Printed Adf struts and CVS( case 1)

    Dear All,
    these link has good example for CVS on ADF struts for friendly printed.
    Try the CSV sample (#27) at http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html.
    The problem is there are no explanation in step by step fashion for new comers like me.
    I try to make the same project like the no 27 example. But the searching creteria always has a value that collected from data on the database when we run it from Jdeveloper. While on the example no 27 zip file, it will appear null and we can put the criteria there for our searching....
    Anybody can show me my mistakes and the step to solve these problems?
    Reply me soon...
    Regards
    Erie

    Please...anybody help me?
    Show me how...please...
    I'm so eager to know my mistakes...
    reply me soon
    take care

  • SM59 logon & security tab

    Hi ,
    Do anybody have any idea what we have to maintain in the tab 'Logon & Security ' in the tcode sm59 in the field 'Authorization For Destination '.
    Regards,
    Anuj

    I understand that your question is closed, but the answers are not particularly usefull... so I wanted to add a comment.
    This controls both the ability to administrate the RFC destination (object S_RFC_ADM activities) and the ability to call the destination as a "client side" security mechanism (object S_ICF activities).
    If the value is maintained in SM59, then these optional objects can be used to isolate sensitive connactions both from being changed within SM59 and from being called (from programs, services, SE37, etc).
    It is a very usefull mechanism, as the RFC connection even if restricted will still be able to do that which it is authorized to do. So you can restrict who can use that context, regardless of the authority of the user in the connection - but not regardless of the caller (the admin or the end user).
    Cheers,
    Julius

  • LastLogon attribute not updated in user ADFS federated logon

    We have a situation where part of our users only use their AD domain account for ADFS federated logon.
    Problem is that, the lastLogon attribute does not update, when the user makes an ADFS logon. That in turn will conflict with the automated unused AD account deactivation process which checks the lastLogontimeStamp attribute. Because of it, users may get
    their AD account disabled though they are using it daily.
    In a test AD, the ADFS logon updates the lastLogon attribute OK, so the problem is only in our production ADFS.
    How to troubleshoot the problem and, what might be wrong with it?
    Our AD is with two, WS 2008 R2 DC servers, DFL 2008 R2, and one ADFS server with WS 2008 R2.
    Br, Kari

    This is per design... if a user uses their AD DS account just for authenticating using an ADFS Proxy/WAP they never actually logon to the domain so the lastLogontimeStamp attribute will never but updated for the user account.
    WORK

  • LOV Databinding on ADF Struts

    Dear All..
    I want to migrate my report application from Oracle report into Java with ADF and struts.
    my report application on oracle report I made the parameter to display the data using these query
    select a.Salesno, a.salesdate, a.prodcode, b.prodname, a.qty
    from sales a, products b
    where
    a.prodcode = b.prodcode
    and
    a.sales date between :p_date1 and :p_date2
    and
    a.prodcode between :p_prod1 and :p_prod2
    while P_date1, P_date2, P_prod1 and p_prod2 are the
    parameter to display data. the parameter itself using
    the combo box.
    How to make these simple things on ADF struts using LOV data binding with step by step configuration..
    Hope anyone can help me to learn about these...
    thanks you

    Erie,
    have a look at the Jdeveloper website (otn.oracle.com/products/jdev). There are howto documents written that explain the use of LOVs.
    Frank

  • How to Use the Oracle Security (dynamic connection)  ADF Struts ?

    Hello All
    I need to use the security from Oracle in my application, I mean I use a connection to my DB , but This connection would have to be dynamic, I have to create different users with grants to my tables , and The users would have to connect to my application directly , I read something in the forum , but I'm not sure if it's possible , because I have appmodule created and they are connected to a same user. I need this be dynamic Could I use do This?. Someone have the same requirement?. Someone can help me , pleaser, Urgent!!
    Thanks all.
    Regards.

    Hello
    We were banging our heads on a similar thing, maybe this will help
    We needed to convert the wrapped connection to an OracleConnection so that we could do a proxy switch, but maybe you could apply it to your situation anyway
    1-you have to convert the Connection object to an OracleConnection in order to use the method that does the proxy switch
    The method to do this is getInnermostDelegate()
    Once you call this method, you get a new Connection object that can be cast to an OracleConnection object
    See below for the snippet of code
    // now switch the user and reselect
    if (conn instanceof DelegatingConnection) {
    properties.put("PROXY_USER_NAME","peter/peter");
    oraConn =((DelegatingConnection)conn).getInnermostDelegate();
    if (oraConn == null)
    out.println("oraConn is null\n");
    ((OracleConnection)oraConn).openProxySession(OracleConnection.PROXYTYPE_USER_NAME,properties);
    2-you have to put a setting in the xml file in conf/Catalina/localhost that allows you to call the getInnermostDelegate() method
    By default, Tomcat does not allow you to call this method, it will always return null
    You have to change the xml to allow it to return an object
    It seems that WebSphere and Tomcat both frown on vendor-specific methods that do not comply with the JDBC standards, but do allow it
    Here is the setting:
    <parameter>
    <!-- NOTE: This is necessary to enable access to the Oracle connection object -->
    <name>accessToUnderlyingConnectionAllowed</name>
    <value>true</value>
    </parameter>
    Note, this setting was also put in the conf/server.xml file
    Thanks
    Peter

Maybe you are looking for