I am using a Security scheme that is based on session attributes. I know that Spring has Acegi Security but I dont have much time to study that module. I just want to share this out to solicit comments from experts here.
The pseudocode is like this.
On successful Login, I am setting an attribute on user session. The object that I am placing as session attribute is a simple javabean with a map of privileges.
public class UserInfo{ public String getRole(){}; public Map checkPrivilege(){}; //getters and setters }
The session attributes contains the Role also of the user. (He could be a User/Guest/Admin/Super Admin). Now there are certain privileges that are authorized to User.
For My JSP, I just check out the user session for his role and privilege.
My rough code is like this using JSTL
IF (User Info in Session is 'User' and has this privilege)
Add Button is shown
Else
No Add Button is shown.
I have these questions in my mind.
- Are session attributes considered secure that no one else can sniff or hack?
- Are security based on these scheme considered secure-enough?
Any idea please?