[Geoserver-users] jdbc group service using tables outside public schema

Hi,

I'm trying to set a jdbc group service [3] with the tables not stored
in the public schema.

I'm using a connection url like this:

jdbc:postgresql://localhost:5432/mydatabase?searchpath=myschema

based on this post on stackoverflow [1]

and also like this based on the docs of the jdbc driver [2]

jdbc:postgresql://localhost:5432/mydatabase?currentSchema=myschema

but the tables are always being created on the public schema.

Is possible to create them in another schema?

Thanks

[1] http://stackoverflow.com/a/5491562/930271
[2] https://jdbc.postgresql.org/documentation/94/connect.html#connection-parameters
[3] http://docs.geoserver.org/stable/en/user/webadmin/security/ugr.html#add-new-jdbc-user-group-service

--
Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
http://www.icarto.es/

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808

Finally i found that it can be done the DDL / DML xml files

Editing:

security/usergroup/<provider-name>/usersddl.xml
security/usergroup/<provider-name>/usersdml.xml

to include schema qualification for the tables seems to work perfectly.

Cheers.

2015-03-10 11:24 GMT+01:00 Francisco Puga <fpuga@anonymised.com>:

Hi,

I'm trying to set a jdbc group service [3] with the tables not stored
in the public schema.

I'm using a connection url like this:

jdbc:postgresql://localhost:5432/mydatabase?searchpath=myschema

based on this post on stackoverflow [1]

and also like this based on the docs of the jdbc driver [2]

jdbc:postgresql://localhost:5432/mydatabase?currentSchema=myschema

but the tables are always being created on the public schema.

Is possible to create them in another schema?

Thanks

[1] http://stackoverflow.com/a/5491562/930271
[2] https://jdbc.postgresql.org/documentation/94/connect.html#connection-parameters
[3] http://docs.geoserver.org/stable/en/user/webadmin/security/ugr.html#add-new-jdbc-user-group-service

--
Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
http://www.icarto.es/

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808

--
Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
http://www.icarto.es/

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808

Este correo electrónico contiene información estrictamente
confidencial y es de uso exclusivo del destinatario, quedando
prohibida a cualquier otra persona su revelación, copia, distribución,
o el ejercicio de cualquier acción relativa a su contenido. Si ha
recibido este mensaje por error, por favor conteste a su remitente
mediante correo electrónico y proceda a borrarlo de su sistema.

Sus datos personales serán tratados de forma confidencial y no serán
cedidos a terceros ajenos a ICARTO. En cualquier caso, podrá ejercer
los derecho de oposición, acceso, rectificación y cancelación de
acuerdo con lo establecido en la Ley Orgánica 15/99, de 13 de
diciembre, de Protección de Datos de Carácter Personal dirigiéndose a
Innovación, Cooperación, Cartografía e Territorio, SL. (ICARTO) en la
dirección postal a C/ Rafael Alberti, nº 13, 1ºD, 15.008 – (A Coruña).

Thank you for getting back to us with an answer other will be able to find in the archives for future need

Cheers
Andrea

···

On Wed, Mar 11, 2015 at 10:10 PM, Francisco Puga <fpuga@anonymised.com…> wrote:

Finally i found that it can be done the DDL / DML xml files

Editing:

security/usergroup//usersddl.xml
security/usergroup//usersdml.xml

to include schema qualification for the tables seems to work perfectly.

Cheers.

2015-03-10 11:24 GMT+01:00 Francisco Puga <fpuga@anonymised.com>:

Hi,

I’m trying to set a jdbc group service [3] with the tables not stored
in the public schema.

I’m using a connection url like this:

jdbc:postgresql://localhost:5432/mydatabase?searchpath=myschema

based on this post on stackoverflow [1]

and also like this based on the docs of the jdbc driver [2]

jdbc:postgresql://localhost:5432/mydatabase?currentSchema=myschema

but the tables are always being created on the public schema.

Is possible to create them in another schema?

Thanks

[1] http://stackoverflow.com/a/5491562/930271
[2] https://jdbc.postgresql.org/documentation/94/connect.html#connection-parameters
[3] http://docs.geoserver.org/stable/en/user/webadmin/security/ugr.html#add-new-jdbc-user-group-service


Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
http://www.icarto.es/

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808


Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
http://www.icarto.es/

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808

