Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Java 6 HttpURLConnection SPNEGO support

913339Jan 26 2012
I am trying to access a protected resource from a server that is setup for SPNEGO authentication.
On the client side I am logged on to the same domain and did all the required setup (at least I think so)
for getting the identity and tickets from the Windows cache.

When I access the resource from Internet Explorer everything works fine but when I try to access it
from Java 6 HttpURLConnection I still get HTTP 401 error although Java 6 HttpURLConnection should support SPNEGO.

If I attach by myself the "Negotiate..." header with the token that I build by myself I get the resource and HTTP 200
although I receive also a Negotiate header with a token of type 96 that I cannot pass it to initSecContext as stated
in SPNEGO RFC that I should do.

I have two questions:

1. What should I do in order to use the built in SPNEGO support in Java 6 for HttpURLConnection when working
with tickets from Windows cache ?

2. What could be the reason that I receive on the last authentication leg on HTTP 200 a token that is not of type
context but application (value = 96) and cannot be used for fininshing the security context establishment ?

Thanks.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 23 2012
Added on Jan 26 2012
0 comments
525 views