Forum Discussion
Kevin_Stewart
Employee
Aug 19, 2009Session tables
I have a question for the DevCentral pundits, and the community at large. This isn’t so much a right or wrong question as it is just experience and best practice. So let me set up the scenario:
I have a site behind the BigIP for which I need to store some information in an in-memory session table (SSL, UIE, Hash, whatever). The information is sensitive, likely in the order of authentication data and/or certificate information and should be kept in a session table vice something that the client passes back and forth. Said session table stores that information and indexes it by some *unique* value that either the client possesses or is unique to the connection. The question then lies in what that unique value might be, what people have used successfully, and what is considered best practice. Before you answer though, consider the following thoughts.
Cookie: storing the unique ID in a cookie, like an ASPSESSIONID, PHPSESSIONID, JSESSIONID, CFTOKEN, etc. is fine, but like any cookie-based solution, it is vulnerable to client-side vulnerabilities, namely XSS. Current statistics show that over 60% of web attacks are based on XSS vulnerabilities. Some industry experts also say that almost every web application out there is susceptible to this vector in one way or another. If there’s any chance that a rogue agent can steal that unique ID from a user’s cookies, then cookies are possibly not the best way to go for this kind of data.
SSL Session ID: this has always been a favorite of mine and one that I’ve used extensively in production environments with no issues. Interestingly though, there is a statement in one of the DevCentral iRule Wiki pages (http://devcentral.f5.com/wiki/default.aspx/iRules/SSL__sessionid.html) that says: “Because ID’s are not globally unique, the session id needs to be combined with something else”. Not globally unique? I’d first like someone to qualify that statement. Second, I can concede that there might not be any mechanism to prevent duplicate entries, but 64 (randomly?) generated digits, in the span of all of the BigIP’s concurrent SSL connections, should reasonably produce unique values. It’s probably also important to understand how that number is generated. Also consider that modern browsers will change that SSL session ID frequently. I don’t profess to know how the BigIP tracks the changed values across connections, but to say that it does. In any case, the statement has me wondering now if this is the best approach.
Client/Browser-based persistence attributes: there a few other options, Client IP, User-Agent, etc. that have some merit, but clearly finding some attribute, or some series of attributes that are absolutely unique to the client and persistent to the session is not an easy task.
So what do you think? What do you use in this situation? What has worked best for you? Let me know.
Thanks.
Kevin
- hoolio
Cirrostratus
Hi Kevin,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects