2 Replies Latest reply on Feb 27, 2012 11:34 AM by Jaime Poch

    How to implement access control with security in JBoss AS 7?

    Jaime Poch Newbie



      I'm working in a java ee 6 app and I would like to use security form managing the control access (login, autorization, etc...)


      I have a realtional database with a user table and one of the fields is an foreign key contaning the user's role (matching with the roles defined later)


      I almost have it but I need a little help.


      I have a login form to autentificate user when request a protected resource.



      This is my web.xml:


                  <web-resource-name>Areas protegidas</web-resource-name>

              <description>rol gestor que tendrá acceso total</description>
              <description>rol  que permite acceso únicamente consultivo</description>




      When I request the protected page I am correctly redirect to the login (index.jsf), but when I do the login and request the protected page I am redirect to the login again because I supose I have to tell the server that the logged user correspond to the role gesto or ojeador. This is what I don't know how to do.


      Any help?


      Thanks so much