Security concerns regarding username / password vs secret URL

只愿长相守 提交于 2019-12-10 17:22:27

问题


I have a simple site with a sign-up form. Currently the user can complement their registration with (non-critical, "low security") information not available at the time of the sign-up, through a personal (secret) URL.

I.e., once they click submit, they get a message like:

Thanks for signing up. You can complement your registration by adding information through this personal URL:

      http://www.example.com/extra_info/cwm8iue2gi

Now, my client asks me to extend the application to allow users to change their registration completely, including more sensitive information such as billing address etc.

My question: Are there any security issues with having a secret URL instead of a full username / password system?

The only concern I can come up with is that URLs are stored in the browser history. This doesn't worry me much though. Am I missing something?

It's not the end of the world if someone changes some other users registration info. (It would just involve some extra manual labor.) I will not go through the extent of setting up https for this application.


回答1:


This approach is not appropriate for sensitive information because it's part of the HTTP request URL, which is not encrypted and shows up in many places such as proxy and other server logs. Even using HTTPS, you can't encrypt this part of the payload, so it's not an appropriate way to pass the token.

BTW, another problem with this scheme is if you send the URL to the user via email. That opens up several more avenues for attack.

A better scheme would require some small secret that is not in the email. But it can be challenging to decide what that secret should be. Usually the answer is: password.




回答2:


Another potential problem lies with the users themselves. Most folks realize that a password is something they should try to protect. However, how many users are likely to recognize that they ought to be making some sort of effort to protect your secret URL?




回答3:


The problem here is that although it is hard to guess the URL for any specific user, given enough users it becomes relatively easy to guess a correct url for SOME user.

This would be a classic example of a birthday attack.

ETA: Missed the part about the size of the secret, so this doesn't really apply in your case, but will leave the answer here since it might apply in the more general case.




回答4:


can complement their registration with (non-critical, "low security") information

It's hard to imagine what user-supplied information really is "low-security"; even if you are asking for a password and a username from your customers you are potenitally violating a duty of care to your customers; a large propertion of users will use the same username/password on multiple sites. Any information about your users and potentially a lot of information about transactions can be used by a third party to compromise the identity of that user.

Any information about the user should be supplied in an enctypted format (e.g. via https). And you should take appropriate measures to protect the data you store (e.g. hashing passwords).

Your idea of using a secret URL, means that only you, the user, anyone on the same network as the user, in the vicinity of a user on wifi, connected to any network between you and the user, or whom has access to the users hardware will know the URL. Of course that's not considering the possibility of someone trying a brute force attack against the URLs.

C.




回答5:


The secret URL means nothing if you're not using SSL. If you're still having the end-user transmit their identifying information across the Internet in the clear, then it doesn't matter how you're letting them in: They are still exposed.




回答6:


The "secret URL" is often referred to as security by obscurity. The issue is that it is super simple to write a script that will attempt various combinations of letters, symbols, and numbers to brute force hack this scheme.

So if any sensitive information is stored you should definitely use at least a username and password to secure it.



来源:https://stackoverflow.com/questions/7584162/security-concerns-regarding-username-password-vs-secret-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!