How to map roles by using JAAS

Dear all,
i am implementing JAAS by using my own custom LoginModule, which will access to my database and get user login and password and do verification myself.
and i know that i need to set the secruity roles, secruity constraint in web.xml, and i have set Login Configuration to Form-Based Authentication.
here is part of my web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>LogonMain</web-resource-name>
<url-pattern>*.do</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
<role-name>sales</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>LogonMain.jsp</form-login-page>
<form-error-page>LogonMain.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>manager</role-name>
</security-role>
<security-role>
<role-name>sales</role-name>
</security-role>
<security-role>
<role-name>staff</role-name>
</security-role>
here is my question, it seems that all data action in my pages are protected, and i dont know how to map a particular user to the role that i define in web.xml.
so even though i logged in, i still cannot perform data action.
could anyone nice to tell me what could i do in this case for custom login module which accessing the database to get user login and password ?
i am appreicated your help !
thanks
Kenny

Hi Matthew,
so the mapping is defined in orion-application.xml , right ?
i have something like this
<?xml version = '1.0' encoding = 'windows-1252'?>
<!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://xmlns.oracle.com/ias/dtds/orion-application.dtd">
<orion-application>
<web-module id="dbLoginModule" path="dbLoginModule.war"/>
<library path="d:\oc4j904\jdbc\lib"/>
<!-- mapping for DB Login Module -->
     <security-role-mapping name="manager">
          <user name="ITAH01" />
     </security-role-mapping>
<jazn provider="XML">
<property name="role.mapping.dynamic" value="true"/>
</jazn>
<log>
          <file path="application.log"/>
     </log>
<data-sources path="./data-sources.xml"/>
     <namespace-access>
          <read-access>
               <namespace-resource root="">
                    <security-role-mapping name="&lt;jndi-user-role>">
                         <group name="administrators"/>
                    </security-role-mapping>
               </namespace-resource>
          </read-access>
          <write-access>
               <namespace-resource root="">
                    <security-role-mapping name="&lt;jndi-user-role>">
                         <group name="administrators"/>
                    </security-role-mapping>
               </namespace-resource>
          </write-access>
     </namespace-access>
</orion-application>
just wondering the library path should point to where ?
<library path="d:\oc4j904\jdbc\lib"/> this is the default path

Similar Messages

  • Dynamicaly manage role permissions using JAAS

    Hi All,
    I'm pretty much a newbie to JAAS and I need your help with the following requirement we have in our application.
    We have a set of predefined permissions that we know in development time and we can assign to EJBs. We need to be able to assign those permissions to roles in the organization through API in the application.
    We can't use simple role based security as the most granular actors in our application are roles, so we need to assign the permissions to the roles and not directly to the users (which are eventually assigned a role - managed in the customer user store).
    As I mentioned before, the permissions are a closed set and are not configurable. The only configuration is who gets those permissions, and that ability should be given to the Admin of our application.
    We considered using an hierarchy of roles, giving each logical role a set of permission-roles and use the standard role-based EJB security. For that we consider a custom login module to flatten the list of roles.
    Let me know what you think and if there's any best practice for such scenario.
    Just on thing. We want to stay in the JAAS realm as much as possible and avoid using some other security framework.
    Thanks,
    Eyal

    JHeadstart uses roles and permissions only for maintenance reasons (for example, to quickly assign a number of permissions to a user). In runtime, differences between roles and permissions are discarded and both are treated the same. So, it is then comparable to JAAS, which only distinguishes between users and roles (called groups in OID).
    The actual setup of the OID and JAAS is not part of JHeadstart. JHeadstart just uses the JAAS provider (when in JAAS mode) to check for the required roles (= permissions) for the current group.
    Paco van der Linden,
    JHeadstart Team.

  • EBS-  How to map search string using wild card

    Hi Gurus
    I got two similar string on bank statement which needs to be mapped to two different posting rules.
    MV-WORLDPAY- 1805 MOTO
    MV-WORLDPAY -1805 WEB
    in above string 1805 could be any no,( it is not fix no). I have tried using different wildcards and symbols like
    +,*,?,# but it is not piciking the right posting rule, also search string use is also activated. so please guide me.
    Many Thanks
    Sam Rathod.

    Hi
    Try keeping the 1st two digits of search string as b;ank. i.e. ############ (12 digits) mapped to __##########. I used underscore to denote balnk space. Using this when you recevie say 000000001618 (12 digits), it will be mapped to 0000001618 (10 digits). Then your interpretation algo will use this 10 digit number.
    Thanks
    Nikhil

  • How mapping role defined in JDeveloper to LDAP

    Hi,
    I'm trying to understand how to map the roles definited during design of BPM process and the LDAP.
    I've deployed process on soa server, I can see the ear on Console page.
    I did the following:
    1. Log in to Oracle BPM workspace (http://localhost:8001/bpm/workspace/) as WebLogic user.
    2. Click on the administration link.
    3. Click on Roles, in the Administration Areas panel on the left, to list all the different roles across all the deployed processes.
    but I do not see my deployed process.
    Do you know why this is? In my process I've just added my roles to the swimlane. Is this correct? Why I do not see any roles deployed?

    Hi Fairlie,
    in order to successfully build your BPM project you need to implement all activities (interactive and non-interactive) in your process model and/or mark part of the activities as draft. By implementing I mean binding definitions of service tasks, business rules, scripts, human tasks, etc. to the respective activities. Implementing human task form UI is an additional step. As Dan mentioned if you skip this step then your users will not be able to interact with the task. They rather would see it as an assigned task in the workspace without being able to use/see the user interface.
    Cheers,
    Anatoli

  • How to map CRM roles to EP roles

    Hello,
    I have created one coordinator roles in CRM and assigned to one user.
    Assigned defualt EP role also, but user is not getting any worksheets and ivews.
    How can we map the CRM roles to EP roels.
    Thanks
    Purna

    Purna,
    The portal roles drive the iView, workhseet, etc. The backend CRM roles give the needed authorization to run CRM.
    I assume your CRM Coordinator role is a custom role, you can either assign the standard CRM Portal Roles that provide the related iView for that backend role or create new CRM Portal Role using Content Admin. You can find the standard CRM portal roles by User Admin, change Search Criteria to Role and uses crm.
    Don't forget to check the permission on your new portal roles.
    Good luck.
    Lye
    Hope this

  • How to Set Up SSO Between IBM WebSphere and SAP EP Using JAAS

    Hi
    I have read the article on SDN called "How to Set Up SSO Between IBM WebSphere and SAP EP Using JAAS", which is also the name of my posting.
    The reason why I post this is that I've tried to follow the links in the PDF to get the file WebsphereEpSsoLib.zip but I get an error 403, which tells me that the file is not there.
    Does anybody know where this file went or can somebody tell me an alternative place to get this file?
    Jacob

    Please open the associated whitepaper, and you can find the download link to the .ZIP file on page 4.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ibm/how to set up single sign-on between an ibm websphere portal and the sap enterprise portal using jaas.pdf
    Hope that works!
    Elise

  • How to map the bulk users with the required  roles in portal at one time

    Hi,
    Would anyone tell me how to map the bulk users with the required roles in portal at one time?

    Thanks for all the reply.
    <b>I need to assign 1 or 2 group to n((eg) 1000)number of users</b>
    I tried the first option like
    [group]
    gid=
    gdesc=
    user=
    Thr problem with this is I could n't put more no of users in the notepad.
    I would be able to put only 150 users in the single line of notepad. If it goes to next line it is not working.
    I tried creating seperate notepad but in Import it says "exists"
    I'm not sure about LDAP. Would anyone explain me the best approach to do this.

  • Role based menu using JAAS

    Is it possible to implement role based menu using JAAS in web application ? My requirment is to enable or disable menu items on the screen based on the roles of the logged in user .
    Can some one help me on this ?

    Is it possible to implement role based menu using JAAS in web application ? My requirment is to enable or disable menu items on the screen based on the roles of the logged in user .
    Can some one help me on this ?

  • How to define roles for the reports that i have created using WAD?

    Hi all,
    Can anyone let me know how to define roles for the reports generated using WAD. And what is the procedure for creating and defining roles. Is this process take care of Bw consultant nor the basis guys.
    Can anyone let me know the entire procedure about the roles in bw 3.5
    thanxs
    haritha

    Following links might helps you
    create a role
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/bi/authorizationinSAPNWBI&

  • Using PowerTools How to Map folder to new TeamProject or Existing TeamProject

    Can somebody guide me please, how to map folder to connect to new Teamproject using Powertools .

    Hi AjayKumar, 
    Thanks for your reply.
    In TFS Source Control, the MAP mean mapping source files from TFS Source Control to the local workspace folder. I don’t think can mapping a new folder(non TFS source file) to TFS Server, we should add/check-in this new folder to TFS Source Control if you
    want store it in TFS Source Control.
    To add and check-in this new folder to TFS Source Control, please right-click on your new folder and select
    Team Foundation Server>>Add…, in the opened
    Add to Source Control dialog, ensure your new folder displayed under
    Item to add tab, then click Finish button. Then right-click on this new folder again and select
    Team Foundation Server>>Check In… to check this new folder to team project.
    Note: your new folder need located in the local workspace folder, then you can check-in to TFS Source Control using TFS Power Tools. 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • My requirement is to update 3 valuesets daily based on data coming to my staging table. What is the API used for this and how to map any API to our staging table? I am totally new to oracle and apps. Please help. Thanks!

    My requirement is to update 3 valuesets daily based on data coming to my staging table. What is the API used for this and how to map any API to our staging table? I am totally new to oracle and apps. Please help. Thanks!

    Hi,
    You could use FND_FLEX_LOADER_APIS.UP_VALUE_SET_VALUE to upload them from staging table (I suppose you mean value set values...).
    You can find a sample scripts if you google around.
    What do you mean "how to map any API to our staging table" ?
    You should do at least the following mapping (which column(s) in the staging table will provide these information):
    - the 3 value sets name which you're going to update/upload (I suppose these are existing value sets or which have been already created)
    - the value set values and  description
    Try to start with something and if there is any issues the community could then help... but for the time being with the description of the problem you have provided, that's the best I can do...

  • How to map the method action return value directly into screen using variables?

    Hi,
    My JDev version is 11.1.1.6.3.
    I have a 'MethodAction' defined in PageDef file, that goes to model layer and return String value. As this needs to be executed during initializing of pageDef, I have also added an 'InvokeAction' for that.
    <executables>
               <invokeAction id="invokeSayHelloId" Refresh="ifNeeded"
                                    Binds="sayHello"/>
               <variableIterator id="variables">
                    <variable Name="Name" Type="java.lang.String"/>
               </variableIterator>
    </executables>
    <bindings>
              <methodAction id="sayHello" InstanceName="HrAMDataControl.dataProvider"
                                     DataControl="HrAMDataControl" RequiresUpdateModel="true"
                                     Action="invokeMethod" MethodName="sayHello"
                                     IsViewObjectMethod="false"
                                     ReturnName="data.HrAMDataControl.methodResults.sayHello_HrAMDataControl_dataProvider_sayHello_result">
                                        <NamedData NDName="pName" NDValue="Michael John" NDType="java.lang.String"/>
             </methodAction>
    </bindings?
    Requirement:
    I want to map the return value of this method action directly into screen by making use of PageDef variables.
    Question:
    I. I need to know how to map this return value direcly as exprssion against PageDef variable.
    2. If Question 1 is achievable, assuming the method action returls List instead of String (I know well it returns 2 items), can I map the 1st Item against Variable 1 and 2nd Item against Variable 2 directly?
    Thanks in Advance.
    Ragu

    Thanks Frank, but If I directly map the MethodAction's result to UI, there are chances where it might get executed whenever I refresh the UIComponent (UIComponent to which the methodAction result is mapped. Isn't so??). Instead, If I invoke the MethodAction using InvokeAction, I can get the control on when it should get invoked (using RefreshCondition). If I assign the variable to UIComponent (Assume I've mapped the method action result to variable using expression), refreshing of UIComponent will not cause any performance issue I feel.
    Correct me If I am wrong.

  • How to set role based Authorization in JAAS

    how to set role based Authorization in JAAS
    i had user name , password and role in FileLogin
    thanks
    arun .v.

    http://dev2dev.bea.com/pub/a/2003/04/Kemp_Helton.html?page=last

  • How to map single input value to Two columns of Database table using format file of Bulk Copy Process

    Hi All,
    Am using OPENROWSET to load the file data into table, here the problem is i need to map same input value to two different columns of table, As format file doesn't allow the duplicate numbers am unable to insert same value to two columns, please help me to
    find a solution for this. 
    i can use only OPENROWSET because i need to insert some default values also which come based on file. only the problem is how to map same input value to two different columns of table. please give me the suggestions.
    Thanks,
    Sudhakar

    From what you say:
       INSERT tbl(col1, col2)
          SELECT col1, col1
          FROM   OPENROWSET(....)
    But I guess it is more difficult. You need to give more details. What sort of data source do you have? What does your query look like? The target table?
    Erland Sommarskog, SQL Server MVP, [email protected]
    Hi Erland,
    Thanks for your response
    my source file is text file with | symbol separate for ex:
    1002|eTab |V101|eTablet|V100|Logic|LT-7|Laptops|SCM
    Database table have columns like
    column1,column2,column3...etc, now i need to insert same value from input file into two columns for ex:
    the eTab value from text file has to be insert into column2 and column3 of
    table
    we cannot change format file like below one
    for the above situation how can we insert eTab into column2 and column3
    Thanks,
    Sudhakar.

  • How can I mapping directory by using Weblogic Server?

    Hi,
    We used to use iPlant as the web server. How can mapping directory using Weblogic
    server?
    $PATH=$wl_home/config/epdm/applications/DefaultWebApp/WEB-INF/classes
    such as to map the following:
    From To
    /rok/servlet $PATH/servlet-dev/WEB-INF/classes
    /rok/imagest $PATH/servlet-dev/images
    /rok/html $PATH/servlet-dev/htm
    /servlet $PATH/servlet-dev/servlet
    Thanks!
    Hanqing

    Use JMX. See http://dima.dhs.org.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    Clustering Weblogic? You're either using Coherence, or you should be!
    Download a Tangosol Coherence eval today at http://www.tangosol.com/
    "Nicole" <[email protected]> wrote in message
    news:3c4d6daa$[email protected]..
    >
    Hi all,
    in my EJBs I want to know, on which server instance I´m running. I needthis for
    logging info. How can I get the servers name?
    When I load the JNDI tree and select java:comp, an error occurs and a lotof information
    is printed. One is weblogic.Server and that is what I´m searching for.
    I use WLS 6.1 SP1
    Any ideas? Thanks,
    Nicole

Maybe you are looking for