java - Get username of client who connected to web server -


here's scenario. code running on web server in ad domain. client has connected me. how client's username, without having client fill out form in browser? must use java technologies on web server side.

edit:

i ended using spring security negotiate filter described @ below link. there tutorial available. using request.getprincipal().getname() within servlet gives username.

http://waffle.codeplex.com/

you need set spring security kerberos extension - out of box way you're describing in spring security 3. supports spnego negotiation, requires amount of setup on server (and knowledge of how spnego , kerberos works).

there's not documentation - mike's sample applications ships 1.0m2 great, , cover of common scenarios, including automated spnego authentication.

the key thing spnego set custom authenticationentrypoint - you'll need custom spring bean follows:

<bean id="kerbentrypoint" class="org.springframework.security.extensions.kerberos.web.spnegoentrypoint" />  <bean id="kerbauthenticationprocessingfilter" class="org.springframework.security.extensions.kerberos.web.spnegoauthenticationprocessingfilter">     <property name="authenticationmanager" ref="authenticationmanager" /> </bean> 

... there more beans that'll required besides these (again, refer samples w/the kerberos extension). post if further along spring security or if want exact details (since there number of beans / config bits involved, knowledge of configuration helpful, such whether using <http> namespace style or not).

other option, have set similar type of spnego auth (such using waffle, suggest) - other questions cover pretty well.

finally, possibly front tomcat web server supports spnego or ntlm better, such microsoft iis or apache web server mod_spnego.

hopefully 1 of these ideas work you!


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -