File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes Rejected when authenticating to Sharepoint, but IWA works Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » Security
Reply Bookmark "Rejected when authenticating to Sharepoint, but IWA works" Watch "Rejected when authenticating to Sharepoint, but IWA works" New topic
Author

Rejected when authenticating to Sharepoint, but IWA works

Thomas Kennedy
Ranch Hand

Joined: Jan 20, 2008
Posts: 90
I have a Sharepoint site that I can open just fine through IE, via integrated Windows authentication, but which I cannot open through Java.





This just prints "Feeding username and password for ntlm" 10 times and then quits.

If I use a browser that isn't configured for IWA, such as Opera, I get prompted for my credentials and I get right in, using the credentials just as they appear in the code.

So why do my credentials get rejected when I supply them programmatically?


Costs matter. Justice lies in processes not outcomes. Crime is caused by criminals.
Pat Gonzalez
Greenhorn

Joined: Oct 18, 2009
Posts: 19

I'm sure you've read these already but it might be worth looking at it again:

http://java.sun.com/javase/6/docs/technotes/guides/net/http-auth.html

and

http://spnego.sourceforge.net/pre_flight.html

Thomas Kennedy
Ranch Hand

Joined: Jan 20, 2008
Posts: 90
Oh I read them all right. Understanding all of what I read is another matter.

As it happens, if I use the IP address it works fine. So my guess is that something between me and the dns is screwing it up. Like the load balancer doesn't like my using the application port, assuming everyone uses port 80, something like that. It would not surprise me overmuch: I'm more or less sure I'm the first person ever to try to read the Sharepoint data programmatically, as it's a pretty new environment.
 
 
subject: Rejected when authenticating to Sharepoint, but IWA works
 
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture