{"id":151,"date":"2006-10-27T20:53:59","date_gmt":"2006-10-28T03:53:59","guid":{"rendered":"http:\/\/kennyw.com\/indigo\/151"},"modified":"2006-10-27T20:53:59","modified_gmt":"2006-10-28T03:53:59","slug":"security-and-streamed-messages","status":"publish","type":"post","link":"https:\/\/kennyw.com\/?p=151","title":{"rendered":"Security and Streamed Messages"},"content":{"rendered":"<p>When I <a href=\"http:\/\/kennyw.com\/indigo\/91\">talked about transferring large messages<\/a> with WCF, I neglected to cover how security interacts with streamed messages.<\/p>\n<p>A number of V1 binding elements require message buffering. For example, WS-RM (ReliableSessionBindingElement) buffers messages so that it can retry sends when they fail.  The integrity (signing) protocol provided by WS-Security requires buffering of the message since the signature is stored in a message header (and headers are sent out prior to the streamed body).<\/p>\n<p>The system provided bindings in V1 that support streaming are BasicHttpBinding, NetTcpBinding, and NetNamedPipeBinding.  To enable bidirectional transport-level streaming, set the <code class=\"classname\">TransferMode<\/code> on your binding to <code class=\"classname\">TransferMode.Streamed<\/code>.  Alternatively, if you only require streaming in one direction, you can set the <code class=\"classname\">TransferMode<\/code> value to <code class=\"classname\">TransferMode.StreamedRequest<\/code> or <code class=\"classname\">TransferMode.StreamedResponse<\/code>.<\/p>\n<p>Transport-level streaming will work with Transport security.  It will also work with &#8220;mixed-mode&#8221; security: where authentication is provided by WS-Security, but confidentiality and integrity are provided by the transport.<\/p>\n<p>If you want to use full WS-Security, then you would need app-level &#8220;chunking&#8221;\u009d or a <a href=\"http:\/\/kennyw.com\/indigo\/53\">chunking protocol<\/a> at the channel-layer.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>When I talked about transferring large messages with WCF, I neglected to cover how security interacts with streamed messages. A number of V1 binding elements require message buffering. For example, WS-RM (ReliableSessionBindingElement) buffers messages so that it can retry sends when they fail. The integrity (signing) protocol provided by WS-Security requires buffering of the message [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-151","post","type-post","status-publish","format-standard","hentry","category-indigo"],"_links":{"self":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=151"}],"version-history":[{"count":0,"href":"https:\/\/kennyw.com\/index.php?rest_route=\/wp\/v2\/posts\/151\/revisions"}],"wp:attachment":[{"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kennyw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}