Skip to main content

Isi Odiase's blog

Go Search
Isi Odiase's blog
  

Blog for Henry Isibor Odiase
ASP.Net Authentication matrix
 
reproduced here
 

Summary: This document provides tables that illustrate, for a range of IIS authentication settings, the resultant identity that is obtained from each of the variables that maintain an IPrincipal and/or IIdentity object. (4 printed pages)

Principal objects implement the IPrincipal interface and represent the security context of the user on whose behalf the code is running. The principal object includes the user's identity (as a contained IIdentity object) and any roles to which the user belongs.

ASP.NET provides the following principal and identity object implementations:

  • WindowsPrincipal and WindowsIdentity objects represent users who have been authenticated with Windows authentication. With these objects, the role list is automatically obtained from the set of Windows groups to which the Windows user belongs.
  • GenericPrincipal and GenericIdentity objects represent users who have been authenticated using Forms authentication or other custom authentication mechanisms. With these objects, the role list is obtained in a custom manner, typically from a database.
  • FormsIdentity and PassportIdentity objects represent users who have been authenticated with Forms and Passport authentication respectively.

The following tables illustrate, for a range of IIS authentication settings, the resultant identity that is obtained from each of the variables that maintain an IPrincipal and/or IIdentity object. The following abbreviations are used in the table:

  • HttpContext = HttpContext.Current.User, which returns an IPrincipal object that contains security information for the current Web request. This is the authenticated Web client.
  • WindowsIdentity = WindowsIdentity.GetCurrent(), which returns the identity of the security context of the currently executing Win32 thread.
  • Thread = Thread.CurrentPrincipal which returns the principal of the currently executing .NET thread which rides on top of the Win32 thread.
Note   With IIS 6.0 running on Windows Server 2003, the identity Matrix works except that the Machine\ASPNET identity is replaced with NT Authority\Network Service.

Table 1. IIS anonymous authentication

Web.config Settings Variable Location Resultant Identity
<identity impersonate="true"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
-
MACHINE\IUSR_MACHINE
-
<identity impersonate="false"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
-
MACHINE\ASPNET
-
<identity impersonate="true"/>
<authentication mode="Forms" />
HttpContext
WindowsIdentity
Thread
Name provided by user
MACHINE\IUSR_MACHINE
Name provided by user
<identity impersonate="false"/>
<authentication mode="Forms" />
HttpContext
WindowsIdentity
Thread
Name provided by user
MACHINE\ASPNET
Name provided by user

Table 2. IIS basic authentication

Web.config Settings Variable Location Resultant Identity
<identity impersonate="true"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
Domain\UserName
Domain\UserName
Domain\UserName
<identity impersonate="false"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
Domain\UserName
MACHINE\ASPNET
Domain\UserName
<identity impersonate="true"/>
<authentication mode="Forms" />
HttpContext
WindowsIdentity
Thread
Name provided by user
Domain\UserName
Name provided by user
<identity impersonate="false"/>
<authentication mode="Forms" />
HttpContext
WindowsIdentity
Thread
Name provided by user
MACHINE\ASPNET
Name provided by user

Table 3. IIS digest authentication

Web.config Settings Variable Location Resultant Identity
<identity impersonate="true"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
Domain\UserName
Domain\UserName
Domain\UserName
<identity impersonate="false"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
Domain\UserName
MACHINE\ASPNET
Domain\UserName
<identity impersonate="true"/>
<authentication mode="Forms" />
HttpContext
WindowsIdentity
Thread
Name provided by user
Domain\UserName
Name provided by user
<identity impersonate="false"/>
<authentication mode="Forms" />
HttpContext
WindowsIdentity
Thread
Name provided by user
MACHINE\ASPNET
Name provided by user

Table 4: IIS integrated Windows

Web.config Settings Variable Location Resultant Identity
<identity impersonate="true"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
Domain\UserName
Domain\UserName
Domain\UserName
<identity impersonate="false"/>
<authentication mode="Windows" />
HttpContext
WindowsIdentity
Thread
Domain\UserName
MACHINE\ASPNET
Domain\UserName
<identity impersonate="true"/>
<authentication mode="Forms" />
HttpContext
WindowsIdentity
Thread
Name provided by user
Domain\UserName
Name provided by user
<identity impersonate="false"/>
<authentication mode="Forms" />
HttpContext. WindowsIdentity
Thread
Name provided by user
MACHINE\ASPNET
Name provided by user

Sidebar on S2008

I have had to do this a couple of times so I will put the procedure here for easy retrieval.

"C:\Program Files\Windows Sidebar\sidebar.exe" /RegServer

regsvr32 "C:\Program Files\Windows Sidebar\sbdrop.dll"

regsvr32 "C:\Program Files\Windows Sidebar\wlsrvc.dll"

copy HKLM/Software/Microsoft/Windows/CurrentVersion/SideBar registry info from Vista and run it on Server 2008.

Run "C:\Program Files\Windows Sidebar\sidebar.exe"

obviously, the Vista and S2008 versions must match - 32bit/64bit

Vary drive letters according to the dive the system files are located on.

I also found that some gadgets did not work if my S2008 was not on C:

