I am very new to web-app development and its security and trying to understand things around.
Everywhere I look for implementing security in my webapp they ask to use declarative
security. For example in tomcat I can declare the roles in the tomcat-user.xml
file like the following one.
<tomcat-users>
<user name="tomcat" password="s3cret" roles="manager-gui" />
</tomcat-users>
This part I can understand.
Now suppose I have added some of these roles in my web-app. Now a user of my web-app makes a request to some resource in my web-app. I want to know How do the container or I would know that with which role the user has made the request?
Thank you.