Hi,
looking at the code for the user controller, there is no GET mapping for
the user itself, only for
the list of his groups:

https://github.com/geoserver/geoserver/blob/29e859a880da38eae881d6c6f444d3da08b26dfc/src/restconfig/src/main/java/org/geoserver/rest/security/UsersRestController.java

Given the JAXBUser class contains the user password, and besides that, only
the username and an "enabled" flag,
I don't think it would be a good idea to  add the GET mapping such resource
to start with... an admin must not
be allowed to see user passwords, only to modify them if needs be.

At most, an implementation of a GET binding for it may wipe the password
before returning the info.

Cheers
Andrea


On Thu, Nov 19, 2020 at 2:24 PM Quinton Smith <[email protected]> wrote:

> Hi Mark,
>
> Thanks for the reply!
>
> When I get all the users
> [image: image.png]
> I see amongst others the following user:
> [image: image.png]
> Calling the suggested endpoint
> [image: image.png]
> Returns:
> [image: image.png]
>
> We only have the *default *service so
> /rest/security/usergroup/service/default/users.xml
> also returns list of users
> and /rest/security/usergroup/service/default/users/rest_test_user.xml
> returns same 404 response
>
> User referenced above does *not* belong to a *group*.
>
> Will have a look at test cases thanks!
>
> Kind Regards,
> Quinton
>
>
>
> On Thu, Nov 12, 2020 at 9:47 PM mark <[email protected]> wrote:
>
>> On 11/12/20 1:54 PM, Quinton Smith wrote:
>> > Hi everyone,
>> >
>> > W.r.t. below issue - if I could alternatively just be pointed to some
>> > test cases / REST API group I would be grateful.
>> >
>> > Thanks!
>> > Quinton
>> >
>> > ---------- Forwarded message ---------
>> > From: *Quinton Smith* <[email protected] <mailto:[email protected]>>
>> > Date: Wed, Oct 21, 2020 at 12:51 PM
>> > Subject: REST API - get specific user
>> > To: <[email protected]
>> > <mailto:[email protected]>>
>> >
>> >
>> > Hi everyone,
>> >
>> > I'm sure I'm missing something obvious but...
>> >
>> > I can:
>> > * get a list of users - GET /rest/security/usergroup/users
>> > * create a user -POST{user_body} /rest/security/usergroup/users
>> > * update a user - POST{user_body}/rest/security/usergroup/user/my_user
>> > * delete a user - DELETE /rest/security/usergroup/user/my_user
>> >
>> > I just cannot retrieve an individual user.
>> >
>> > I've tried:
>> > GET /rest/security/usergroup/user/my_user (405 Method Not Allowed)
>> > GET /rest/security/usergroup/service/default/user/my_user (405 Method
>> > Not Allowed)
>> > GET /rest/security/usergroup/users/my_user (404 Not Found)
>>
>> https://docs.geoserver.org/latest/en/api/#1.0.0/usergroup.yaml shows
>> that a GET to /usergroup/users/{user} should return the user's info.
>>
>> eg.
>>
>> curl -X GET
>> http://localhost:8080/geoserver/rest/security/usergroup/users/myUser -H
>>   "accept: application/json" -H  "content-type: application/json"
>>
>> I haven't got a running instance at hand to try this, a 404 would mean
>> the user does not exist (or it might be in a user/group that call is
>> shown further down the page.
>>
>> There are some testcases for /security/ at
>>
>> https://github.com/geoserver/geoserver/tree/master/src/restconfig/src/test/java/org/geoserver/rest/security
>>
>> -M
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
> _______________________________________________
> 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
>
>
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


-- 

Regards, Andrea Aime

== GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf
Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa
(LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549
http://www.geo-solutions.it http://twitter.com/geosolutions_it
------------------------------------------------------- *Con riferimento
alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 -
Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni
circostanza inerente alla presente email (il suo contenuto, gli eventuali
allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i
destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per
errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le
sarei comunque grato se potesse darmene notizia. This email is intended
only for the person or entity to which it is addressed and may contain
information that is privileged, confidential or otherwise protected from
disclosure. We remind that - as provided by European Regulation 2016/679
“GDPR” - copying, dissemination or use of this e-mail or the information
herein by anyone other than the intended recipient is prohibited. If you
have received this email by mistake, please notify us immediately by
telephone or e-mail.*
_______________________________________________
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


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to