I want to keep the admin / user access key in the HttpSession but I don’t know if this is correct? Can the user edit his session and gain access to the administrator role?
final HttpSession session = req.getSession(); session.setAttribute("access", access);
Cookie:JSESSIONID=A6F9A23571CBB66B795AD6F3163B9EDB, so only this identifier can be changed on the client side (but not the values in the session, which changes only on the server side). - MrFylypenkoHttpSessionworks). If the key is stored only on the server and is loaded by session ID, then it should be normal. - Regent