Site sponsored by: Idera Try Idera’s new SQL admin toolset
SQL Server Performance

  • Home
  • Articles
  • Forums
  • Tips
  • FAQ's
  • Blogs
  • Software
  • Books
  • About Us
RSS Feeds
Sign in | Join


Article Topics

All Articles
Peformance Tuning
Audit
Business Intelligence
Clustering
Reporting Services
Developer
General DBA
ASP.NET / ADO.NET

SQL Server 2008 - Worth the Wait

SQL Server’s first significant upgrade in three years features a number of envelope-pushing enhancements and improvements. Which will have the greatest impact on SQL administration and development? More...
Latest Articles

Slowly Changing Dimensions in SQL Server 2005
Audit Data Modifications
SQL Server 2008’s Management Data Warehouse
Same Report but Different Methods in SQL Server Reporting Services ...

More     
 
Latest FAQ's

SSIS Lookups are Case Sensitive
Convert Number to Words in SSRS
After installing SP2 on SQL Server 2005 x64, when trying to ...
Remote Name Could not be Resolved in SQL Server Reporting Services ...

More     
   
Latest Software Reviews

SQL Server DBA Dashboard
SwisSQL DBChangeManager
SQLMesh - SQL Server Search Tool
SoftTreeTech SQL Assistant

More     

articles >> general dba >> Kerberos Protocol Transition and Constrained Delegation ...

Kerberos Protocol Transition and Constrained Delegation

By : Brad McGehee
Jan 24, 2004
Printer friendly

That title’s quite a mouthful, huh! Let’s start by explaining what we’re actually trying to achieve here. Actually, before we start, let’s just say that this paper shows you how I implemented protocol transition and constrained delegation with SQL Server and IIS, and it is not intended to be an exhaustive study of the subject.

We were faced with a problem when developing a new application. In our application we wanted the user to go to an intranet site in order to be able to look up and edit passwords for service accounts, application accounts, and other privileged accounts. We wanted the website to then impersonate the user and connect to the database on their behalf. So instead of the application using SQL Authentication, or using it’s own service account to authenticate with, we wanted to delegate the authentication to the application so that it could log on as who ever logged on to the application.

Constrained delegation refers to the case where you only want to grant an application rights to impersonate users when asking for certain services, as opposed to all services. Protocol transitioning is a short way of saying that you don’t care how the user authenticated with the application. Instead, you will let the application use Kerberos to impersonate the user with another service.

Microsoft has written a great article about this concept, but it is a little hard going:

http://www.microsoft.com/technet/prodtechnol/windowsserver2003
/technologies/security/constdel.mspx
 

The steps that we took in order to implement the above are as follows:

1. Create a domain user account to run the SQL Server service (s-SQLServer).

 

2. Use Enterprise Manager to set the SQL Server service account to the above domain user.

 

3. Create a domain user account to run the IIS application pool (s-AppPool).

 

4. Create the Service Principal Names

- run setspn -A http/<website FQDN> s-AppPool
- run setspn -A MSSQLSvc/<sqlhost FQDN>:<port> s-SQLServer

<website FQDN> is the fully qualified domain name for the website, e.g. dev.mysite.company.local.

<sqlhost FQDN> is the fully qualified domain name for the sql server machine e.g. sql1.company.local.

<port> is the port that the SQL service runs on. If you are running a SQL cluster then you’ll have to register the MSSQLSvc spn both with and without the :<port>.

 

5. Use AD Users and Computers to set the delegation properties of s-AppPool

- Locate this user in Users and Computers

- Right click on the user and go to edit the properties (see fig 1)

- Click on the Delegation tab (which only appears if the setspn command has been run, and there is at least one spn still registered to that account)

- Select Trust this user for delegation to specified services only

- Click Add

- Look up the s-SQLServer account to find the MSSQLSvc spn

- Click on the MSSQLSvc spn

- Click Ok (so this is the constrained delegation bit done)

- Select Use any authentication protocol

- Click Ok (and this is the protocol transition feature)


Fig 1: sample account properties


    Next Page>>    








Home | Peformance Articles | Audit Articles | Business Intelligence Articles | Clustering Articles | Developer Articles | Reporting Services Articles | DBA Articles | ASP.NET / ADO.NET Articles | DBA FAQ's | Developer Peformance FAQ's | DBA Peformance FAQ's | Developer FAQ's | Clustering FAQ's | Error Messages | Audit Tool Reviews | Backup Tool Reviews | Coding Tool Reviews | Compare Tool Reviews | Documentation Tool Reviews | Design Tool Reviews | Monitoring Tool Reviews | Log Tool Reviews | Reporting Tool Reviews | Clustering Tool Reviews | Security Tool Reviews | Change Management Tool Reviews | Remote Access Tool Reviews | Book Reviews | Security Tool Reviews | QDPMA Performance Tuning | ADO.NET / ASP.NET | Administration | Analysis/OLAP Services | Application Development | Configuration | Components | ETL | Hardware | High Availability | Hints | Index | Misc | Operating Systems | Performance Tuning | Replication | T-SQL | Views