I am trying to use Digest authentification in Geoserver. But when I send a Curl request I get the 401 error.

I followed this tutorial : http://docs.geoserver.org/stable/en/user/security/tutorials/digest/index.html

Here is the request:

curl --digest -v -u admin:password -G "localhost:8080/geoserver/wms?REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS"
*   Trying
* Connected to localhost ( port 8080 (#0)
* Server auth using Digest with user 'admin'
> GET /geoserver/wms?REQUEST=GetCapabilities&VERSION=1.1.1&SERVICE=WMS HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.47.0
> Accept: */*
< HTTP/1.1 401
< X-Frame-Options: SAMEORIGIN
< WWW-Authenticate: Basic realm="GeoServer Realm"
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 1102
< Date: Sun, 13 May 2018 21:22:34 GMT
<!DOCTYPE html><html><head><title>Apache Tomcat/8.5.5 - Error report</title><style type="text/css">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;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 401 - Full authentication is required to access this resource</h1><div class="line"></div><p><b>type</b> Status report</p><p><b>message</b> <u>Full authentication is required to access this resource</u></p><p><b>description</b> <u>This request requires HTTP auth* Connection #0 to host localhost left intact entication.</u></p><hr class="line"><h3>Apache Tomcat/8.5.5</h3></body></html>

I am using Geoserver v2.13

  • please look in the log file and add any error messages to your question
    – Ian Turton
    May 14, 2018 at 7:49
  • Actually The only thing related to this in the log file is this 2018-05-14 20:08:10,287 INFO [geoserver.wms] - Request: getServiceInfo
    – Jas Mine
    May 14, 2018 at 20:17
  • you may need to turn the logging level up to developer to see anything interesting
    – Ian Turton
    May 15, 2018 at 6:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.