大网数据广告活动
网站运营与故障问答

Secure way to share unfinished web-page with a customer?

· 52CE 我爱测

What are the options to share unfinished web-page with a customer without allowing third-party to see the work in progress when developer has control over the web-server? I could come up with following: Configure web-server to li…

问题原文

原帖链接 · Martin · CC BY-SA 4.0

What are the options to share unfinished web-page with a customer without allowing third-party to see the work in progress when developer has control over the web-server? I could come up with following:

  1. Configure web-server to listen on some random port. For example, this means that web-site is accessible from http://www.example.com:48080. However, one is able to detect the web server easily with port scan and access the web-site.
  2. Make the content available only if it is prefixed with a unique string. However, this does not protect against fuzzers. Example using Apache mod_rewrite:
        # Web-page is available from https://example.com/5d15d58b294ee/index.html
        # while https://example.com/index.html sends HTTP status code 403(forbidden).
        # Probably easier approach would be to move all the web-page files to directory named 5d15d58b294ee.
        RewriteRule "^/5d15d58b294ee/(.*)" "/$1" [L]
        RewriteRule "^/.*" - [F,L]
  1. Use authentication. For example, Apache basic authentication.

Out of those three options, the third one seems to be the most secure. However, the second one is probably more convenient and maybe usually secure enough.

已采纳解答

原帖链接 · Maximillian Laumeister · CC BY-SA 4.0

Here are some answers, in order:

  1. There exist only 65,535 ports, so this is a very small space to hide in, relatively speaking. Someone could enumerate your ports without much effort, so this solution is a no-go.

  2. Using a key as part of the URL is a much better idea. There exist more than 200 trillion 13-character alphanumeric strings, so the probability of someone guessing it with a fuzzer is essentially zero. The only concern is that since the key is part of the URL, the key will become part of the user's browsing history and the history of any caching proxies (or maybe even a search engine if the URL gets leaked). This is probably not any security issue, but something to keep in mind.

  3. This is the best idea if it's convenient enough.

So (3) is technically the most secure, but if you're just sharing a client site and not incredibly sensitive data, (2) should be more than good enough. If I were to go with (2), I would also serve up the X-Robots-Tag: noindex header to give it a better chance of not being picked up by search engines if the URL leaks, but that might be overkill.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Webmasters Stack Exchange
适用范围
以原帖系统、软件版本与发布日期为准(2019-06-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。