Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fake Active Directory?

I am developing an application in C# that needs to authenticate against Active Directory. I have Windows 7 and can't install Active Directory locally. I don't have access to an existing server with Active Directory (except through ten steps connecting to a VPN). I would rather not create a virtual machine to run Windows Server. Is there anything out there that might run in memory and intercept AD calls to return faked data? If it doesn't exist already, what would it take, theoretically, to pull this off?

like image 726
Byron Sommardahl Avatar asked Sep 10 '12 14:09

Byron Sommardahl


1 Answers

I think your best solution is to install virtual server for development. I would not recommend joining your workstation to a domain inside your workstation, but you can use remote debugger to debug applications inside virtual machine. Just make a network share on your guest and then configure your debug project to output the build into this directory. Then in Debug tab or project properties specify "Use remote machine" and you will be able to debug right there. You might need to create a local administrator account with the same name and password as your host to enable seemless authentication. In such configuration debugging in virtual guest system is not much different than debugging locally.

If you only need such a thing for unit testing, or need to unbind from AD for unit testing, another answer about mocking would be logical approach.

I guess that creating a full-blown fake implementation of AD is meaningless.

like image 83
aiodintsov Avatar answered Oct 12 '22 23:10

aiodintsov