home *** CD-ROM | disk | FTP | other *** search
/ Chip 1999 September / CHIPCD_9_99.iso / software / uaktualnienia / OptionPackPL / iis4_07.cab / HIWSiteAdmin.asp < prev    next >
Text File  |  1998-04-27  |  9KB  |  180 lines

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  2. <HTML>
  3. <HEAD>
  4. <!--META TAGS ARE RECOMMENDED FOR THE SEARCH ENGINE-->
  5. <META NAME="DESCRIPTION" Content="How It Works Page">
  6. <META NAME="KEYWORDS" CONTENT="help, code, source code, questions, explanation">
  7. <META NAME="GENERATOR" CONTENT="Microsoft Visual InterDev 1.0">
  8. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
  9. <!--END META TAGS-->
  10.  
  11. <TITLE>How This Page Works</TITLE>
  12. </HEAD>
  13.  
  14. <BODY  BGCOLOR=#FFFFFF TOPMARGIN=0 LEFTMARGIN=0 ALINK=#23238E VLINK=#808080 LINK=#FFCC00>
  15. <BASEFONT FACE="VERDANA, ARIAL, HELVETICA" SIZE=2>
  16.  
  17. <!--Change link color on mouseover
  18.     Only if running Internet Explorer 4.0 or later -->
  19. <!--#include file=../libHighlight.inc-->
  20.  
  21. <!--BEGIN TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
  22. <TABLE WIDTH="100%" HEIGHT="100%" CELLPADDING=0 CELLSPACING=0  BGCOLOR="#000000" BORDER=0>
  23.     <TR>
  24.         <TD BGCOLOR="#000000" ALIGN=CENTER VALIGN=TOP WIDTH=170>
  25.             <BR>
  26.             <IMG SRC="../images/btslarge.jpg" HEIGHT=119 WIDTH=171  ALT="Behind the Scenes at Exploration Air" BORDER=0></A>
  27.             <BR>
  28.             <BR>
  29.             <BR>
  30.             <!--BACK BUTTON AND VARIABLE TO RETURN TO ORIGINATING PAGE-->
  31.             <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>"><IMG SRC="../images/barrowy.gif" HEIGHT=8 WIDTH=8 ALT="Return to Previous Page" BORDER=0></A>
  32.              <FONT SIZE=2 FACE="VERDANA, ARIAL, HELVETICA"><STRONG>
  33.             <A HREF="<%=Request.ServerVariables("HTTP_REFERER")%>">
  34.             B  A  C  K </A>
  35.             </STRONG></FONT>
  36.             <BR> 
  37.             <BR>
  38.             <!--JAVASCRIPT TO VIEW PAGE'S SOURCE CODE-->
  39.             <A HREF="JavaScript:openWindow('../SiteAdmin/Default.asp')">View Source</A>
  40.             <BR>
  41.         </TD>
  42.  
  43.         <TD BGCOLOR="#FFFFFF" BACKGROUND="../images/btsbg.gif" VALIGN=top>
  44.             <BR CLEAR=ALL>
  45.             <TABLE WIDTH="100%" CELLPADDING=10 CELLSPACING=0 BORDER=0>   
  46.                 <TR>
  47.                     <TD VALIGN=top>
  48.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" COLOR="#0000FF" SIZE=5>How The Site Administration Page Works</FONT>
  49.                         <HR>
  50.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="2">
  51.                         <H2>Functional Overview</H2>
  52.                         The Site Administration page allows an administrator to set security properties for the Exploration Air sample site.
  53.                         The possible settings relate to authentication and use of the Secure Sockets Layer protocol (SSL). 
  54.                         <P>
  55.                         Changes are made by simply filling out a form and the results are posted back to <STRONG>default.asp</STRONG> 
  56.                         where the form data is analyzed and used to set the properties.
  57.                         <P>
  58.                         Four areas of the site are affected:
  59.                         <DIR>
  60.                             <LI>Site Administration</LI>
  61.                             <LI>Benefits</LI>
  62.                             <LI>Frequent Flyer</LI>
  63.                             <LI>Business Partners</LI>
  64.                         </DIR>
  65.  
  66.                         Site Administration and Benefits are affected as one administrative unit as they are both intranet scenarios. 
  67.                         The only setting is whether anonymous access is allowed or not. By default the site should use 
  68.                         Windows NT Challenge/Response authentication as it is the most secure.
  69.                         <P>
  70.                         As Frequent Flyer and Business Partners are Internet scenarios some form of privacy, tamper resistance
  71.                         and/or authentication is required. Internet Information Server support these features by using SSL. 
  72.                         SSL supports privacy through data encryption, tamper resistance through message digests and authentication
  73.                         using certificates. The following table explains this in greater detail:
  74.                         <P>
  75.                         <CENTER>
  76.                         <TABLE ALIGN=CENTER BORDER=1 CELLPADDING=5 WIDTH=90%>
  77.                             <TR>
  78.                                 <TH BGCOLOR="#C0C0C0">SSL Feature</TH>
  79.                                 <TH BGCOLOR="#C0C0C0">Comment</TH>
  80.                             </TR>
  81.                             <TR>
  82.                                 <TD ALIGN=CENTER><I>Privacy</I></TD>
  83.                                 <TD>
  84.                                     SSL supports automatic data encryption. Scrambling the data as it passes between the browser and the
  85.                                     server reduces the possibility of an eavesdropper working out what is being sent.
  86.                                 </TD>
  87.                             </TR>
  88.                             <TR>
  89.                                 <TD ALIGN=CENTER><I>Tamper Resistance</I></TD>
  90.                                 <TD>
  91.                                     SSL supports tamper resistance by using message digests. A message digest is a complex checksum of the
  92.                                     data. SSL generates a message digest of the data prior to sending, then recalculates the message digest
  93.                                     of the data on reciept. If the data has change (through tampering or communication failure), 
  94.                                     the checksum will be different and SSL will reject the data.
  95.                                 </TD>
  96.                             </TR>
  97.                             <TR>
  98.                                 <TD ALIGN=CENTER><I>Authentication</I></TD>
  99.                                 <TD>
  100.                                     SSL can verify a server using Server Certificates and can verify a client using 
  101.                                     Client Authentication Certificates. Servers and clients are issued certificates by a certificate 
  102.                                     authority. Microsoft Certificate Server can behave as a certificate authority.
  103.                                 </TD>
  104.                             </TR>
  105.                         </TABLE>
  106.                         </CENTER>
  107.  
  108.                         <H2>Components Used</H2>
  109.                         The Active Directory Service API (ADSI) is used as the primary programmatic administration interface for Internet
  110.                         Information Server. With ADSI most aspects of an IIS server can administered programmatically.
  111.                         <P>
  112.                         Use the following syntax to access the IIS ADSI object from an ASP page, VBScript or JScript:
  113.                         <P>
  114.                         <CENTER><STRONG>Set oAdminDir = GetObject("IIS://localhost/w3svc/1/Root/IISSamples/ExAir/SiteAdmin")</STRONG></CENTER>
  115.                         <P>
  116.                         Once we have the object properties may be set. For example use the folloing code 
  117.                         to set the <STRONG>SSL Client Certificate Required</STRONG> flag on the SiteAdmin object:
  118.                         <P>
  119.                         <CENTER><STRONG>oAdminDir.AccessSSLFlags = ACCESS_SSL + ACCESS_SSL_REQUIRE_CERT</STRONG></CENTER>
  120.                         <P>
  121.                         <H3>A Note On Security</H3>
  122.                         A user must have administrator privileges to access the administration data. This is why the SiteAdmin 
  123.                         directory is marked as requiring Windows NT Challenge/Response Authentication, if the user is a Windows NT 
  124.                         administrator then this authentication method will preserve their credentials and hence they will be able to access
  125.                         the administration data. If Allow Anonymous is turned on then all access will be attempted as though the user
  126.                         was a member of the Guest group, in other words they will be always be denied access because IIS is 
  127.                         logging them on as a guest, not an administrator.
  128.                         <H3>Delegation of User Credentials</H3>
  129.                         Windows NT 3.x and 4.0 do not support credential delegation, in other words you cannot pass the authentication
  130.                         information (called a token) from one application to another. This raises an interesting situation when running
  131.                         out-of-process Web applications (marked as running in a separate address space) in IIS.
  132.                         <P>
  133.                         If an administrator accesses an IIS Web application and is authenticated using Windows NT Challenge/Response Authentication 
  134.                         but the application is marked as running in a separate address space the new Web application will not be running with
  135.                         the same administrator privileges as the user because IIS cannot pass (delegate) the administrator's credentials
  136.                         to the new process. The side effect of this is that if the IIS application is attempting to change IIS data 
  137.                         through ADSI it will always fail. The correct way to solve this problem is to make sure any Web application does
  138.                         not run as a separate process.
  139.                         <P>
  140.                         Please note, because delegation is not supported at present, IIS starts all out-of-process Web applications
  141.                         using the IWAM_<I>xxxxxxxx</I> Windows NT account which is added to Windows NT during setup. 
  142.                         </FONT>
  143.                     </TD>
  144.                 </TR>
  145.             </TABLE>
  146.             <!--END TOP TABLE HOLDING GRAPHIC, NAVIGATIONAL LINK, AND MAIN CONTENT-->
  147.             <BR>
  148.             <BR>
  149.  
  150.             <CENTER>
  151.             <!--BEGIN LEGAL INFORMATION-->
  152.             <TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
  153.                 <TR>
  154.                     <TD>
  155.                         <FONT FACE="VERDANA, ARIAL, HELVETICA" SIZE="1"><A HREF="../legal.htm">©1997 Microsoft Corporation. All rights reserved. Terms of Use.</A></FONT>
  156.                         <P>
  157.                     </TD>
  158.                 </TR>
  159.             </TABLE>
  160.             </CENTER>
  161.             <!--END LEGAL INFORMATION-->
  162.         </TD>
  163.     </TR>
  164. </TABLE>
  165.  
  166. </BODY>
  167. </HTML>
  168.  
  169. <SCRIPT LANGUAGE=JavaScript>
  170. function openWindow(SourceURL)
  171. {
  172.     // Set some defaults
  173.     width=450;
  174.     height=450;
  175.  
  176.     url = "code.asp?Source=" + SourceURL;
  177.     window.open(url,"Sample","resizable=yes,scrollbars=yes,width=" + width + ",height=" + height);
  178. }
  179. </SCRIPT>
  180.