Reputation:
I am trying to set up a tomcat based intermediate server which will get delegated ticket from a java client and forward to a tomcat server/java server.
I have a tomcat servlet which handles delegated tickets. My issue is rather with the client
http://mydomain.example.com/examples/ is protected by a tomcat instance on a remote machine. in order to login I used :-
URL url = new URL("http://mydomain.example.com:8080/examples/"); InputStream ins = url.openConnection().getInputStream(); and then redirected the stream to a buffered reader.
However this method does not work for the delegated credential case.
Is there a flag or setting in urlconnection object? Is there another class(other than SpnegoHttpURLConnection that can acheive this ? )
Upvotes: 0
Views: 526
Reputation: 18405
Use Subject.doAs
and your URLConnection
will run in the security context of your delegated credential.
Upvotes: 1