限制访问开发网站的最佳方法是什么?

发布于 2024-07-13 19:44:27 字数 83 浏览 5 评论 0原文

我正在开发一个网站,目前我只想向其他几个人展示该网站。 设置windows用户名并使用windows auth在进入开发站点之前提示用户有什么问题吗?

I have a site i am working on that i would like to display only to a few others for now. Is there anything wrong with setting up windows user names and using windows auth to prompt the user before getting into the development site?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

寂寞笑我太脆弱 2024-07-20 19:44:27

有几种方法,具有不同程度的安全性:

  • 不要将其放在互联网上 - 将其放在专用网络上,并使用 VPN 访问它
  • 通过 HTTP 身份验证限制访问(如您所建议的)。 这样做的缺点是,如果您使用 HTTP 身份验证或其他类型的身份验证作为应用程序的一部分,它可能会干扰实际站点。
  • 根据远程IP限制访问。 只需允许您希望能够访问它的用户的 IP 即可。
  • 使用自定义主机名。 将其置于公共 IP 上,但不要发布主机名。 这意味着在您的 HOSTS 文件中创建一个条目(或配置您自己的 DNS 服务器,如果可能),以便“blah.mysite.com”访问该站点,但该站点在 Internet 上不可用。 显然,只有使用该主机名(而不是 IP)时才能访问该站点。

There are several ways, with varying degrees of security:

  • Don't put it on the internet - put it on a private network, and use a VPN to access it
  • Restrict access with HTTP authentication (as you suggest). The downside to this is it can interfere with the actual site, if you are using HTTP auth, or some other type of authentication as part of the application.
  • Restrict access based on remote IP. Just allow the IPs of users you want to be able to access it.
  • Use a custom hostname. Have it on a public IP, but don't publish the hostname. This means make an entry in your HOSTS file (or configure your own DNS server, if possible) so that "blah.mysite.com" goes to the site, but that is not available on the internet. Obviously you'd only make the site accessible when using that hostname (and not the IP).
一枫情书 2024-07-20 19:44:27

这取决于“最好”的含义:例如,您的意思是“最简单”还是“最安全”?

最好的方法可能是将其放在专用网络上,您可以通过 VPN 连接到该网络。

That depends on what you mean by "best": for example, do you mean "easiest" or "most secure"?

The best way might be to have it on a private network, which you attach to via VPN.

稳稳的幸福 2024-07-20 19:44:27

我经常这样做。 我使用 Hamachi 允许他们访问我的开发盒,这样他们就可以看到发生了什么。 他们可以在需要时和/或我允许时访问它。 当他们完成后,我将他们从我的 Hamachi 网络中驱逐并更改密码。

Hamachi 是一款软件 VPN。 这是 Hamachi 的链接 - AKA LogMeIn

Hamachi

他们有一个免费版本效果很好。

I do this frequently. I use Hamachi to allow them to access my dev box so they can see whats going on. they have access to it when they want , and/or when I allow. When they are done I evict them from my Hamachi network and change the password.

Hamachi is a software VPN. Heres a link to Hamachi - AKA LogMeIn

Hamachi

They have a free version which works quite well.

夜无邪 2024-07-20 19:44:27

当然,Windows auth 没有任何问题。 不过,有几个(不是太大)缺点:

  • 您的网站身份验证方案与最终产品不同。
  • 您让他们有更多机会接触到他们真正需要的盒子。
  • 自动重新映像计算机并重新部署网站更为复杂,因为您必须自动创建 Windows 帐户。

我建议两种选择:

  • 执行您计划在最终网站中执行的任何身份验证,并确保所有寻呼机都需要身份验证,
  • 执行基于令牌 cookie 的身份验证 - 向他们发送一个链接,该链接在 cookie 中设置特定令牌,并在您的网站代码中添加在进行常规用户身份验证之前快速检查该令牌

Of course, there's nothing wrong with Windows auth. There are couple of (not too big) drawbacks, though:

  • your website auth scheme is different from the final product.
  • you are giving them more access to the box they really need.
  • you automatically reimaging the machine and redeploying the website is more complex, as you have to automate the windows account creation.

I would suggest two alternatives:

  • to do whatever auth you plan on doing in the final website and make sure all pager require auth
  • do a token cookie based auth - send them a link that sets a particular token in a cookie and in your website code add quick check for that token before you even go to the regular user auth
仲春光 2024-07-20 19:44:27

如果您没有使用 IIS,并且需要开发人员能够更改内容,我会考虑 Apache + SSL + WebDav(又名 Web 文件夹)。 这将允许您提供一个安全的沙箱,开发人员可以在其中更改和查看内容,而无需在服务器上拥有用户帐户。

此设置需要一些 Apache 知识,因此仅当您已经在使用 Apache 或经常需要向外部人员提供对 Web 服务器的访问时才有意义。

我在该主题上找到的第一个有用链接: http ://pascal.thivent.name/2007/08/howto-setup-apache-224-webdav-under.html

If you aren't married to IIS, and you need developers to be able to change the content, I would consider Apache + SSL + WebDav (aka Web Folders). This will allow you to offer a secure sandbox where developers can change and view the content without having user accounts on the server.

This setup requires some knowledge of Apache so it only makes sense if you are already using Apache or if you frequently need to provide outsiders access to your web server.

First useful link I found on the topic: http://pascal.thivent.name/2007/08/howto-setup-apache-224-webdav-under.html

妖妓 2024-07-20 19:44:27

为什么不直接设置一个 NTFS 用户并将其分配给网站(并删除匿名访问)

Why don't you just set up an NTFS user and assign it to the website (and remove anonymous access)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文