views:

42

answers:

2

Hello, I have a Windows 2008R2 based intranet server running a PHP based intranet application in IIS. We want to improve the intranet now and integrate data from external systems, for instance data retrieved from the Exchange web services or information from a Sharepoint webservice.

Log in for the users with their windows credentials works. And PHP running as FastCGI impersonates just fine.

The problem is now: I cannot access web services with Windows authentication passing the credentials of the logged on user.

I could not find anything related to that problem on the internet. Am I the only one in the world who wants to federate content from certain windows servers into an existing PHP application?

I know that I could do this in .NET easily... but I just cannot recreate the whole intranet application.

Any pointers would help me very much!

Thank you, Fabian

A: 

I've toyed with the windows authentication vs PHP a few years ago and I had to give up because of time shortage. However I think the only way to go here is to try to get stuff to kerberos, which (in case you don't know) is user by windows as authentication system.

PHP has a module for that. If you're able to obtain a valid token you should be able to connect to the webservices.

I have no experience further in this area myself so I'm sorry if this does not help you further.

Blizz
Thanks for the link. Although I don't think that this helps. It seems as if this module is related to Kerberos administration, not acquiring and forwarding Kerberos tokens.
Fabian Schulz
A: 

In the we services world, authentication / SSO is done with SAML. SAML is basically a specific flavour of SOAP messaging, so in theory the PHP SOAP extension should be abe to handle this, although I'd proceed with caution here because my experience with the PHP SOAP is that it's pretty buggy, very basic and badly documented. I found the following on Window Auth / SAML, not sure if this will work for you:

http://technet.microsoft.com/en-us/library/ff607753.aspx

Enjoy!

Robin
Thanks. But the main problem remains: I cannot use Windows authentication from PHP for some reason. I even tried CURL, but that doesn't seem to work either.Has anyone worked with CURL and Windows auth already? When I run in the identity of UserA - shouldn't I be able to authenticate with CURL with Windows auth without knowing UserA's password?
Fabian Schulz
In my opinion, the task you're looking to achieve is a very difficult one, I've never heard of anyone doing this before, and presumably you've Googled for existing code and come up blank. I think you're going to have to accept that you're pretty much on your own with this one, any solution that is possible is going to have to be implemented by yourself from the ground up.On the question you asked about CURL, I suspect you could get CURL to work, essentially SOAP/SAML is just XML over HTTP, the complexity lies in formatting and parsing the XML requests / responses.
Robin
Thanks Robin. I could not find a solution yet and I gave up.If anyone stumbles upon the same problem: My current workaround is to use an IFRAME where a .NET page is running and .NET has no problems using Windows Authentication. That's not nice and I have imagined to find a better solution, but I spent days and couldn't solve this.
Fabian Schulz