Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

role_based authorization

 
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have 100 users along with their roles in database.
I have 100 functions in my web application.(for example,100+ org.apache.struts.action.Action)
The users and their roles often change(after one or two months)
How can I implement this role_based authorization (in struts1.1)?
Also I can extend a base action with authorization or implement the processRoles in the org.apache.struts.action.RequestProcessor,but I don't want to modify my java code or jsp after one or two months.
Please help me!
 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm just taking a guess here, but I think that role based authorization is something that you can manage with the servlet container instead of managing it in the app itself. You map url (patterns?) to roles, and manage the user profiles in a database. In Tomcat I think you would use a JDBC security realm. I don't have my Tomcat book at hand, so I can't check the details.
 
Sam Wang
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After 3 days,reply cames.First much thank Philip Shanks.
I also use the tomcat-user.xml to manager the user and role through security realm.
I want to know whether there is any better means to implement the user-role in the struts.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic