Re: [Geoserver-users] Geoserver REST Reload with POST Request Returns ERROR 401 Full authentication is required to access this resource despite using admin user

2018-01-31 Thread Steve Omondi
​Hi,
​

> Are you using any specific configuration for the security system ?
>

​So, I'm runnning a number of non-default  configurations for my Geoserver;

The major configuration which has beena big problem is use of a different
Role Service (JDBC) as the Active Role Service -

This is a problem to GWC administration tasks like Seeding, truncate,
Configuration Reload since these require the Admin user found in default
role service.

Basically, It seems to me Geoserver and Integrated GWC can only work with
one Role Service at a time.
[image: Inline image 1]

Question...So I had Imagined creating the admin user in my JDBC Role
Service and delete the default Roles Service entirely but this is not
possible. Are these hardcoded somhow in Geoserver? Perhaps.

Kind regards,
Steve Omondi

On Thu, Jan 25, 2018 at 9:30 PM, Nuno Oliveira <
nuno.olive...@geo-solutions.it> wrote:

> Hi,
>
> Just did a quick test with a GeoServer 2.11.2 running inside a tomcat
> instance and everything worked as expected:
>
> curl -u 'admin:geoserver' -v --data-urlencode -POST 
> http://localhost:8080/geoserver/rest/reload
>
> *   Trying 127.0.0.1...
>
> * Connected to localhost (127.0.0.1) port 8080 (#0)
>
> * Server auth using Basic with user 'admin'
>
> > POST /geoserver/rest/reload HTTP/1.1
>
> > Host: localhost:8080
>
> > Authorization: Basic YWRtaW46Z2Vvc2VydmVy
>
> > User-Agent: curl/7.47.0
>
> > Accept: */*
>
> > Content-Length: 5
>
> > Content-Type: application/x-www-form-urlencoded
>
> >
>
> * upload completely sent off: 5 out of 5 bytes
>
> < HTTP/1.1 200 OK
>
> < Date: Thu, 25 Jan 2018 18:24:29 GMT
>
> < Server: Noelios-Restlet-Engine/1.0..8
>
> < Transfer-Encoding: chunked
>
> <
>
> * Connection #0 to host localhost left intact
>
> The error you are getting suggests indeed that you are using a login that
> doesn't have enough permissions to use
> that REST endpoint. I would double check that user configuration and give
> it a try with an administrator login.
>
> Are you using any specific configuration for the security system ?
>
> Kind regards,
>
> Nuno Oliveira
>
>
> On 01/25/2018 08:23 AM, Steve Omondi wrote:
>
> Hey guys,
> I'm trying to reload Geoserver configuration via a POST Request using CURL
> Utility but it fails with the following error;
>
> administrator@host:/media/config$ curl -u "admin:password" -v
> --data-urlencode -POST http://host:8380/geoserver/rest/reload
> *   Trying 127.0.1.1...
> * Connected to ros-gs3 (127.0.1.1) port 8380 (#0)
> * Server auth using Basic with user 'admin'
> > POST /geoserver/rest/reload HTTP/1.1
> > Host: host:8380
> > Authorization: Basic YWRtaW46UjRtYW5pdGFpbCAtbjIwMC
> AtZiAvbW50L3Jvcy1jb25maWcvcm9zLWxvZ3MvZ3MzMy9HUzMzYWRtaW4ubG9nIA==
> > User-Agent: curl/7.47.0
> > Accept: */*
> > Content-Length: 5
> > Content-Type: application/x-www-form-urlencoded
> >
> * upload completely sent off: 5 out of 5 bytes
> < HTTP/1.1 401
> < Set-Cookie: remember-me=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10
> GMT; Path=/geoserver
> * Authentication problem. Ignoring this.
> < WWW-Authenticate: Basic realm="GeoServer Realm"
> < Content-Type: text/html;charset=utf-8
> < Content-Language: en
> < Content-Length: 1171
> < Date: Thu, 25 Jan 2018 08:16:20 GMT
> <
> *HTTP Status 401 –
> Unauthorized*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;}HTTP
> Status 401 – UnauthorizedType Status
> ReportMessage No AuthenticationProvider found for
> org.springframework.security.authentication.UsernamePasswordAuthenticationTokenDescription
> The request has not been a* Connection #0 to host  left intact
> pplied because it lacks valid authentication credentials for the target
> resource.Apache Tomcat/8.5.13 html>
>
>
> The provided user and password are correct.
>
> I'm not able to access http://host:8381/geoserver/rest/reload on the web
> as well while I can access http://host:8381/geoserver/rest/all
> the/other/endpoints
>
> I have tried to do the same with Apache Jmeter, and this
> (/geoserver/rest/reload) is not available.
>
> Happens for Geoserver *2.11.2 running on Tomcat 8 as well as Geoserver
> 2.9 running o Jetty.*
>
> *I'm sure this is not normal, so anyone help me figure out what I'm
> missing please.*
>
> Kind regards,
> Steve Omondi
>
>
> 
>  Virus-free.
> www.avast.com
> 

Re: [Geoserver-users] Geoserver REST Reload with POST Request Returns ERROR 401 Full authentication is required to access this resource despite using admin user

2018-01-25 Thread Nuno Oliveira

Hi,

Just did a quick test with a GeoServer 2.11.2 running inside a tomcat instance and everything worked 
as expected:


   curl -u 'admin:geoserver' -v --data-urlencode -POST 