Este correo electrónico contiene información estrictamente
confidencial y es de uso exclusivo del destinatario, quedando
prohibida a cualquier otra persona su revelación, copia, distribución,
o el ejercicio de cualquier acción relativa a su contenido. Si ha
recibido este mensaje por error, por favor conteste a su remitente
mediante correo electrónico y proceda a borrarlo de su sistema.

Sus datos personales serán tratados de forma confidencial y no serán
cedidos a terceros ajenos a ICARTO. En cualquier caso, podrá ejercer
los derecho de oposición, acceso, rectificación y cancelación de
acuerdo con lo establecido en la Ley Orgánica 15/99, de 13 de
diciembre, de Protección de Datos de Carácter Personal dirigiéndose a
Innovación, Cooperación, Cartografía e Territorio, SL. (ICARTO) en la
dirección postal a C/ Rafael Alberti, nº 13, 1ºD, 15.008 – (A Coruña).


Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/


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

==

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

==

Ing. Andrea Aime

@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy’s New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.


On Tue, Mar 10, 2015 at 11:24 AM, Francisco Puga <fpuga@anonymised.com> wrote:

and also like this based on the docs of the jdbc driver [2]

jdbc:postgresql://localhost:5432/mydatabase?currentSchema=myschema

The correct parameter is indeed "currentSchema", *not* "searchPath".
However this feature only appeared in pgjdbc version 9.3.1103 onwards
<https://github.com/pgjdbc/pgjdbc/blob/REL9_3_1103/doc/pgjdbc.xml&gt;\.
Unfortunately GeoServer ships with an old pgjdbc library (8.4) so you can't
make use of this feature.
Work is in progress <http://jira.codehaus.org/browse/GEOT-4636&gt; to fix that
but there seems to be some side effects when upgrading to a newer library.
In my case it didn't encounter any so I switched to a newer pgjdbc and I
could configure security services in a non-public schema.

--
Damiano Albani

Thanks for the feedback Damiano.

Good to know that it will work when the library will be updated.

···

2015-03-17 16:48 GMT+01:00 Damiano Albani <damiano.albani@anonymised.com>:


Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/


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

On Tue, Mar 10, 2015 at 11:24 AM, Francisco Puga <fpuga@anonymised.com> wrote:

and also like this based on the docs of the jdbc driver [2]

jdbc:postgresql://localhost:5432/mydatabase?currentSchema=myschema

The correct parameter is indeed “currentSchema”, not “searchPath”.
However this feature only appeared in pgjdbc version 9.3.1103 onwards.
Unfortunately GeoServer ships with an old pgjdbc library (8.4) so you can’t make use of this feature.
Work is in progress to fix that but there seems to be some side effects when upgrading to a newer library.
In my case it didn’t encounter any so I switched to a newer pgjdbc and I could configure security services in a non-public schema.

Damiano Albani

Francisco Puga
iCarto | Innovación, Cooperación, Cartografía y Territorio S.L.
http://www.icarto.es/

c/ Rafael Alberti nº 13 – 1º D
15008 A Coruña
Galicia (Spain)
+34 881927808

Este correo electrónico contiene información estrictamente confidencial y es de uso exclusivo del destinatario, quedando prohibida a cualquier otra persona su revelación, copia, distribución, o el ejercicio de cualquier acción relativa a su contenido. Si ha recibido este mensaje por error, por favor conteste a su remitente mediante correo electrónico y proceda a borrarlo de su sistema.

Sus datos personales serán tratados de forma confidencial y no serán cedidos a terceros ajenos a ICARTO. En cualquier caso, podrá ejercer los derecho de oposición, acceso, rectificación y cancelación de acuerdo con lo establecido en la Ley Orgánica 15/99, de 13 de diciembre, de Protección de Datos de Carácter Personal dirigiéndose a Innovación, Cooperación, Cartografía e Territorio, SL. (ICARTO) en la dirección postal a C/ Rafael Alberti, nº 13, 1ºD, 15.008 – (A Coruña).