[Geoserver-users] Geo server log issue

Dear Sir,
I have given LayerPreview Authentication for WFS(*) and try to access the services which is provided by WFS then its asking for authentication which is working fine but still not getting the user login information in log file.
Here I am attaching the
(1) Complete log information which is generated by geoserver.

(2) Complete log information which is generated by default under logs
(3) Complete log information which is generated after installing monitoring plugin.

(4)header.ftl

(5)content.ftl

(6)footer.ftl

Please help me to solve the issue.waiting for reply.

Thanks and Regards

Rakesh Kumar Sharma

carlo cancellieri wrote:

2013_10_23.request.log (35 KB)

content.ftl (1.16 KB)

footer.ftl (11 Bytes)

geoserver.log (834 KB)

geoserver_audit_20131023_0.log (14.3 KB)

header.ftl (53 Bytes)

monitor.properties (1.33 KB)

···

2013/10/22 Rakesh Kumar Sharma <rakesh_ks@anonymised.com>

Dear Sir,
As per your instruction I have set authrntication rule for layer.Now its asking for username/password for desired user but still not able to record out the username of that geoserver user in that log file.wating for your reply

Thanks and Regards
Rakesh

Kumar,
as default LayerPreview does not ask for user authentication since all the layer are configured for free access.
looking at the documentation I see:

Remote user The username specified parsed of the request. Only available when request included credentials for authentication. String

This probably means that you have to force your client to use authentication on layer request.

Try to setup authentication rules for some layer forcing authorization requests:
http://docs.geoserver.org/stable/en/user/security/layer.html

This should add credentials to the request.

Cheers,
Carlo

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


2013/10/21 Rakesh Kumar Sharma <rakesh_ks@…5931…>

Dear sir,
Waiting for your reply…

Thanks and Regards
Rakesh

Rakesh Kumar Sharma wrote:

Dear carlo cancellieri,

yes, I have configured through audit mode only .I am able to get all the information like StartTime, EndTime,TotalTime,RemoteAddr,RemoteHost,Host name but only RemoteUser details is not coming.
I have already included the following line in content.ftl file
${remoteUser!“”}.

Thanks and Regards
Rakesh

carlo cancellieri wrote:

Kumar,

How did you configured it?
I suggest to configure it in audit mode, take a look here:
http://docs.geoserver.org/stable/en/user/extensions/monitoring/audit.html#log-files
Cheers,
Carlo

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Rakesh,

seems that the client is not adding the User key to the request:

Try using curl to manually setup a call f.e.:

curl -v -u ${USERNAME}:${PASS} -XGET -H “REMOTE_USER: ${USERNAME}” ${HOST}/geoserver/sf/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=sf:streams&maxFeatures=50&outputFormat=json

Remember to substitute the ${…} with appropriate values

Let me know.

Cheers,
Carlo

···

2013/10/23 Rakesh Sharma <rakesh.cs.jsr@anonymised.com.84…>

Dear Sir,
I have given LayerPreview Authentication for WFS(*) and try to access the services which is provided by WFS then its asking for authentication which is working fine but still not getting the user login information in log file.
Here I am attaching the
(1) Complete log information which is generated by geoserver.

(2) Complete log information which is generated by default under logs
(3) Complete log information which is generated after installing monitoring plugin.

(4)header.ftl

(5)content.ftl

(6)footer.ftl

Please help me to solve the issue.waiting for reply.

Thanks and Regards

Rakesh Kumar Sharma

carlo cancellieri wrote:

Rakesh,
could you attach the complete Request dump (headers, request, etc…)? I’d like to verify if LayerPreviews attach the user information to the request.
Cheers,
Carlo

PS: keep the List in CC, in the case some other people may want to participate.

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


2013/10/22 Rakesh Kumar Sharma <rakesh_ks@anonymised.com>

Dear Sir,
As per your instruction I have set authrntication rule for layer.Now its asking for username/password for desired user but still not able to record out the username of that geoserver user in that log file.wating for your reply

Thanks and Regards
Rakesh

Kumar,
as default LayerPreview does not ask for user authentication since all the layer are configured for free access.
looking at the documentation I see:

Remote user The username specified parsed of the request. Only available when request included credentials for authentication. String

This probably means that you have to force your client to use authentication on layer request.

Try to setup authentication rules for some layer forcing authorization requests:
http://docs.geoserver.org/stable/en/user/security/layer.html

This should add credentials to the request.

Cheers,
Carlo

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


2013/10/21 Rakesh Kumar Sharma <rakesh_ks@…5931…>

Dear sir,
Waiting for your reply…

Thanks and Regards
Rakesh

Rakesh Kumar Sharma wrote:

Dear carlo cancellieri,

yes, I have configured through audit mode only .I am able to get all the information like StartTime, EndTime,TotalTime,RemoteAddr,RemoteHost,Host name but only RemoteUser details is not coming.
I have already included the following line in content.ftl file
${remoteUser!“”}.

Thanks and Regards
Rakesh

carlo cancellieri wrote:

Kumar,

How did you configured it?
I suggest to configure it in audit mode, take a look here:
http://docs.geoserver.org/stable/en/user/extensions/monitoring/audit.html#log-files
Cheers,
Carlo

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Rakesh,
It’s a command line utility take a look here:
http://docs.geoserver.org/stable/en/user/rest/examples/curl.html

Or you can also use Poster which is a browser plugin (available for android, firefox, chrome, …)
https://addons.mozilla.org/En-us/firefox/addon/poster/

Cheers,
Carlo

···

2013/10/24 Rakesh Sharma <rakesh.cs.jsr@anonymised.com>

Sir how to manually setup a call through curl in geoserver.at which location/file I need to put these script.

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Thu, Oct 24, 2013 at 4:01 PM, carlo cancellieri <carlo.cancellieri@anonymised.com> wrote:

Rakesh,

seems that the client is not adding the User key to the request:

Try using curl to manually setup a call f.e.:

curl -v -u ${USERNAME}:${PASS} -XGET -H “REMOTE_USER: ${USERNAME}” ${HOST}/geoserver/sf/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=sf:streams&maxFeatures=50&outputFormat=json

Remember to substitute the ${…} with appropriate values

Let me know.

Cheers,
Carlo

2013/10/23 Rakesh Sharma <rakesh.cs.jsr@anonymised.com.84…>

Dear Sir,
I have given LayerPreview Authentication for WFS(*) and try to access the services which is provided by WFS then its asking for authentication which is working fine but still not getting the user login information in log file.
Here I am attaching the
(1) Complete log information which is generated by geoserver.

(2) Complete log information which is generated by default under logs
(3) Complete log information which is generated after installing monitoring plugin.

(4)header.ftl

(5)content.ftl

(6)footer.ftl

Please help me to solve the issue.waiting for reply.

Thanks and Regards

Rakesh Kumar Sharma

carlo cancellieri wrote:

Rakesh,
could you attach the complete Request dump (headers, request, etc…)? I’d like to verify if LayerPreviews attach the user information to the request.
Cheers,
Carlo

PS: keep the List in CC, in the case some other people may want to participate.

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


2013/10/22 Rakesh Kumar Sharma <rakesh_ks@anonymised.com>

Dear Sir,
As per your instruction I have set authrntication rule for layer.Now its asking for username/password for desired user but still not able to record out the username of that geoserver user in that log file.wating for your reply

Thanks and Regards
Rakesh

Kumar,
as default LayerPreview does not ask for user authentication since all the layer are configured for free access.
looking at the documentation I see:

Remote user The username specified parsed of the request. Only available when request included credentials for authentication. String

This probably means that you have to force your client to use authentication on layer request.

Try to setup authentication rules for some layer forcing authorization requests:
http://docs.geoserver.org/stable/en/user/security/layer.html

This should add credentials to the request.

Cheers,
Carlo

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


2013/10/21 Rakesh Kumar Sharma <rakesh_ks@…5931…>

Dear sir,
Waiting for your reply…

Thanks and Regards
Rakesh

Rakesh Kumar Sharma wrote:

Dear carlo cancellieri,

yes, I have configured through audit mode only .I am able to get all the information like StartTime, EndTime,TotalTime,RemoteAddr,RemoteHost,Host name but only RemoteUser details is not coming.
I have already included the following line in content.ftl file
${remoteUser!“”}.

Thanks and Regards
Rakesh

carlo cancellieri wrote:

Kumar,

How did you configured it?
I suggest to configure it in audit mode, take a look here:
http://docs.geoserver.org/stable/en/user/extensions/monitoring/audit.html#log-files
Cheers,
Carlo

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Dott. Carlo Cancellieri
@cancellieric
Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
mobile: +39 3371094494
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it