Trying to set up multiple users, multiple roles in Tomcat

I've been learning webapps by making a webapp for the school where my wife works -- to manage assigning students to the rotating schedule of art periods throughout the year. Lots of fun and very good learning. I bought a Tomcat book, installed Tomcat 4.1.24, and have been writing html, jsp's, servlets, etc.
I've got a good deal of it working. Now I see that there will be areas of the app where it makes sense to restrict access to only those who have the roles -- the teacher who does the basic assignments work will have "manage" role, my wife who works in admissions will have "admin" access to the areas that allow students to be added to the database, general users will have access to areas where information is available but they can't change things. That sort of security planning.
I'm not worried about industrial strength security. It's a nice place, no big security worries with the students, it's not on the web, just the school's local network. So I plan to use Tomcat's BASIC auth, and I've tried to set it up in the tomcat-users.xml and the webapp's web.xml.
So I have 3 roles in tomcat-users.xml - user, manage, and admin. There would be a general user, named "user" with user role. That one could get in to the opening page, and to any other page not further restricted. The teacher would have "user" role to get in, and "manage" role to get to those pages that involve assignment tasks. My wife would have "user" to get in, and "admin" for admin stuff. A user would be blocked at the "secure" pages, but having logged in with both roles, the teacher and my wife would get them without further authentication.
<tomcat-users>
<role rolename="user"/>
<role rolename="manage"/>
<role rolename="admin"/>
<user username="user" password="userhat" roles="user"/>
<user username="hillary" password="managehat" roles="user,manage"/>
<user username="susan" password="adminhat" roles="user,admin"/>
</tomcat-users>
In the web.xml, I thought I could set up 2 different "security areas" in the web.xml, as a "proof of concept" exercise.
<security-constraint>
<display-name>Entry Level Security</display-name>
<web-resource-collection>
<web-resource-name>Open Pages</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>user</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<display-name>Art Blocks Secure Pages</display-name>
<web-resource-collection>
<web-resource-name>Secure Pages</web-resource-name>
<url-pattern>/secure/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
<role-name>manage</role-name>
</auth-constraint>
</security-constraint>
However I find that the general user, after passing the BASIC authentication popup, gets the opening page, but then can get to the admin stuff without any further popups. I must be missing something.

Hi,
Tomcat is not big on security. It doesn't have good security in standalone mode.Whenever I used Tomcat, another web server like Apache was used to provide authentication. This doesn't answer questions but you know at least not to expect too much.
http://galileo.spaceports.com/~ibidris/

