Questions tagged [session-management]

Management of semi-permanent interactive information interchange between two or more communicating devices, or between a computer and user

2
votes
1answer
59 views

Is there any benefit to using a salt when the cleartext is random data?

I understand that using a salt makes it harder to find cleartext using rainbow tables - but in that scenario the clear text is structured / low entropy. If my clear text is generated randomly, then is ...
0
votes
1answer
40 views

Cancelling a request stops new authentication cookie getting to browser, invalidating all further requests

I am trying to secure my login system using authentication cookies. If the user tries to access a protected resource they must provide an authentication cookie. If the cookie is valid, the request is ...
0
votes
2answers
60 views

Is there another way than session hijacking to access user account through XSS?

If I have discovered an XSS vulnerability, is there another way of gaining access to an account without session hijacking? Mainly because on most of the sites I test, the HttpOnly and Secure flags are ...
0
votes
1answer
49 views

Are JWT's the way to go in my situation?

I am working on a personal project for learning reasons, and have come to the point of authenticating and authorizing users. I would like to keep the project as stateless as possible, to make sure it ...
-1
votes
0answers
39 views

Same asp.net sessionID across all users and sessions

I'm testing a website which has the same asp.net sessionID for all users and sessions. There is another FedAuth cookie which is unique. But does that make it safer to use the same asp.net sessionID ...
0
votes
0answers
35 views

OIDC SPA Keycloack refresh_token storage location

I have Single Page Application based on Open ID Connect flow (keycloak). I wonder what are the security considerations for refresh token storage - what are the advantages and disadvantages for ...
2
votes
1answer
114 views

How could ASP.NET forms authentication session leak into a different site?

We're dealing with a vulnerability where a forms authentication from one site can be used within a separate site. I can't figure out how is IIS or ASP.NET allowing this to occur Steps: Login to ...
0
votes
1answer
74 views

Is session id in url itself for all the requests an issue? [closed]

Is session id in url itself for all the requests an issue?
1
vote
3answers
142 views

is having a `set-cookie: sessionid=xxxxxxx` in every response considered bad practice?

My Django application sets a set-cookie: sessionid=xxxx; expires=Thu, 16-May-2019 18:54:59 (and some more, like max-age and path) on every response. The sessionid remains the same until the session ...
4
votes
1answer
62 views

Plausible scenario for a PHP session fixation attack with default settings?

Recently I was musing on the problem and realized that I cannot think of a plausible scenario for a session fixation attack against a PHP application running with default settings. Given session....
-2
votes
1answer
66 views

Session key is the same throughout the session, can this behavior be exploited?

This application uses session key instead of CSRF token but this session key is the same throughout the session, it's not changing. It only changes if I logout and then login again to the application. ...
0
votes
0answers
35 views

Bind application user roles to JWT is good

I need implement service oriented application. so i hope to use micro services for my back end function and react for fronted end development. for session management i hope to use JWT tokens. with ...
2
votes
1answer
124 views

How long a lifetime of a DTLS session with an IoT device should be?

I am using an application which is sending application data using MQTT-SN application Layer protocol. I have encrypted the UDP port using DTLS. Now the question is if i have to reinitialize a ...
0
votes
1answer
84 views

How often should I reset my users' session cookies?

