[Geoserver-devel] [JIRA] (GEOS-8486) Can not create new user with REST API

Ben Wyss created an issue

GeoServer / BugGEOS-8486

Can not create new user with REST API

Issue Type:

BugBug

Affects Versions:

2.12.0, 2.12.1

Assignee:

Unassigned

Components:

REST

Created:

12/Dec/17 1:55 AM

Environment:

GeoServer running in a Docker

Priority:

MediumMedium

Reporter:

Ben Wyss

The usergroup API is working as expected when issuing a GET request like:
curl -X GET [http://admin:geoserver@anonymised.com:8080/geoserver/rest/security/usergroup/users/](http://admin:geoserver@anonymised.com:8080/geoserver/rest/security/usergroup/users/)

I get {{com.thoughtworks.xstream.mapper.CannotResolveClassException: userName }} when issuing a POST to the same endpoint like this: {{curl -X POST http://admin:geoserver@anonymised.com…:8080/geoserver/rest/security/usergroup/users/ -H “content-type: application/json” -d "

{ "userName": "foo", "password": "bAr1@anonymised.com0…", "enabled": true}

"}}

I am getting the same result (GET is working and POST is not working) when trying to issue a new user using /rest/security/usergroup/service/myUserGroup/users/

I am getting the same results when I change the POST to use xml instead of json: content-type: application/xml &
{{<user>
<userName>Jim</userName>
<password>password</password>
<enabled>true</enabled>
</user>}}

Please also see the gis.stackexchange: https://gis.stackexchange.com/questions/256891/creating-new-geoserver-user-through-rest-api

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100074-sha1:3da8cec)

Atlassian logo