[Geoserver-users] Authkey module and REST service

Hello everyone,

I have to install geoserver with authkey plug-in to restrict access to certain operations.

The creation of a new user (and the generation of his key) must be done by non-IT people, so I developed a solution using REST services and geofence to automate all this process. I can now create users and associate them to a group, but I am stuck to the key generation part.

  1. I tried to find a way to send « Synchronize user/group service » and retrieve the generated key, but Authkey module does not seem to have his own REST service.

  2. I tried to use the user modification REST service of geofence : passing ‘false’ in post data works, but ‘abcd’ does not. No error, but the line seems ignored.

Did I miss something ? I think my only hope is to develop my own web service to work with authkey module, but I would like to be sure that I have no other simple solution.

Thanks,

Joffrey


Configuration :

Version : 2.8.1

Build Date : 19-Nov-2015 17:48

GeoTools Version : 1.4.1 (rev 945972725619078375e357f8c21011999638df35)

GeoWebCache Version : 1.8.0 (rev 1.8.x/b346a3aa6cc433a312c4608b218881d8509a8780)

HI Joffrey

Did you read the section

Provider pluggability in

http://docs.geoserver.org/stable/en/user/community/authkey/index.html

Cheers
Christian

···

On Thu, Dec 17, 2015 at 9:58 AM, Joffrey Schmitz <jschmitz@anonymised.com> wrote:

Hello everyone,

I have to install geoserver with authkey plug-in to restrict access to certain operations.

The creation of a new user (and the generation of his key) must be done by non-IT people, so I developed a solution using REST services and geofence to automate all this process. I can now create users and associate them to a group, but I am stuck to the key generation part.

  1. I tried to find a way to send « Synchronize user/group service » and retrieve the generated key, but Authkey module does not seem to have his own REST service.

  2. I tried to use the user modification REST service of geofence : passing ‘false’ in post data works, but ‘abcd’ does not. No error, but the line seems ignored.

Did I miss something ? I think my only hope is to develop my own web service to work with authkey module, but I would like to be sure that I have no other simple solution.

Thanks,

Joffrey


Configuration :

Version : 2.8.1

Build Date : 19-Nov-2015 17:48

GeoTools Version : 1.4.1 (rev 945972725619078375e357f8c21011999638df35)

GeoWebCache Version : 1.8.0 (rev 1.8.x/b346a3aa6cc433a312c4608b218881d8509a8780)



Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

DI Christian Mueller MSc (GIS), MSc (IT-Security)
OSS Open Source Solutions GmbH

Hello,

Thanks for your answer.

Yes I read it and a lot of other documentation, but I did not find anything to use the authkey module (create new keys, retrieve a user from a key) without using the web interface.

To synchronize, I decided to send all the GET and POST request to mimic the clicks on the web interface. Not pretty, but it works.

To retrieve a user’s key I did not find a good solution. There is in theory a REST call for that in geofence :
/rest/usergroup/[service//]
Query, modify or delete a specific user in a particular or the default user/group service.
Method Action Response
GET Read user information 200 OK. User in XML.

but the GET method does not seem to be implemented now.

Joffrey

···

De: “Christian Mueller” <christian.mueller@anonymised.com5445…>
À: “Joffrey Schmitz” jschmitz@anonymised.com
Cc: geoserver-users@lists.sourceforge.net
Envoyé: Dimanche 27 Décembre 2015 17:40:29
Objet: Re: [Geoserver-users] Authkey module and REST service

HI Joffrey

Did you read the section

Provider pluggability in

http://docs.geoserver.org/stable/en/user/community/authkey/index.html

Cheers
Christian

On Thu, Dec 17, 2015 at 9:58 AM, Joffrey Schmitz <jschmitz@anonymised.com> wrote:

Hello everyone,

I have to install geoserver with authkey plug-in to restrict access to certain operations.

The creation of a new user (and the generation of his key) must be done by non-IT people, so I developed a solution using REST services and geofence to automate all this process. I can now create users and associate them to a group, but I am stuck to the key generation part.

  1. I tried to find a way to send « Synchronize user/group service » and retrieve the generated key, but Authkey module does not seem to have his own REST service.

  2. I tried to use the user modification REST service of geofence : passing ‘false’ in post data works, but ‘abcd’ does not. No error, but the line seems ignored.

Did I miss something ? I think my only hope is to develop my own web service to work with authkey module, but I would like to be sure that I have no other simple solution.

Thanks,

Joffrey


Configuration :

Version : 2.8.1

Build Date : 19-Nov-2015 17:48

GeoTools Version : 1.4.1 (rev 945972725619078375e357f8c21011999638df35)

GeoWebCache Version : 1.8.0 (rev 1.8.x/b346a3aa6cc433a312c4608b218881d8509a8780)



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

Hi Jofrrey,

I found thi thread and it's interesting to me.

I need the strategy you are referring to here "*I decided to send all the
GET and POST request to mimic the clicks on the web interface. *" to help me
Synchronize the user properties for Authkey generation as you mentioned.

Currently, I had to write a REST Service with Java to query the user_props
table in database (I use JDBC Role Service so the User properties are stored
in the database). This helps me get the user Authkey afetr Synchronization.

However, I haven't cracked the part to Synchronize the User Property using
REST or asyou do it by mimicking the click of the web interface.

How did you do it? Can I get some sample code for this please?

-----
Kind Regards,

Steve Omondi
GIS & DB Developer/DBA
Ramani Online, Ramani Geosystems
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html