<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" version="2.0">
  <channel>
    <title>Matt Terski's Blog</title>
    <link>http://www.terski.com/blog/</link>
    <description>Writing tomorrow's legacy applications today</description>
    <copyright>Matt Terski</copyright>
    <lastBuildDate>Fri, 14 May 2004 12:05:39 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.7.5016.0</generator>
    <managingEditor>blogg@terski.com</managingEditor>
    <webMaster>blogg@terski.com</webMaster>
    <item>
      <trackback:ping>http://www.terski.com/blog/Trackback,guid,5e303e37-b564-4bac-9d59-5b3e68520c9a.aspx</trackback:ping>
      <pingback:server>http://www.terski.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.terski.com/blog/PermaLink,guid,5e303e37-b564-4bac-9d59-5b3e68520c9a.aspx</pingback:target>
      <wfw:comment>http://www.terski.com/blog/CommentView,guid,5e303e37-b564-4bac-9d59-5b3e68520c9a.aspx</wfw:comment>
      <wfw:commentRss>http://www.terski.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5e303e37-b564-4bac-9d59-5b3e68520c9a</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
      In a <a href="/blog/PermaLink,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx">previous
      entry</a>, I brought up the challenge of preserving the original caller’s identity
      across tiers. Sure, this can be solved in a half-a-dozen ways, but which is the right
      way for the given situation? When designing a real software system, it’s all
      about the tradeoffs. 
   </p>
        <p>
      And the tradeoff I faced is that I want to know the identity of the caller even after
      I cross from the presentation tier to the application service tier to the database
      tier. But I don’t want to incur the cost of authenticating a second or third
      time (at each tier). Remember, my callers’ identities are not guaranteed to
      be in Active Directory, so a service invocation would mean an extra trip to my own
      authentication service and database.
   </p>
        <p>
      My solution is to pass the caller’s identity, out-of-band, as I cross from the
      presentation tier to the application service tier. Note, I said the caller’s
      identity, not credentials (by identity, mean all of the information that is required
      to construct a custom Principal). On the application service tier, I’ll use
      an HttpModule to pull the identity out of a SOAP header, reconstruct a principal,
      and attach it to the current request. Now, I can perform role-based authorization
      in the application service tier.
   </p>
        <p>
      Of course, passing identity information around the network, even within the external
      firewall, is dicey. I’ll use IPSec to preserve the integrity of the data that
      moves between these two tiers.
   </p>
        <p>
      So, I get the benefit of a trusted-subsystem authentication model, without loosing
      the ability to perform role-based authorization based on the original caller.
   </p>
        <img width="0" height="0" src="http://www.terski.com/blog/aggbug.ashx?id=5e303e37-b564-4bac-9d59-5b3e68520c9a" />
      </body>
      <title>Identity Flow in SOA: One Solution</title>
      <guid>http://www.terski.com/blog/PermaLink,guid,5e303e37-b564-4bac-9d59-5b3e68520c9a.aspx</guid>
      <link>http://www.terski.com/blog/PermaLink,guid,5e303e37-b564-4bac-9d59-5b3e68520c9a.aspx</link>
      <pubDate>Fri, 14 May 2004 12:05:39 GMT</pubDate>
      <description>&lt;p&gt;
   In a &lt;a href="/blog/PermaLink,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx"&gt;previous
   entry&lt;/a&gt;, I brought up the challenge of preserving the original caller&amp;#8217;s identity
   across tiers. Sure, this can be solved in a half-a-dozen ways, but which is the right
   way for the given situation? When designing a real software system, it&amp;#8217;s all
   about the tradeoffs. 
&lt;/p&gt;
&lt;p&gt;
   And the tradeoff I faced is that I want to know the identity of the caller even after
   I cross from the presentation tier to the application service tier to the database
   tier. But I don&amp;#8217;t want to incur the cost of authenticating a second or third
   time (at each tier). Remember, my callers&amp;#8217; identities are not guaranteed to
   be in Active Directory, so a service invocation would mean an extra trip to my own
   authentication service and database.
