【发布时间】:2019-10-10 05:46:15
【问题描述】:
我正在尝试修改安全标头的默认到期时间,即 5 分钟到 1 分钟。 服务器的安全策略之一是时间戳(请求的日期),其生存时间为一分钟。
有什么想法吗?
我尝试创建自定义绑定但没有成功。
<s:Envelope xmlns:u=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">
<s:Header>
<o:Security s:mustUnderstand=\"1\" xmlns:o=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">
<u:Timestamp u:Id=\"uuid-6f772493-4b86-4695-b415-316a916119ec-2\">
<u:Created>2019-05-23T12:14:26.920Z</u:Created>
**<u:Expires>2019-05-23T12:19:26.920Z</u:Expires>**
</u:Timestamp>
这是我们需要的:
<s:Envelope xmlns:u=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\">
<s:Header>
<o:Security s:mustUnderstand=\"1\" xmlns:o=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\">
<u:Timestamp u:Id=\"uuid-6f772493-4b86-4695-b415-316a916119ec-2\">
<u:Created>2019-05-23T12:14:26.920Z</u:Created>
**<u:Expires>2019-05-23T12:15:26.920Z</u:Expires>**
</u:Timestamp>
【问题讨论】:
-
TTL : Time To Live 实际上是指 IP 在未转发以防止路由循环之前所经过的跳数。您可能正在尝试更改错误的属性。
-
docs.microsoft.com/en-us/dotnet/api/… 但您需要创建自定义绑定来设置它。
标签: c# xml wcf timestamp soap-client