Contents
(1)Yes, sharing a session ID is okay, as it is going only to the intended user. (3)An application must not share a session ID via a URL.
Should session ID be encrypted?
So encrypting the session ID is useless. Remember that the session ID is just a random value that is used to identify a session. Attackers don’t need to know if that random value has some specific meaning; they just need to know that random value.
Is ASP net session secure?
Session state is kept entirely server-side, no matter which storage method you use (in-memory, session state server or database). So unless your server is hacked, Session variables are safe.
Which is the default session ID in ASP.NET?
Session state best practices: Reconfigure the default session id name in order to obfuscate the true meaning of the cookie value. In the case of ASP.NET, the default name is ASP.NET_SessionId. This immediately gives away that the application is ASP.NET and that that cookie contains the session id value.
Is it bad practice to use session variables to hold user information in?
Session was old way of programming, now you should replace session with appropriate caching middleware. Storing sensitive information is not an issue if the data can’t leak easily. Also no personal and sensitive data must be stored anywhere that can be tracked easily.
What should the session ID and cookies be?
Ensure that the session ID does not contain any additional sensitive data. The data should be a random string of characters with no meaning Session cookies should be created with the Secure and HttpOnly attributes Destroy sessions upon timeout, logoff, browser close or log-in from a separate location
What should be the length of a session ID?
Make sure the length of the session ID is long enough to prevent brute force attacks. Recommended length is 128 bits Make sure to create the session ID in a completely random way. This ensures that attackers can’t guess the session ID by using predictability analysis Ensure that the session ID does not contain any additional sensitive data.