Similar Messages

  • Multiple Users, Multiple iPods sync problem

    At home my iMac is set up with multiple accounts for my family members, 2 have iPod Nano's and I've an iPhone. Each of us has our own iTunes library. Now, a lot of the time I will stay logged in and just return to the log in window. Same goes with the kids who do the same (Time limited accounts means this happens quite often as they don't get logged off automatically).
    Up until 9.1 iTunes (I think, could have been 9.0) everything worked fine. I would leave my iTunes running constantly - this allowed me to stream over to our Airport Express units using the iPhone Remote app whenever I felt the need.... However, we've now run into a problem.
    More often than not my daughter will log in, dock her iPod and it won't show up on her iTunes - instead I have to switch to my user account where I'll find it showing up on MY iTunes! I then have to shut down my iTunes to allow her to sync her iPod with her iTunes.
    This didn't used to happen, it used to be that the user who was CURRENTLY logged on would get the plugged in iPod but that appears to be totally broken - I can't find any documents that say this is the way it was meant to work, searching the 'net for multiple users, multiple iTunes turns up so much that it's impossible to find any related issue.
    Is anybody else noticing this? Am I doing something daft wanting to use iPods & iTunes like this? Any suggestions on how to fix the issue?
    Thanks for any help!

    Chris CA wrote:
    it used to be that the user who was CURRENTLY logged on
    But according to your post, other users are still CURRENTLY logged on.
    Ok, so 'logged on' is vague, the other users are still logged on. I mean the user that has the desktop focus. The active user.
    a lot of the time *_I will stay logged in_* and just return to the log in window. Same goes with the kids who do the same (Time limited accounts means this happens quite often as *_they don't get logged off_* automatically).
    You can set System prefs - Security to log users off after xx minutes of inactivity.
    Yes, you can, but that does not solve the issue on 2 levels:
    1. If I did that then I couldn't leave my iTunes logged in to be able to stream from it to my Airport Express units. I'd have to manually go to the iMac and log myself in - which would kinda defeat the benefit of being able to control this all remotely as I've been doing perfectly happily for the past couple of years. 9 times out of 10 I don't want to be logged off for any number of reasons.
    2. As I said, some members of the household have Time Limits on their accounts via Parental Controls. This does not log users off, it merely drops them back to the login window. There is no way that I know of setting this up to actually log off. As a side issue, it'd be great if I could specify that for certain members of the family who use up all their time and get pushed back to the login window with Flash games running in a browser window consuming CPU unnecessarily... but that's a side-issue.
    You can send suggestions for iTunes here -> http://www.apple.com/feedback/itunesapp.html
    Um, ok, great, suggestion: Make iTunes work the way it used to work please . Seriously though, this is not a new feature request, I want to see if other people have experienced this and if there is a work-around out there.

  • I tried to set up two users on one computer, now I can't make iTunes match work for either.

    Lots of people seem to be having multiples user problems on iTunes, but I can't find a solution to mine so please help.
    I got a new iMac.  Switched it on.  Connected to iTunes Match - all fine and dandy.
    After a couple of weeks I decided I should follow Apple's advice and set up a separate user account on the imac for my wife.  I connected to iTunes match using her user name and down loaded a bunch of her favourite music. 
    Naive fool that I was, I didn't realise I had fallen into Apple's moronic multi-user trap. Only one user on one computer can use it????  Why???
    I thought that it was me being stupid so I switched everything off - including iTunes Match.  Now nothing works.
    If I log on with my iTunes ID and try to switch on iTunes Match it asks me if I want to add this computer, and then gives me the "This computer is already associated with an Apple ID - you can't use it for 90 days" message.
    If I use my wife's iTunes ID, it asks her if she would like to subscribe for £21.99 a year.
    The exact same thing happens whether I sign into the computer itself with my account or hers. 
    This is awe inspringly annoying.  Please tell me how to fix this.
    thanks.

    At this time there is no "solution." You'll simply have to wait the 90 days to re-enable iTunes Match.
    For now here is my suggestion. In your User Account, in OS X, sign out of whatever iTunes Store account you are signed in with. Then sign in with your store account and leave it at that. Now sign out of your OS X User Account, sign into your wife's OS X User Account and sign into the iTunes Store with her Apple ID (if necessary sign out of the account first).
    Now, you can go back to your OS X User Account and attempt to enable iTunes Match. You will probably get the "wait 90 days" message. If so leave it, mark your calendar, and wait for the 90 days to expire. You can try contacting iTunes Store support at <https://expresslane.apple.com> if you wish, but I really do not know how useful that will be.
    Incidentally, you get the message to pay for the service when trying to enable it on your wife's Apple ID because the service has not been purchased using that Apple ID. iTunes Match is designed to be a single-user service that is never signed out of and is associated with one, and only one, Apple ID and a regional store.

  • One Computer, Multiple Users, Multiple iTunes Libraries

    Hello
    My family shares a single Mac via Fast User Switching. We all have separate iTunes libraries. I had some difficulty getting TV to be able to use all of the iTunes libraries as alternate sources for streaming music. I'm posting this here as I've noticed a couple of questions here about it with no solutions.
    The symptom is that you are able to add the multiple libraries to TV by entering the passcode in iTunes but when you try to the new source, it fails to load the library. 'Loading <library> name ...' goes on forever or eventually gives up and then the library appears grey in the source list and you have to go through the registration process again. Music sharing appears to work between copies of iTunes running on the same computer.
    It's a firewall problem.
    It seems that iTunes choose a new TCP port to share each different library. For me it seems to allocate ports in the 4915x range. I can't find any documentation about this. The ports are not listed in the well known list for Apple products. I discovered it because the Windows version of iTunes has an informative error message that tells you to check that a particular port is open in the firewall for the particular library when it fails to load it.
    To fix it you just need to open these ports in the Mac's firewall. After that, provided all the users remain logged in with iTunes running, you will be able to stream their libraries.
    I hope this helps others to get it working more quickly than I did.
    I see that there are some Apple employees participating in these discussions. If you see this, maybe you could modify the documentation? Or add the solution to the How-To pages? I'll submit some feedback anyway.

    I wrote a simple shell script that executes each time a user logs in (well, actually, each time I log in, coz' it's not really applicable to other users). It syncs my work and home addressbooks and iCal calendars to one another.
    I named it "sync". Then I read somewhere that if you wanted to make it double-clickable (to launch it from the Finder), I appended a ".command" filename extension (so it's now named "sync.command"). I also did a chmod 755 to that file so that it had execute privileges. Depending on whether you give each user their own copy of this thing, or keep a single copy in, say, the /Users/Shared directory, you may have to play around with chmod. Whatever, just so long as the user that has just logged in has execute permissions to the file, and to the entire path to the file, you should be good.
    Then, in SysPrefs > Accounts > Login Items, I added that "sync.command" file to the list. So, really the only difference is I'm not wrapping mine inside an Automator script like you are.
    I had tried adding it to ~/Library/LaunchAgents and make a launchd plist for it, that would kick it off at login. But I didn't get that to work. Don't know why. But just adding the double-clickable executable unix script to the Login Items list did the trick. Whether the plist has to hang out there with it, I don't know. I still have it there, though, in case I ever get motivated to figure out what's wrong with my launchd plist file. So, if just adding it to the Login Items list doesn't do it for you, you could try making a (functional?) launchd plist for it and plopping them both in ~/Library/LaunchAgents, too. That's how I am now, and, like I said, it launches at user login as that user's process (not as a root process like the above referenced article said how login hooks worked -- although, you may want it to run as root since you want this to work with multiple users...in which case, you might want to listen to Cole and not me...).

  • Trying to set up 2 user accounts on 1 computer?

    Just got a new 80g ipod for my birthday yesterday, my wife has a 4g nano that is already installed ont this computer, how do I add a second user acct to the same computer?? I checked a couple of sites that told me to "hold down the shift key" also do I need to download the program again??
    thanks
    marty

    Marty,
    First off, you can both use your iPods on the same account if you want to. You can set up your iPod and her iPod to sync the same thing or different things off the same library. For example, you might have your 80GB iPod sync the entire thing, where as your wife might have a Smart Playlist, that limits the size to under 4GB to sync to her iPod.
    But if you want to set up anothe XP account, please use the Start -> Help option on your computer to read up about user accounts. That sort of instruction is beyond the scope of this group.
    Here is some additional helpful Apple articles. Enjoy!
    Patrick
    How to use multiple iPods with one computer
    http://docs.info.apple.com/article.html?artnum=300432
    Using iPod with multiple computers
    http://docs.info.apple.com/article.html?artnum=61675
    Managing content manually on iPod
    http://docs.info.apple.com/article.html?artnum=61148
    iPod: Frequently Asked Questions
    http://docs.info.apple.com/article.html?artnum=60920

  • Multiple Users -- Multiple iTunes Libraries

    In order to teach my kids computer responsibilities, I have created accounts for each of them. As time has gone, by and numerous iTunes gift cards each has a library of tunes and movies. Each has their own iPod which is bound to their account library. Now they want ot share, how do I do this? When I plug an iPod into iTunes of another person account it wants to erase the whole thing before allowing one song to be put onto the iPod. How do I overcome this serious limitation within a computer OS which supports seperation of users.
    Thanks

    I suggest reading up on these (it says multiple computers, but it works in your case as well):
    http://docs.info.apple.com/article.html?artnum=61675
    http://docs.info.apple.com/article.html?artnum=300432
    http://docs.info.apple.com/article.html?artnum=42673
    http://docs.info.apple.com/article.html?artnum=93195

  • What is icloud setup for Multiple users, multiple devices in family?

    What would be the recommended setup for iCloud to allow family members with multiple devices and multiple iTune accounts to share purchases, sync there own mail account, contacts, and reminders with multiple devices, and be able to sync calenders with all family calendars? Or better yet how can family members pick and choose what to sync with a common iCloud account?

    I'd like to know this to.
    We have 1 mac mini that serves as a media station that streams audio to Zeppelin air and photos & movies to our TV.
    My wife buys music on her iPhone. And takes pictures of the family.
    I buy apps and music on my iPad. And make movies of the family.
    I have a macbook pro ( itunes with home sharing,  iphoto home sharing ).
    She has a nice macbook (  itunes with home sharing, iphoto home sharing ).
    What we would want is that the mac mini collects all music / videos / media and streams it to all our apple devices via wifi ( not via internet ). But I with my appleID and she with her appleID.
    I wonder is Apple can make an GUInterface that I can understand to solve this.
    This iCloud seems not too suited.
    For families it would be easier if iOS5 would have 'home sharing' with upload and not transfer everything to CA first.

  • Multiple users, multiple iphoto libraries?

    Does anyone know if it is possible to have two seperate iphoto libraries when you have two seperate users. We share a computer but I do not want to share the iphoto library.
    ADAM

    Yes, create a new account for the other user and they will have their own set of Home folders, Documents, Library, Movies, Music, etc. They will be denied access any of your data.
    -mj
    [email protected]

  • Multiple users multiple computers

    I'm setting up a business right now using macs
    So far I have 4 different users and 4 computers.  We will end up sharing computers from time to time.  All the services we use are cloud based, email is hosted, website is hosted, pretty much everything is hosted, so i have very little need for a lion server
    problem is that i HATE having to setup each users email, address book, calendar, and dropbox settings on each and every computer.  without getting a synology server, lion server, or some other kind of server, is there a way to keep all this garbage in sync?

    For the address book and calendar you could use Google or iCloud. A central Mac server would really be the best way to go and you wouldn't have to purchase additional hardware as you could install it on to one of the existing computers.

  • How do I setup ADE: multiple users / multiple devices

    Hi,
    I'm new to this DRM stuff and totally confused as to how it works, and the implications of different setups. I've seen lots of posts suggesting if ADE is not setup correctly from the start, you end up with a cascade of problems trying to correct the installation, and having to play around in the registry.
    As I understand it, ADE is a download client, encrypter/decrypter process, a transfer client, and a book renderer.
    Although I've never done this, I guess what I want is the sort of setup you would have at an internet cafe. Someone can bring in their reader (already registered with their home computer). Go online, buy a book, use their Adobe Id to download the e-book (?) and transfer it to their reader. And read it.
    I'm not sure about which parts of the Authorization/Registration/Encryption process are linked to each other.
    I have read that ADE does not write anything to the e-reader during registration. But rather reads the serial number of the e-reader to identify it. Presumably ADE re-encrypts the book using the devices serial number when it transfers the book to the e-reader. So, according to the post, there is no problem having an  e-reader registered to many installations of ADE.
    Similarly I've read that authorization is only required to establish your rights to download the encrypted book.
    However, I've also seen posts that contradict these.
    Also I've seen that as the book is encrypted for a specific reader only during transfer, you can't use explorer to copy books onto the reader.
    cheers,
    matt
    ps. I've got a KoboGlo, I'm not from Kobo. I couldn't find a moniker, They were all taken and out of frustration used my reader as a moniker. And now I'm stuck with it.

    anybody, any idea ?

  • Multiple devices, multiple users, multiple accounts.... unwanted merge

    My husband and I accidentally synced phones to each others iTunes account. I am 75% sure that I know how this happened, so that we can avoid it in the future. The problem is that his apps are mixed in with mine on all devices, the Mac, the iPad, and both of our iPhones... even though we have separate accounts. Our contacts have merged as well through iCloud (even though I only created my iCloud account today).  Its been so frustrating that if it weren't for losing all music and contacts in my accounts, I'd be willing to delete all info just to get things clear again... but really hoping that I don't have to resort to that extreme. How can we undo all of the confusion and regain our separate devices?

    Cannot be done. Only one instance of iTunes can be open at a time.
    tt2

  • How to add multiple users to a role in ECC 6.0

    How to add multiple users (say 1000) to a role in ECC 6.0?

    Hi
    You can actually add multiple users to a role using transaction SU01. From SU01, use the menu Environment->Mass Changes.
    Here you can manually add the users, select them by address or authorisation data. Once you have your user list, you can then add or remove roles and/or profiles.
    Secondly , You can use SU10 to do mass changes to multiple users including role assignments per logical systems
    Also check the following link:
    http://www.sap-img.com/bc021.htm
    I hope this should do it
    regards
    Chen

  • How do I set up pages and the rest of iWork to work with multiple users on the same iMac?

    I have iWork '09 on my new iMac.  It works fine on my my admin account, but I am trying to set up a user account for my wife on the same computer and I am having problems getting it to allow her to use it on her account. When I open it while logged in under her account it starts with the try/buy screen.  I have already gone into the get info panye and changed the permissions for 'everyone' to read&write.  But it did not work.  Please can anyone help me out.

    When you install you get the opportunity to install it for "All Users".
    It sounds like you have a demo version on your Mac however, you need to delete it:
    http://www.freeforum101.com/iworktipsntrick/viewtopic.php?t=105&mforum=iworktips ntrick
    Peter

  • Multiple User Request via GRC 10.1

    Hi ,
    I was trying to submit multiple user for role assignment via GRC 10.1  . I was able to submit the request but when the request was forwarded to the role approves the approves not able to either reject or approve the request as in the risk violations tab there is no user id is showing.   In our workflow we need to run the risk analysis prior approving a request . Much appriciate if you anyone could advice where it goes wrong .

    Dear Kumar,
    can you please provide some more information. From my point of view risk analysis for multiple user works. The analysis criteria always shows as in your screenshot. If you check in SLG1 you can see if the risk analysis has been started and if you have errors.
    Can you please check SLG1 and provide us with more infos?
    Best regards,
    Alessandro

  • Time Capsule with multiple users. Data Safe?

    Hi.
    I was just wondering if the I use Time Capsule with multiple users (multiple macs) I believe the backups are all seperated and password protected. Am I right?
    But what about the migration assistant? Doesn't the migration assistant help you to transfer your data from one mac to your new one without asking for a password? So wouldn't it be easy to use the migration assistant to get data of another time capsul backup?
    At the work place of my girlfriend they are using time capsul, and I'm not sure if I would advise her to backup her data to that timecapsule. Ok you can exclude folders, but not the mailaccount.

    Youknowthebo wrote:
    Thanks for the reply.
    But isn't it possible to transfer data from an old user account to a new account with a different name? Wouldn't that overide the password prompt?
    No more or less than on your Mac.
    I mean I understand that if you migrate a user account from one mac to another you wouldn't gain access to the home folder of that user, but as I understood the migration assistant it is possible to migrate data to a folder of your choice. I did not try it yet but that's what I (maybe misunderstood) read here http://web.me.com/pondini/Time_Machine/19.html
    No. You can select which user accounts to transfer, but you can't transfer one user's data to another.

Maybe you are looking for