I am working on a Rails application where I reset the session upon logging out and each successful login, as well as when the user IP address changes. Would resetting the session (changing the ...
0
votes
2answers
159 views

Could Someone Use a Stolen Cookie Session ID to Bypass Htaccess Login?

I'm doing some pen testing for my place of employment. I was able to grab the session id from the browser cookies, but i still cannot get past the htaccess login. I initially thought that by setting ...
1
vote
1answer
148 views

Store user credentials vs store refresh token

I am currently designing a native mobile application that require user authentication and authorization to connect to a REST API. Keycloak will be used as IAM tool and tokens will be JWT. I don't ...
1
vote
1answer
156 views

Remember me feature: do we need a server side token if the cookie is signed by the server?

Every resource I find (I, II, III) about how to implement in a secure way the typical "remember me" login feature, recommends storing a user identifier and an associated unique token in the cookie, ...
0
votes
2answers
67 views

Cookie generation

What is the most secure was to generate cookies that makes it hard for a user to be able to guess the session cookie of another particular user or that will be accepted as a valid session cookie. ...
1
vote
1answer
83 views

Is a “logged_in” session flag secure enough?

Is the code below enough to secure a login area? <?php if ($_SESSION['logged_in']) { // show content for logged-in users } Note: $_SESSION['logged_in'] is just a boolean value true after ...
2
votes
1answer
45 views

Does embedding (concatenating) a user ID in a session token for logging have any security implications?

Assuming there's a user with ID 123456 logging into a web application where the randomly generated session identifier to be stored in the cookie looks like this 123456zXRL9DWpPtaAhkPzhemQZE5P5F (that ...
0
votes
2answers
217 views

Why not write the CSRF Token into the Session

I am currently developing a web page and came across the OWASP Cheat sheet about double submit cookies. I am now thinking that's a good idea but I didn't get why you are not storing the CSRF token ...
0
votes
1answer
84 views

Can an attacker steal information from my HTTPS page by embedding it?

If a login page, secured with https/tls redirects to another site (also secured with https/tls) with a onetime use token (expires in a minute and has a nonce) in the querystring, can this token be ...
0
votes
2answers
199 views

Authenticated Sessions on a Desktop Application

I want to implement a login into my C++ desktop application and I'm having a hard time finding information on managing login sessions without cookies or JWT (JSON Web Token) (more on that in a bit). I ...
2
votes
2answers
127 views

How to implement secure user sessions using HttpOnly cookies?

I'm creating a web application, and want to allow users to log in (and stay logged in). My plan to support this in a secure way goes as follows: User logs in from a login form - when successful, the ...
1
vote
2answers
62 views

Effects of new random Session token for each HTTP Request

On successful authentcation, a web application issues a session cookie that is a constant length string of apparently random hex characters. ...
1
vote
1answer
28 views

restoring logged out gmail session in running instance of chromium browser?

My situation is: +I have created a special purpose gmail account +I used a complicated password to protect the account. On purpose, I did not use any 2FA options are a "reset" email address or phone ...
1
vote
0answers
36 views

Rotating session names vs a static session name with a rotating validation string

I'm building my own session management library in the Go programming language and I had an interesting idea to save memory. I created something called an overseer that looks for expired and abandon ...
1
vote
1answer
104 views

Harden against privilege escalation in Microservices

Please consider the following scenario. The system has a set of business owners (i.e. users of the system) Each business owner is mapped to a set of customers The business owners login to the system ...
0
votes
2answers
2k views

JWT or session cookie for API for both web and mobile app?

I've been reading all I could about this subject for the last couple of days and I can't decide what would be the best approach. The only two requirement are: I need to know the users that are ...
0
votes
1answer
98 views

Handling race condition at the time of renewing the session

I've recently asked this question on SO. As the question was not answered yet, I've come up with an approach. But I wanted to check if there is not any security flaw in this solution. Question I had ...
0
votes
2answers
128 views

why MAC address can not be used as session identifier instead of session ID? [duplicate]

why MAC address can not be used as session identifier instead of session ID? why the physical address (MAC address) cannot be used as a session identifier during the communications between servers ...
0
votes
1answer
219 views

A different CSRF token and session ID passed in the request [closed]

A CSRF token is what a server includes in its response, that is the same token which is passed in the request from the user. In my case, a different CSRF token is getting included in the request- ...
1
vote
0answers
48 views

Generating session with id and password

Most web apps generate a long hex number and use it as a sessionid. My idea is to create an ID which is auto-incrementing for each generated session and assign it a random secure string (a password). ...
1
vote
1answer
500 views

Should client have access to 3rd party API access token?

I'm trying to determine whether to use a Token provided by a Third Party service directly, OR issue my own custom Token and store the Third Party Token server side. Authentication flow User ...
1
vote
1answer
52 views

Should you remove the user's application PIN if they explicitly log out

I am looking for some security driven insight on when to dispose of a mobile application user's PIN in a few scenarios: Background: When the user downloads and installs the mobile app, they are asked ...
0
votes
0answers
246 views

Multiple sshd sessions for single SSH login

I was grepping through /var/log/auth.log and noticed that for some reason, not every time, but sometimes when I would log in via SSH I would see entries like the following - where there were multiple ...
4
votes
2answers
731 views

Why we store session id instead of user id inside cookies?

Would not it be better to store user id instead of session id so that we only lookup database once for extracting other user info instead of twice extracting user id from session db then user db?
0
votes
1answer
104 views

How to implement machine tagging when allowing a user to “remember me” on web application? [duplicate]

The remember me cookie should identify the machine as well. So by implementing machine tagging, we will avoid a situation when an attacker tries to login with the user cookie from another machine. ...
0
votes
1answer
44 views

Best strategy to share some sensitive user data between Node and PHP

I am creating a website that is built on PHP. It has a small page where users can have a group chat and message each other. For that page I open a websocket with a help of socket.io and expressjs. I ...
1
vote
1answer
52 views

Security implications of using long lasting authentication cookies

I'm trying to find some information about potential security risks with allowing long lasting cookies for website authentication. Initially it was set to not persist the login session, so it would ...
1
vote
2answers
103 views

How many characters should a session key be?

I have a session key generator that uses only letters and number. I've looked up how long a session key should be here: https://www.owasp.org/index.php/Insufficient_Session-ID_Length and by some ...
0
votes
2answers
63 views

Are contents of PHP sessions forensically valuable?

PHP has some nice, neat builtins for dealing with sessions: there'ssession_start() and session_id() and session_destroy() functions, which work with a superglobal variable, $_SESSION, to store name/...
2
votes
0answers
744 views

Should I hash my refresh tokens before storing them in the server's database? [duplicate]

I have a service with a client app (Mac). To log in, users enter their username and password in the client app, which sends this information to the server. The server verifies this information using ...
2
votes
0answers
239 views

SAML 2 | Refresh IdP Session when user is working on SP

Wanted to discuss the solution and options to refresh the IdP Session when user is actively working on the SP. The use case is that after successful SP-Initiated SSO, there are two sessions in ...
-4
votes
2answers
468 views

Where will cookie be created. Client side ? Server side ? How it will be validated

I wanted to know where exactly a cookie be generated ie., client side / server side.Because if I intercept the request before logging into the application, Header with cookie will be displayed . So, ...
1
vote
0answers
38 views

logout all devices or only one

I wonder which is the best practice in terms of security. Assuming an application where one can login from multiple devices in parallel what I should expect from "logout" button? To logout the user ...
2
votes
2answers
499 views

Use javascript variable instead of session cookie

I have decided to plunge deep into Angular-like technologies, where all pages are practically just one page that gets never reloaded. And at this point I had the idea, instead of using cookies (which ...
3
votes
1answer
497 views

Does user-agent session tracking provide any benefit?

On a phpBB forum I manage a user has requested that we turn off the "Validate browser" setting which invalidates user sessions if they change user-agent, because they use a mod which randomises their ...
5
votes
4answers
1k views

How dangerous is storing the hashed password in local storage?

I'm looking at a web application that does something I find very unusual in the handling of login sessions. The application hashes the password with SHA256 and salt and saves it either in session ...
2
votes
1answer
109 views

Protecting the user from unauthorized access

So we are planning on adding a feature to our app that is similar to what Google does, but a little stricter: You have a list of sessions that are tied to a user agent and IP address(?) (google shows ...