<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Govind's WebLog : transport security</title><link>http://blogs.msdn.com/govindr/archive/tags/transport+security/default.aspx</link><description>Tags: transport security</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>WCF Security Modes</title><link>http://blogs.msdn.com/govindr/archive/2007/02/06/wcf-security-modes.aspx</link><pubDate>Wed, 07 Feb 2007 08:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1617072</guid><dc:creator>govindr</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/govindr/comments/1617072.aspx</comments><wfw:commentRss>http://blogs.msdn.com/govindr/commentrss.aspx?PostID=1617072</wfw:commentRss><description>&lt;P&gt;WCF supports three types of Security. They are,&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Transport Security&lt;/LI&gt;
&lt;LI&gt;Mixed-Mode Security&lt;/LI&gt;
&lt;LI&gt;Message Security&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Let's discuss the various Security Modes below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Transport Security is applied at the transport byte stream below the message layer. The message does not have a Security header and the message does not carry any user authentication data. It is the least flexible in terms of WS-Security usage and it is highly dependent on the transport. It is the fastest in terms of performance.&lt;/P&gt;
&lt;P&gt;Message Security is applied at the message layer and it is transport independent. It is a point to point security model with maximum flexibility in terms of having the message routed over different transports. WS-Security defines different ways to secure a message and the tokens that can be used. Message Security provides the maximum flexibility in terms of that as well. Message Security is slowest in terms of performance.&lt;/P&gt;
&lt;P&gt;Mixed-Mode Security is a hybrid between Transport and Message Security. The transport is encrypted and the message contains some user authentication tokens. If the token can provide a key (i.e., it is not a username/password token) then it will sign the timestamp in the security header. If the client token is a Asymmetric token then the 'To' header will be signed as well. It is faster than Message Security.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1617072" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/govindr/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Message+Security/default.aspx">Message Security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/govindr/archive/tags/transport+security/default.aspx">transport security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Security+Tokens/default.aspx">Security Tokens</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Mixed-Mode+Security/default.aspx">Mixed-Mode Security</category></item><item><title>Federation and Bearer Tokens</title><link>http://blogs.msdn.com/govindr/archive/2006/11/22/federation-and-bearer-tokens.aspx</link><pubDate>Wed, 22 Nov 2006 14:06:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1121881</guid><dc:creator>govindr</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/govindr/comments/1121881.aspx</comments><wfw:commentRss>http://blogs.msdn.com/govindr/commentrss.aspx?PostID=1121881</wfw:commentRss><description>&lt;P&gt;The latest &lt;A class="" href="http://docs.oasis-open.org/ws-sx/ws-trust/200512/ws-trust-1.3-spec-cd-01.pdf" target=_blank mce_href="http://docs.oasis-open.org/ws-sx/ws-trust/200512/ws-trust-1.3-spec-cd-01.pdf"&gt;WS-Trust spec&lt;/A&gt; (yet to be ratified by OASIS) introduces a concept called Bearer Tokens. This basically is a keyless token that a client requests from an STS (Security Token Service). The only purpose this token serves is to provide more information about the client to the service while the client already has a way to secure its conversation with the service. (Read my other post on &lt;a href="http://blogs.msdn.com/govindr/archive/2006/10/18/federation.aspx"&gt;Federation&lt;/a&gt; for more details on how client uses that key obtained from a STS token.) &lt;/P&gt;
&lt;P&gt;This introduces some qurikiness. The obtained issued token can now be added only as a supporting token. In case of transport secured messages this can just be a signed supporting tokens.&amp;nbsp;In messages level security scenarios, this token should be added as a signed encrypted supporting token.&amp;nbsp;Note, the client doesn't have a key so there is no need for the client to prove to the service that it did obtain the token for the STS and it does know some secret information of the token. So just adding the token as signed token in message level security will expose the token for a third party, who can just snoop the token and replay it to the service as if it is the client.&lt;/P&gt;
&lt;P&gt;Bearer tokens issued by a STS should be some how verifiale by the service. For this purpose the Bearer token should be signed by the STS. A SAML 1.1, SAML 2.0 or a custom token fits well for this purpose. WCF will require a wsu:Id to be on the issued token to be able to sign it (In message level security case). A SAML 1.1 does not have a wsu:Id on it and its attribute list is&amp;nbsp;not extendable&amp;nbsp;by the schema and hence it is not possible to use SAML 1.1 as bearer tokens in WCF with message level security. The only choices are SAML 2.0 or a custom token that contains a wsu:Id on it.&lt;/P&gt;
&lt;P&gt;The cool feature of Bearer tokens in my opinion is that it enables the client to get multiple such tokens from different STS and present all of it to the service. The service might need information from multiple sources to allow or deny permissions for a client and instead of doing multiple round trips the client can present all information to the service at once.&lt;/P&gt;
&lt;P&gt;WCF v1 does not support this token type and we might be adding support for this in the future. The idea behind this post is to explain the issues involved in using such tokens and how it plays with message level and transport level security. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1121881" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/govindr/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Message+Security/default.aspx">Message Security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/govindr/archive/tags/transport+security/default.aspx">transport security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Security+Tokens/default.aspx">Security Tokens</category><category domain="http://blogs.msdn.com/govindr/archive/tags/SAML/default.aspx">SAML</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Federation/default.aspx">Federation</category><category domain="http://blogs.msdn.com/govindr/archive/tags/webservices/default.aspx">webservices</category></item><item><title>Using Binary Encoding in WCF </title><link>http://blogs.msdn.com/govindr/archive/2006/10/09/Using-Binary-Encoding-in-WCF-.aspx</link><pubDate>Tue, 10 Oct 2006 06:04:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:811005</guid><dc:creator>govindr</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/govindr/comments/811005.aspx</comments><wfw:commentRss>http://blogs.msdn.com/govindr/commentrss.aspx?PostID=811005</wfw:commentRss><description>&lt;P&gt;I recently had a question from someone on using Binary Encoding and how performance of their application relates to that. My answer was it depends...it depends on what is in your message body and if you are using message security or transport security.&lt;/P&gt;
&lt;P&gt;Before talking about binary encoding, the first thing to understand&amp;nbsp;is that it is not a interoperable&amp;nbsp;encoding. If your clients and&amp;nbsp;service are all built with&amp;nbsp;WCF then go ahead and use Binary Encoding.&amp;nbsp;Binary Encoding is great stuff if you are using Message level security. In message security 90% of the SOAP header is security! When you are working with Issued Tokens, like SAML, the size of these headers are even bigger. Using Binary Encoding in these cases really compacts the size of the message by substituting each text element with a equivalent integer. Now, when I say element it is only applicable to the set of know element and attributes in a SOAP message. Like the element name "Envelope", "Header",&amp;nbsp;"EncryptedData", "Signature"&amp;nbsp;will be encoded to a single integer. How well the Body contents will be compacted depends on what is in the contents. If the Body is encrypted, then the contents contain the well known "EncryptedData" element and this will be compacted. If the Body contents is not encrypted then it will appear in plain text. An exception to this rule would be the infrastructure messages like Request Security Token (RST) and Request Security Token Response (RSTR) which are all well-knows elements. If your body contents are not encrypted and have custom serialized objects or Data Sets or XML Documents then you will not see any compaction here. So consider your scenario carefully, check the size of your body to the rest of the SOAP message. The chances are you will see a Performance boost moving to Binary.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=811005" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/govindr/archive/tags/Security/default.aspx">Security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Binary/default.aspx">Binary</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Message+Security/default.aspx">Message Security</category><category domain="http://blogs.msdn.com/govindr/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/govindr/archive/tags/Encoding/default.aspx">Encoding</category><category domain="http://blogs.msdn.com/govindr/archive/tags/transport+security/default.aspx">transport security</category></item></channel></rss>