http://localhost:8080/geoserver/rest/reload

   *   Trying 127.0.0.1...

   * Connected to localhost (127.0.0.1) port 8080 (#0)

   * Server auth using Basic with user 'admin'

   > POST /geoserver/rest/reload HTTP/1.1

   > Host: localhost:8080

   > Authorization: Basic YWRtaW46Z2Vvc2VydmVy

   > User-Agent: curl/7.47.0

   > Accept: */*

   > Content-Length: 5

   > Content-Type: application/x-www-form-urlencoded

   > 


   * upload completely sent off: 5 out of 5 bytes

   < HTTP/1.1 200 OK

   < Date: Thu, 25 Jan 2018 18:24:29 GMT

   < Server: Noelios-Restlet-Engine/1.0..8

   < Transfer-Encoding: chunked

   <

   * Connection #0 to host localhost left intact

The error you are getting suggests indeed that you are using a login that doesn't have enough 
permissions to use
that REST endpoint. I would double check that user configuration and give it a try with an 
administrator login.


Are you using any specific configuration for the security system ?

Kind regards,

Nuno Oliveira

On 01/25/2018 08:23 AM, Steve Omondi wrote:

Hey guys,
I'm trying to reload Geoserver configuration via a POST Request using CURL Utility but it fails 
with the following error;


administrator@host:/media/config$ curl -u "admin:password" -v --data-urlencode -POST 
http://host:8380/geoserver/rest/reload

*  Trying 127.0.1.1...
* Connected to ros-gs3 (127.0.1.1) port 8380 (#0)
* Server auth using Basic with user 'admin'
> POST /geoserver/rest/reload HTTP/1.1
> Host: host:8380
> Authorization: Basic 
YWRtaW46UjRtYW5pdGFpbCAtbjIwMCAtZiAvbW50L3Jvcy1jb25maWcvcm9zLWxvZ3MvZ3MzMy9HUzMzYWRtaW4ubG9nIA==

> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 5
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 5 out of 5 bytes
< HTTP/1.1 401
< Set-Cookie: remember-me=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10 GMT; 
Path=/geoserver
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="GeoServer Realm"
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 1171
< Date: Thu, 25 Jan 2018 08:16:20 GMT
<
_HTTP Status 401 – Unauthorized_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 <http://a.name> {color:black;} .line 
{height:1px;background-color:#525D76;border:none;}HTTP Status 401 – 
UnauthorizedType Status ReportMessage No 
AuthenticationProvider found for 
org.springframework.security.authentication.UsernamePasswordAuthenticationTokenDescription 
The request has not been a* Connection #0 to host  left intact
pplied because it lacks valid authentication credentials for the target resource.class="line" />Apache Tomcat/8.5.13



The provided user and password are correct.

I'm not able to access http://host:8381/geoserver/rest/reload on the web as well while I can 
access http://host:8381/geoserver/rest/all the/other/endpoints


I have tried to do the same with Apache Jmeter, and this 
(/geoserver/rest/reload) is not available.

Happens for Geoserver *2.11.2 running on Tomcat 8 as well as Geoserver 2.9 
running o Jetty.*
*
*
*I'm sure this is not normal, so anyone help me figure out what I'm missing 
please.*

Kind regards,
Steve Omondi

 
	Virus-free. www.avast.com 
 





--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot


___
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer



[Geoserver-users] Geoserver REST Reload with POST Request Returns ERROR 401 Full authentication is required to access this resource despite using admin user

Hey guys,
I'm trying to reload Geoserver configuration via a POST Request using CURL
Utility but it fails with the following error;

administrator@host:/media/config$ curl -u "admin:password" -v
--data-urlencode -POST http://host:8380/geoserver/rest/reload
*   Trying 127.0.1.1...
* Connected to ros-gs3 (127.0.1.1) port 8380 (#0)
* Server auth using Basic with user 'admin'
> POST /geoserver/rest/reload HTTP/1.1
> Host: host:8380
> Authorization: Basic
YWRtaW46UjRtYW5pdGFpbCAtbjIwMCAtZiAvbW50L3Jvcy1jb25maWcvcm9zLWxvZ3MvZ3MzMy9HUzMzYWRtaW4ubG9nIA==
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 5
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 5 out of 5 bytes
< HTTP/1.1 401
< Set-Cookie: remember-me=; Max-Age=0; Expires=Thu, 01-Jan-1970 00:00:10
GMT; Path=/geoserver
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="GeoServer Realm"
< Content-Type: text/html;charset=utf-8
< Content-Language: en
< Content-Length: 1171
< Date: Thu, 25 Jan 2018 08:16:20 GMT
<
*HTTP Status 401 –
Unauthorized*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;}HTTP
Status 401 – UnauthorizedType Status
ReportMessage No AuthenticationProvider found for
org.springframework.security.authentication.UsernamePasswordAuthenticationTokenDescription
The request has not been a* Connection #0 to host  left intact
pplied because it lacks valid authentication credentials for the target
resource.Apache Tomcat/8.5.13


The provided user and password are correct.

I'm not able to access http://host:8381/geoserver/rest/reload on the web as
well while I can access http://host:8381/geoserver/rest/all
the/other/endpoints

I have tried to do the same with Apache Jmeter, and this
(/geoserver/rest/reload) is not available.

Happens for Geoserver *2.11.2 running on Tomcat 8 as well as Geoserver 2.9
running o Jetty.*

*I'm sure this is not normal, so anyone help me figure out what I'm missing
please.*

Kind regards,
Steve Omondi


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users