• 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

connecting user with virtual host

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok i now i have 2 virtual hosts: host1, host2 with 1 app on each: app1 and app2. I have registered in tomcat-users.xml 2 users with same names as the virtual hosts and the same role: "manager". I can get to the manager on particular virtual host but i have to log in first. The problem is that the user is not connected with virtual host, so i can log in to host1 using both users ... What should i do to connect user1 with host1 and to predetermine that only user1 can log in to manager for host1 ?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, Tomcat is designed to be able to support a central security management system, so the normal way you'd keep people out would be to set up roles for the applications. To (for example) keep administrators from app1 from being able to act as administrators to app2, you'd have to give them different role names (say app1_admin, app2_admin). You can put role aliases in web.xml to keep from having to make major mods to the app itself.

You can also define a separate Realm in each webapp's context, rather than globally (in server.xml) and give them separate username/password files.
 
Rafał Podhajny
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If this is not a problem for you, can you write a short example ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic