允许客户端在 Web 应用程序中支持 CNAME/DNS 屏蔽有哪些潜在问题?

发布于 2024-08-10 05:24:11 字数 902 浏览 4 评论 0原文

我们公司开发了其他公司可以授权的网络应用程序。通常,我们的应用程序运行在:

www.company.example

客户端版本的应用程序运行在:

client.company.example

通常,客户端运行自己的站点位于:

www.client.example

有时,客户请求从以下位置获取其应用程序版本:

application.client.example

这种设置常见于博客 ( Wordpress、Blogger、Kickapps)。

从技术上讲,使用 CNAME/A 记录和一些应用程序配置实现这种“DNS 屏蔽”非常简单。然而,我已经考虑到了与此相关的一些潜在问题,并且想知道您是否能想到我错过的任何其他问题:

1)流量统计(由外部提供商衡量,例如竞争.com)将会较低,因为 company.example 的流量不包括 application.client.example 的流量。 (当然,本地统计数据不会受到影响)

2) 从 application.client.example 到 company.example 潜在的 cookie 泄露。如果客户端在 .client.example 设置 cookie,则这些 cookie 可以由 company.example 服务器读取。

3) 电子邮件欺骗。 电子邮件可能是从带有 application.client.example 域的 company.example 发送的,可能会因 SPF 记录不兼容而导致垃圾邮件黑名单问题。

感谢您对此的任何想法。

Our company develops a web application that other companies can license. Typically, our application runs on:

www.company.example

And a client's version of the application is run on:

client.company.example

Usually, a client runs their own site at:

www.client.example

Sometimes, clients request to have their version of the application available from:

application.client.example

This kind of setup is often seen with blogs (Wordpress, Blogger, Kickapps).

Technically, achieving this "DNS Masking" with a CNAME/A Record and some application configuration is straightforward. I've thought out some potential issues related to this, however, and wonder if you can think of any others that I've missed:

1) Traffic statistics (as measured by external providers, e.g., compete.com) will be lower since the traffic for company.example won't include that of application.client.example. (Local stats would not be affected, of course)

2) Potential cookie disclosure from application.client.example to company.example. If the client is setting cookies at .client.example, those cookies could be read by the company.example server.

3) Email Spoofing. Email could be sent from company.example with the domain application.client.example, possibly causing problems with spam blacklisting due to incompatible SPF records.

Thanks for any thoughts on this.

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

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

发布评论

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

评论(1

从﹋此江山别 2024-08-17 05:24:11

CNAME 已被广泛使用很长时间,尤其是托管公司。没有什么大问题。

对我们来说最大的问题是何时必须使用 HTTPS。在同一台服务器上支持多个 CNAME 是非常困难的。我们在证书中使用别名(SAN 扩展)。每次在 DNS 中添加新的 CNAME 时,我们都必须获取新的证书。除此之外,一切对我们来说都很好。

至于你提到的问题,

  1. 这应该是一个优势。组合统计数据比分开统计数据容易得多。所以我们更喜欢详细的报告。
  2. Cookie 不会在域之间共享,即使它们位于同一 IP 上也是如此。只要应用程序在服务器上正确沙箱化,它们就无法读取彼此的 cookie。
  3. 您应该在服务器端对自己的传出 SMTP 流量进行速率限制,这样您就不会被列入黑名单。

CNAME has been widely used for so long, especially by hosting companies. There are no major issues.

The biggest problem for us is when you have to use HTTPS. It's very difficult to support multiple CNAMEs on the same server. We use aliases in certificate (SAN extension). We have to get a new cert every time a new CNAME is added in DNS. Other than that, everything works great for us.

As to the issues you mentioned,

  1. This should be an advantage. It's a lot easier to combine the stats than to separate them. So we prefer granular reports.
  2. Cookies are not shared between domains, even if they are on the same IP. As long as apps are properly sandboxed on the server, they can't read each other's cookie.
  3. You should rate-limit your own outgoing SMTP traffic on the server end so you don't get blacklisted.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文