Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Restful Web Service with Kerberos Authentication

Starting a new project to create a restful Web Service that requires callers to be Authenticated by Kerberos (Active Directory).

The web service will be hosted by Tomcat and I was planning to use JAX-RS with JAAS but I'm not finding much information on this, does anyone have information or experience on getting this to work?

Should I be looking at Spring and Spring Security instead?

like image 372
ServerMonkey Avatar asked Dec 01 '25 05:12

ServerMonkey


2 Answers

Apache provides good documentation for using JAXRS with kerberos. Here is the link:

http://cxf.apache.org/docs/jaxrs-kerberos.html

like image 129
Juned Ahsan Avatar answered Dec 03 '25 20:12

Juned Ahsan


I have the same issue. I googled extensively and not found a good answer.

The problem is that the issue has several layers and most answers point to (usually vague) solutions for only one layer.

And there is not a single complete and clear example for the end-to-end solution.

LAYERS

  1. Client call to rest service using kerberos/windows logged in credentials.
  • Answers usually show how to use kerberos to authenticate but fail to say how to use it to pass the logged in credentials to the REST service.
  • Both Spring REST client functionality and native Java seem capable of doing this but it is not clear how.
  1. Processing by the REST service of the authentication request by the client that is authenticating via windows/kerberos.
  • Spring REST service functionality appears to be the easiest way to implement it but again it is not clear how to tell the REST service to expect that authentication method.
  1. Either forwarding the client kerberos credentials to whatever resource the REST service is trying to access, or get a success/failure and then the REST service uses kerberos/windows authentication itself (different credentials from the clients) to access a resource.

I hope this clarification of the issue helps in producing a good answer.

like image 29
Bruno Genovese Avatar answered Dec 03 '25 22:12

Bruno Genovese



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!