A common question we hear is “Can parameters be safely passed in URLs to secure web sites? ” The question often arises after a customer has looked at an HTTPS request in HttpWatch and wondered who else can see this data.
For example, let’s pretend to pass a password in a query string parameter using the following secure URL:
HttpWatch is able to show the contents of a secure request because it is integrated with the browser and can view the data before it is encrypted by the SSL connection used for HTTPS requests:
If you look in a network sniffer, like Network Monitor, at the same request you would just see the encrypted data going backwards and forwards. No URLs, headers or content is visible in the packet trace::
You can rely on an HTTPS request being secure so long as:
So at the network level, URL parameters are secure, but there are some other ways in which URL based data can leak:
2009-02-20 10:18:27 W3SVC4326 WWW 188.8.131.52 GET /Default.htm password=mypassword 443 ...
It’s generally agreed that storing clear text passwords is never a good idea even on the server.
Query string parameters will also be stored if the user creates a bookmark.
The solution to this problem requires two steps:
The advantage of using session level cookies to carry this information is that:
Here’s an example of the ASP.NET session cookie that is used in our online store to identity a user:
Notice that the cookie is limited to the domain store.httpwatch.com and it expires at the end of the browser session (i.e. it is not stored to disk).
You can of course use query string parameters with HTTPS, but don’t use them for anything that could present a security problem. For example, you could safely use them to identity part numbers or types of display like ‘accountview’ or ‘printpage’, but don’t use them for passwords, credit card numbers or other pieces of information that should not be publicly available.