Hi Pablo

GeoServer uses Spring Security for Digest Authentication. I had some
similar Problems and a solution may be to update Spring Security.
Unfortunately, this breaks other Authentication mechanisms.

A better Idea would be to use Basic Auth in combination with SSL. Do you
have this possibility ?.

Cheers
Christian



On Mon, Dec 7, 2015 at 12:35 AM, pablo zader <pza...@gmail.com> wrote:

> Hi list
>
> I want use digest authentication with Curl, but not working.  I followed
> the steps outlined here
>
>
> http://docs.geoserver.org/2.5.x/en/user/security/tutorials/digest/index.html
>
>
> to configure security in geoserver digest.
>
> I am using geoserver 2.5.2
>
> *Here the request with digest authentication:*
>
> curl --digest -v -u admin:geoserver -XPUT -H 'Content-type: image/tiff'
> --data-binary @/home/pablo/mytiff.tif
> http://localhost:8080/geoserver/rest/workspaces/tiger/coveragestores/nbr/file.geotiff
> * About to connect() to localhost port 8080 (#0)
> *   Trying 127.0.0.1... connected
> * Server auth using Digest with user 'admin'
> > PUT /geoserver/rest/workspaces/tiger/coveragestores/nbr/file.geotiff
> HTTP/1.1
> > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
> OpenSSL/1.0.1 zlib/1.2.7 libidn/1.23 librtmp/2.3
> > Host: localhost:8080
> > Accept: */*
> > Content-type: image/tiff
> > Content-Length: 0
> >
> < HTTP/1.1 401 No Autorizado
> < Server: Apache-Coyote/1.1
> < WWW-Authenticate: Basic realm="GeoServer Realm"
> < Content-Type: text/html;charset=utf-8
> < Content-Length: 1134
> < Date: Sun, 06 Dec 2015 23:28:36 GMT
> <
> <html><head><title>Apache Tomcat/6.0.35 - Informe de
> Error</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
> H2
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
> H3
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
> BODY
> {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> P
> {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
> {color : black;}A.name {color : black;}HR {color : #525D76;}--></style>
> </head><body><h1>Estado HTTP 401 - Full authentication is required to
> access this resource</h1><HR size="1" noshade="noshade"><p><b>type</b>
> Informe de estado</p><p><b>mensaje</b> <u>Full authentication is required
> to access this resource</u></p><p><b>descripción</b> <u>Este requerimiento
> requiere autenticación HTTP (Full authentication is requir* Connection #0
> to host localhost
> left intact
> * Closing connection #0
> ed to access this resource).</u></p><HR size="1"
> noshade="noshade"><h3>Apache Tomcat/6.0.35</h3></body></html>
>
>
> *Here the request with basic authentication:*
>
>  curl --basic -v -u admin:geoserver -XPUT -H 'Content-type: image/tiff'
> --data-binary @/home/pablo/mytiff.tif
> http://localhost:8080/geoserver/rest/workspaces/tiger/coveragestores/nbr/file.geotiff
> * About to connect() to localhost port 8080 (#0)
> *   Trying 127.0.0.1... connected
> * Server auth using Basic with user 'admin'
> > PUT /geoserver/rest/workspaces/tiger/coveragestores/nbr/file.geotiff
> HTTP/1.1
> > Authorization: Basic YWRtaW46Z2Vvc2VydmVy
> > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0
> OpenSSL/1.0.1 zlib/1.2.7 libidn/1.23 librtmp/2.3
> > Host: localhost:8080
> > Accept: */*
> > Content-type: image/tiff
> > Content-Length: 259826
> > Expect: 100-continue
> >
> < HTTP/1.1 100 Continue
> < HTTP/1.1 201 Creado
> < Date: Sun, 06 Dec 2015 23:34:51 GMT
> < Server: Noelios-Restlet-Engine/1.0..8
> < Content-Type: application/xml
> < Transfer-Encoding: chunked
> <
> <coverageStore>
>   <name>nbr</name>
>   <type>GeoTIFF</type>
>   <enabled>true</enabled>
>   <workspace>
>     <name>tiger</name>
>     <href>http://localhost:8080/geoserver/rest/workspaces/tiger.xml</href>
>   </workspace>
>   <__default>false</__default>
>   <url>file:data/tiger/nbr/nbr.geotiff</url>
>   <coverages>
>     <atom:link xmlns:atom="http://www.w3.org/2005/Atom"; rel="alternate"
> href="
> http://localhost:8080/geoserver/rest/workspaces/tiger/coveragestores/nbr/file/coverages.xml";
> type="application/xml"/>
>   </coverages>
> * Connection #0 to host localhost left intact
> * Closing connection #0
>
> Thanks in advanced
>
> Pablo
>
>
> ------------------------------------------------------------------------------
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple
> OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>


-- 
DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH
------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to