我应该为我的网络服务购买什么样的SSL证书?

时间:2016-03-07 16:29:29

标签: asp.net web-services wcf ssl

我是网络应用程序方案中的HTTPS / SSL新手。

我有很多RESTful网络服务在我们网站的特定子域名上运行:' f31.mycompany.com'。这些Web服务由各种ASP.NET MVC应用程序和一些NativeScript应用程序使用。 Web服务的路径通常类似于http://f31.mycompany.com/webservicegroup1/service1.svc'。

我被要求使用HTTPS公开这些服务。我们尝试了自签名证书,但该实验失败了,因为Web应用程序因自签名证书的信任问题而崩溃。

现在我必须购买SSL证书并将其缩小为DV证书。我对以下内容感到困惑:

每个网络服务是否需要单独的SSL证书?所有服务都在同一个域上运行' f31.mycompany.com'但是,如我所提到的那样,它们位于自己的文件夹/命名空间中,f31.mycompany.com / webervicegroup1 / services1.svc' ,' f31.mycompany.com/webservicegroup2/service2.svc'等等。

N.B。:这不适用于购物车类应用程序,而是适用于我们的业务应用程序,由于安全性原因,我们需要HTTPS进行REST数据传输。

1 个答案:

答案 0 :(得分:0)

  

每个网络服务是否需要单独的SSL证书?所有服务   在同一个域上运行

不,您必须确保您的和主机(证书中的名称主题备用名称)与任何域匹配/ s,您的服务正在使用的主机。

通常标准证书具有:

  • www.mydomain.com为 Map params = new HashMap(); if (this.params != null) { String xml = (String) this.params.getValue(execution); if (xml != null) { XStream xs = new XStream(); xs.alias("map", java.util.Map.class); xs.registerConverter(new Converter() { public boolean canConvert(Class clazz) { return AbstractMap.class.isAssignableFrom(clazz); } public void marshal(Object value, HierarchicalStreamWriter writer, MarshallingContext context) { AbstractMap<String, String> map = (AbstractMap<String, String>) value; for (Map.Entry<String, String> entry : map.entrySet()) { writer.startNode(entry.getKey().toString()); writer.setValue(entry.getValue().toString()); writer.endNode(); } } public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { Map<String, String> map = new HashMap<String, String>(); while (reader.hasMoreChildren()) { reader.moveDown(); map.put(reader.getNodeName(), reader.getValue()); reader.moveUp(); } return map; } }); params = (Map) xs.fromXML(xml); } }
  • mydomain.com为name

反之亦然

这意味着能够在 www和“裸域”(没有“www”的人)上使用SSL / HTTPS。

在您的情况下,您可能需要与提供商合作,以便您可以利用此功能,因为您将subject alternative name用作“主机”之一 - 这很可能(自动)转换为能够使用:

实际上,这是在CSR中指定SAN的指南: How to Request a Certificate With a Custom Subject Alternative Name

这些天,即使你不是用来“购物”,ensure your cert uses "modern" crytpo algorithms (not SHA-1 or older) - 不确定是否还有提供商那么做,所以只是fyi ......

H个。