&lt;/p&gt;
&lt;p&gt;
   My solution is to pass the caller&amp;#8217;s identity, out-of-band, as I cross from the
   presentation tier to the application service tier. Note, I said the caller&amp;#8217;s
   identity, not credentials (by identity, mean all of the information that is required
   to construct a custom Principal). On the application service tier, I&amp;#8217;ll use
   an HttpModule to pull the identity out of a SOAP header, reconstruct a principal,
   and attach it to the current request. Now, I can perform role-based authorization
   in the application service tier.
&lt;/p&gt;
&lt;p&gt;
   Of course, passing identity information around the network, even within the external
   firewall, is dicey. I&amp;#8217;ll use IPSec to preserve the integrity of the data that
   moves between these two tiers.
&lt;/p&gt;
&lt;p&gt;
   So, I get the benefit of a trusted-subsystem authentication model, without loosing
   the ability to perform role-based authorization based on the original caller.
&lt;/p&gt;
&lt;img width="0" height="0" src="http://www.terski.com/blog/aggbug.ashx?id=5e303e37-b564-4bac-9d59-5b3e68520c9a"&gt;</description>
      <comments>http://www.terski.com/blog/CommentView,guid,5e303e37-b564-4bac-9d59-5b3e68520c9a.aspx</comments>
      <category>Security</category>
    </item>
    <item>
      <trackback:ping>http://www.terski.com/blog/Trackback,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx</trackback:ping>
      <pingback:server>http://www.terski.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.terski.com/blog/PermaLink,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx</pingback:target>
      <wfw:comment>http://www.terski.com/blog/CommentView,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx</wfw:comment>
      <wfw:commentRss>http://www.terski.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=f10e9281-c5cf-4b74-aee1-948daeb880a0</wfw:commentRss>
      <slash:comments>0</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <div class="Section1">
          <p>
         The challenge: Make the original caller’s identity flow all the way to the database
         in a service-oriented architecture. 
      </p>
          <p>
         Here are the assumptions: 
      </p>
          <p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in">
         1.<span style="FONT: 7pt 'Times New Roman'">    </span> You are
         designing an enterprise-wide system and have decided it will consist of a number of
         autonomous, SOAP-based services. 
      </p>
          <p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in">
         2.<span style="FONT: 7pt 'Times New Roman'">    </span> Much of
         the data behind these services is sensitive. Personal health history information (PHHI),
         for example. 
      </p>
          <p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in">
         3.<span style="FONT: 7pt 'Times New Roman'">    </span> Both internal
         users (with Active Directory accounts) and external users (without Active Directory
         accounts) will need to access the services. 
      </p>
          <p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in">
         4.<span style="FONT: 7pt 'Times New Roman'">    </span> A user’s
         identity determines what activities they can perform and what data they can access. 
      </p>
          <p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in">
         5.<span style="FONT: 7pt 'Times New Roman'">    </span> Detailed
         auditing about individual user activity is required. 
      </p>
          <p>
         The diagram below shows a common deployment model for this kind of application. This
         is similar to Figure 7.4 in <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetlpMSDN.asp">Building
         Secure ASP.Net Applications</a>. 
      </p>
          <p align="center">
            <a href="/blog/content/binary/SOADeployment.gif">
              <img src="/blog/content/binary/SOADeployment.gif" width="400" border="0" />
            </a>
          </p>
          <p>
         Both internal users and external users access the system through an ASP.Net web application.
         This web server is located in a demilitarized zone – firewalls separate it from
         both the Internet and the internal network. Internal users’ credentials are
         stored in Active Directory. External users’ credentials are checked against
         a SQL Server database. Since only internal users are in Active Directory, roles for
         all users are stored in an authorization database. Information in this database is
         used to construct a GenericPrincipal for each user of the web application. 
      </p>
          <p>
         The application server is configured for Integrated Windows authentication. It authenticates
         the process identity of the web application. Windows authentication is used to connect
         to the SQL Server database, which authenticates the identity of the process running
         on the application server. 
      </p>
          <p>
         Here’s the issue: There is no per-user authorization on the application server
         or the database. Once we move from the web server to the application server, we authenticate
         against a single identity. So, we cannot perform any meaningful role-based authorization
         in the application layer. We also do not know the original caller’s identity
         for auditing purposes. 
      </p>
          <p>
         How do we design around this? What are the alternatives? What are the tradeoffs?  
      </p>
        </div>
        <img width="0" height="0" src="http://www.terski.com/blog/aggbug.ashx?id=f10e9281-c5cf-4b74-aee1-948daeb880a0" />
      </body>
      <title>Designer's Challenge: Identity Flow in SOA</title>
      <guid>http://www.terski.com/blog/PermaLink,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx</guid>
      <link>http://www.terski.com/blog/PermaLink,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx</link>
      <pubDate>Fri, 02 Apr 2004 03:47:02 GMT</pubDate>
      <description>&lt;div class=Section1&gt;
   &lt;p&gt;
      The challenge: Make the original caller&amp;#8217;s identity flow all the way to the database
      in a service-oriented architecture. 
   &lt;/p&gt;
   &lt;p&gt;
      Here are the assumptions: 
   &lt;/p&gt;
   &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;
      1.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt; You are
      designing an enterprise-wide system and have decided it will consist of a number of
      autonomous, SOAP-based services. 
   &lt;/p&gt;
   &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;
      2.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt; Much of
      the data behind these services is sensitive. Personal health history information (PHHI),
      for example. 
   &lt;/p&gt;
   &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;
      3.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt; Both internal
      users (with Active Directory accounts) and external users (without Active Directory
      accounts) will need to access the services. 
   &lt;/p&gt;
   &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;
      4.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt; A user&amp;#8217;s
      identity determines what activities they can perform and what data they can access. 
   &lt;/p&gt;
   &lt;p style="MARGIN-LEFT: 0.5in; TEXT-INDENT: -0.25in"&gt;
      5.&lt;span style="FONT: 7pt 'Times New Roman'"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt; Detailed
      auditing about individual user activity is required. 
   &lt;/p&gt;
   &lt;p&gt;
      The diagram below shows a common deployment model for this kind of application. This
      is similar to Figure 7.4 in &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/secnetlpMSDN.asp"&gt;Building
      Secure ASP.Net Applications&lt;/a&gt;. 
   &lt;/p&gt;
   &lt;p align=center&gt;
      &lt;a href="/blog/content/binary/SOADeployment.gif"&gt;&lt;img src="/blog/content/binary/SOADeployment.gif" width=400 border=0&gt;&lt;/a&gt;
   &lt;/p&gt;
   &lt;p&gt;
      Both internal users and external users access the system through an ASP.Net web application.
      This web server is located in a demilitarized zone &amp;#8211; firewalls separate it from
      both the Internet and the internal network. Internal users&amp;#8217; credentials are
      stored in Active Directory. External users&amp;#8217; credentials are checked against
      a SQL Server database. Since only internal users are in Active Directory, roles for
      all users are stored in an authorization database. Information in this database is
      used to construct a GenericPrincipal for each user of the web application. 
   &lt;/p&gt;
   &lt;p&gt;
      The application server is configured for Integrated Windows authentication. It authenticates
      the process identity of the web application. Windows authentication is used to connect
      to the SQL Server database, which authenticates the identity of the process running
      on the application server. 
   &lt;/p&gt;
   &lt;p&gt;
      Here&amp;#8217;s the issue: There is no per-user authorization on the application server
      or the database. Once we move from the web server to the application server, we authenticate
      against a single identity. So, we cannot perform any meaningful role-based authorization
      in the application layer. We also do not know the original caller&amp;#8217;s identity
      for auditing purposes. 
   &lt;/p&gt;
   &lt;p&gt;
      How do we design around this? What are the alternatives? What are the tradeoffs?&amp;nbsp; 
   &lt;/p&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.terski.com/blog/aggbug.ashx?id=f10e9281-c5cf-4b74-aee1-948daeb880a0"&gt;</description>
      <comments>http://www.terski.com/blog/CommentView,guid,f10e9281-c5cf-4b74-aee1-948daeb880a0.aspx</comments>
      <category>Security</category>
    </item>
  </channel>
</rss>