While migrating from SQL authentication (user-password) to integrated security I ran into an unexpected combination of requirements.
- SQL clients are services running under a LOCALSYSTEM or NETWORKSERVICE account
- SQL clients use integrated security to connect to the local SQL Server
- The system is in an AD domain.
- Database connections must be successfully established even when network connectivity to the domain controller is down for hours or days at a time.
On the luckier side, the SQL clients and SQL Server (2005 SP4) always run on the same box.
The conclusion of reading, experiments done so far and a support call to MS seems to have been that I cannot meet all these requirements at the same time, regardless of whether Kerberos or NTLM is used.
On the other hand I see some references to cached credentials that are giving me hopes that it might be possible to somehow connect to the database using cached credentials, under some conditions, following a previous successful domain login (service startup, or previously established connection).
Is anyone successfully using cached domain credentials to connect to a local SQL Server from a service running under a domain account, during prolonged DC outages? How is that configured? What are the security implications?
Are the four requirements above really incompatible?
1 Answer 1
Service accounts can't make use of cached credentials. Only interactive users can use cached credentials.
As everything is running on the same server, create local Windows accounts and setup the services to run under those local Windows accounts. Local accounts have no requirement that Active Directory actually be online.
-
This was the key bit of info I was missing. Can you please confirm my understanding? Suppose that I create a domain account that is allowed to log on interactively. Then credential caching will happen as configured when this user logs on as a normal user; but if I try to use the same account as a service logon account, such a service startup or database authentication will never result in caching the credentials in registry. Is that correct?Jirka Hanika– Jirka Hanika2012年06月04日 19:36:49 +00:00Commented Jun 4, 2012 at 19:36
-
@JirkaHanika No, when the service tries to start it'll throw an error message and the service won't start. When verifying if the account can login it won't be able to as there's no domain controller to verify against.mrdenny– mrdenny2012年06月04日 20:26:12 +00:00Commented Jun 4, 2012 at 20:26
-
I get that. But you are saying that when AD is online, the service can log on, but no credentials will be cached for later use, because this particular log on is not interactive. Correct?Jirka Hanika– Jirka Hanika2012年06月04日 20:30:11 +00:00Commented Jun 4, 2012 at 20:30
-
Correct, when services log on the credentials aren't cached, and when services start they don't use cached credentials.mrdenny– mrdenny2012年06月05日 13:07:52 +00:00Commented Jun 5, 2012 at 13:07
-
Thank you for the extra info. We will go the local account way and maybe even buy your book :-)Jirka Hanika– Jirka Hanika2012年06月05日 13:26:48 +00:00Commented Jun 5, 2012 at 13:26
Explore related questions
See similar questions with these tags.
NETWORK SERVICE
, would that solve the problem? That seems like a good thing to do security-wise anyway.