The reason using a "secret URL" is usually insecure is not because it is "security through obscurity". In information theory, a secret URL is no different than a password or private key. Are passwords and private keys considered a poor practice because they are "security through obscurity"? No.
So what's the difference between a hard-to-guess URL and a hard-to-guess password?
The difference is in the myriad of insecure places and ways that URLs are stored, displayed, and transmitted. Examples:
- In web browser address bars, histories, and caches*
- HTTP Referer headers sent to other sites*
- In web server access logs*
- In proxy and layer 7 firewall access logs
- In packet dumps
- In web stats traffic reports (e.g. AWStats, Google Analytics)*
HTTPS can protect some of these, but not all of them (items marked with a * are not protected against by using HTTPS.)
In a highly controlled environment, hard-to-guess URLs can be secure. But when using common web browsers, web servers and web frameworks, hard-to-guess URLs should not be relied upon unless no other option exists (and even then you should consider carefully).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…