On Tue, Nov 5, 2013 at 3:33 AM, soni <xs.s...@gmail.com> wrote:
> Dear Sir,
> I have also tried with monitoring extension.all information is
> coming like remote IP,host IP,service which by client,resources used by
> client,start time,end time etc... except user name.I have followed the
> following url.
>
> http://docs.geoserver.org/stable/en/user/extensions/monitoring/installation.html
> .
>
> as per the documentation I have used code for content.ftl file which is
> given below.
>
The user should be in the RemoteUser tag. I have no idea why it's not coming
out for you.
The code injecting the user for logging is in the MonitorFilter class,
looks as follows:
if (SecurityContextHolder.getContext() != null
&& SecurityContextHolder.getContext().getAuthentication()
!= null) {
Authentication auth =
SecurityContextHolder.getContext().getAuthentication();
if (auth.getPrincipal() != null && auth.getPrincipal()
instanceof User) {
data.setRemoteUser(((User)auth.getPrincipal()).getUsername());
}
}
Christian (cc'ed), any idea why an authenticated request might end up not
having
its user set in the request data (the "data" variable above)?
Soni, are you using HTTP basic authentication (the default) or some other
type
of authentication mechanism?
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users