Sharepoint v3 incoming e-mail settings
Setting up MOSS or wss3 to add content to lists via email can be very easy or very difficult depending on the server/farm set up. There are many variables in setting up service accounts and application pools and the wrong choices can make setting up email to add content difficult because of permissions. There is no logging to speak of to help matters either.
 
That was not the issue today though when I set up a demo lab. To keep things lightweight I used the free email server hMailServer. This meant that after incoming e-mail enabling in Central Administration, when I went to do the list itself I got a cryptic "Error in the application" message.  It turned out to be because I had elected to use SharePoint Directory Management Service to create distribution groups and contacts and I had not installed Exchange, the AD schema was not extended to provide the right fields to automatically create objects in the Contacts OU I had created. Since it is a lab and does not need email from outside the domain, I chose not to use the SharePoint Directory Management Service and all became good.
Last week's weather

A few inches of snow and you would have thought it was the Apocalypse here in England. This is what greeted me when I emerged from my front door last Monday. What a lovely Xmas it would have been if this was 6 weeks earlier.

P1000038

P1000042

MOSS2007 and WSS3 limits

 

Most of the limits in SharePoint are soft limits. In other words, you may exceed the limits, but in most cases you will see significant performance degradation. Some of the recommendations are as below:

Site Collection

50,000 per website

Sub site

2000 per top level site collection

Documents

10 million per document library

This is a very arguable limit. This depends on the document size, and what specifically are you doing with the document. For instance, if you are checking-in, out and versioning – this limit is a lot lower.

Also, no view must return more than 2000 documents unless you create logical indexes on certain columns, in which case you can go to about 20,000 documents per view.

Items

2000 per view

As mentioned above, no view must return more than 2000 documents unless you create logical indexes on certain columns, in which case you can go to about 20,000 documents per view. This limit is common to lists and document libraries.

Document File Size

50MB recommended, no more than 2Gb ever.

Anything greater than 2GB will error out. Anything greater than 50MB will severely negatively impact your database performance. Larger artifacts should be stored in a separate site in a separate content database on a separate spindle in the database server.

Lists

No more than 2000 lists per site

In this case, Lists = Lists + document libraries. If you have 2000 of these in one site, the navigation will become extremely clumsy, so in most cases you wouldn’t hit this limit.

Field Type

256 per list

No more than 256 fields in a list should be used. Crossing this limit causes severe performance degradation. Instead, you should use linked fields instead.

Web Parts

50 per page

This is again a very arguable limit. SharePoint webparts out of the box unfortunately do not support asynchronous loading. It is possible to introduce this behavior by modifying the aspx page, but it requires developer intervention. You will note that page load times increase exponentially as the number of webparts on a page increase. This also depends on the complexity of the webpart. You should leverage AJAX for pages with a lot of webparts.

Users

No more than 2 million per website

Also note, if the profile import of a user is too wide, this limit significantly affects both the shared service provider database, and the content database.

Number of SSPs in a farm

No more than 20. Recommended maximum = 3.

Number of websites per SSP

99

Number of sites per content DB

Less than 50,000

Number of content databases

100 per web application.

Number of search indexes

No more than 20 per farm, no more than one per SSP.

Index propagation becomes horribly complex as a large number of SSPs are added. To avoid this scenario, you should leverage scoped searches instead.

Content sources and start addresses

500 hard limit

Alerts

1 million alerts on a site

Your SMTP server will probably choke a long time before you hit this limit.

Search scopes

Less than 200 per site

The Press and German about face

The German Finance Minister poured scorn on the UK's approach to the economic crisis last month - the VAT decrease, the interest rate cuts and the soon to come quantitative easing. The UK press made much of it at the time. The same man has just proposed much the same thing in Germany and no word from the press.

I think a lot of the current problems are to do with the way the press reports issues. The financial journalists have tasted the limelight and won't easily let go and doom and gloom will continue to flow since it sells - just like some time ago you could not switch on the TV without seeing some home buying or home makeover programme. Hopefully the financial journalism bubble will burst soon and they will all be sent back to their back room cubicles to craft programmes and articles which will be aired late at night when every one else is asleep.

Let's have sanity.

Marking a disk as inactive

 

Open up a command prompt and type DISKPART.
Type LIST DISK
Type SELECT DISK n (where n is the number of the old Win98 drive)
Type LIST PARTITION
Type SELECT PARTITION n (where n is the number of the active partition you wish to make inactive)
Type INACTIVE
Type EXIT to exit DISKPART
Type EXIT again to exit the command prompt
Reboot

Windows 7

 

I tried the Windows 7 build handed out at the PDC so when the beta was released on Friday I downloaded and have installed it on my main workstation and laptop. I use virtual machines mainly to do stuff (I have XP, Server 2003 and Sever 2008 VMs)  so Windows 7 is just the general everyday things OS.

image

It is fair so far, obviously beta and hangs from time to time. The issues seem to be around the file system – copying and deleting files sometimes causes things to go wrong. IE8 also is not quite complete. They have to get these really right otherwise it will be the Vista story again. But all in all, I like it.

Bailout latest

In the US, the Fed has engaged Macdonald's to operate drive through bailouts for Banks after the latest for Citigroup so they don't have to wait in line.

1 - 10 Next