Hi Benito, 2014-11-06 15:44 GMT+01:00 Cosme Benito <[email protected]>:
> Hi Mauro, > > Yes you are correct, I made that exact mistake and realized soon after > that the Authentication did not work as I thought it would J > > > > I just tried the UserGroupService with a PostGIS database and it seems to > work great. I didn’t actually try using the REST API but the users I > create in the database seem to be immediately available on GeoServer. > However when trying with a SQLite database it simply crashes L > > > > java.lang.RuntimeException: java.io.IOException: > org.apache.commons.dbcp.SQLNestedException: Cannot create > PoolableConnectionFactory (SQLite supports only TRANSACTION_SERIALIZABLE > and TRANSACTION_READ_UNCOMMITTED.) > As you say, I think SQLLite is not currently supported (or tested by someone). > > > I don’t mind this being the only Authentication Provider in GeoServer, > this is acceptable and perfectly fine. I already have User/Role tables and > being able to configure them on XML files would be a pretty good solution > for me, can you point me into the correct file(s)? I can’t seem to be able > to find them. > The standard xml files are automatically created in the GeoServer data_dir, in the security/usergroup/<name_of_your_service> subfolder when you create a JDBC UserGroup service with standard options (from my experience they seem to be created after the first attempt of usage, so not exactly when you create the service). I include the standard ones as attachments. To customize it for your needs you have to change the users_dml.xml file (the other one is for tables creation, but in your case the tables are already there). You have to restart Geoserver after updating the file. You may have problems with passwords, because you need to store them in one of the encryption formats supported by GeoServer (or in plain text) to work correctly. > > > Thanks a lot, you have already helped a ton! > > Cosme Benito > You are welcome. Mauro -- == GeoServer Professional Services from the experts! Visit http://goo.gl/NWWaa2 for more information. == Dott. Mauro Bartolomeoli @mauro_bart Senior Software Engineer GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 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.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>DDL statements for user database</comment> <entry key="check.table">user_props</entry> <entry key="users.create"> create table users(name varchar(128) not null,password varchar(254), enabled char(1) not null, primary key(name)) </entry> <entry key="userprops.create"> create table user_props(username varchar(128) not null,propname varchar(64) not null, propvalue varchar(2048),primary key (username,propname)) </entry> <entry key="groups.create"> create table groups(name varchar(128) not null, enabled char(1) not null, primary key(name)) </entry> <entry key="groupmembers.create"> create table group_members(groupname varchar(128) not null, username varchar(128) not null, primary key(groupname,username)) </entry> <entry key="groupmembers.indexcreate"> create index group_members_idx on group_members(username,groupname) </entry> <entry key="users.drop">drop table users</entry> <entry key="userprops.drop">drop table user_props</entry> <entry key="groups.drop">drop table groups</entry> <entry key="groupmembers.drop">drop table group_members</entry> <!-- since GeoServer version 2.3.0 --> <entry key="userprops.indexcreate1"> create index user_props_idx1 on user_props(propname,propvalue) </entry> <entry key="userprops.indexcreate2"> create index user_props_idx2 on user_props(propname,username) </entry> <!-- end GeoServer version 2.3.0 --> </properties>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>DML statements for user database</comment> <entry key="users.count"> select count(*) from users </entry> <entry key="users.all"> select name,password,enabled from users </entry> <entry key="users.keyed"> select password,enabled from users where name = ? </entry> <entry key="users.insert"> insert into users(name ,password,enabled) values (?,?,?) </entry> <entry key="users.update"> update users set password = ?, enabled = ? where name = ? </entry> <entry key="users.delete"> delete from users where name = ? </entry> <entry key="users.deleteAll"> delete from users </entry> <entry key="userprops.all"> select username,propname,propvalue from user_props </entry> <entry key="userprops.selectForUser"> select propname,propvalue from user_props where username = ? </entry> <entry key="userprops.userPropsForGroup"> select p.username,p.propname,propvalue from user_props p, group_members m where m.groupname= ? and m.username = p.username </entry> <entry key="userprops.deleteForUser"> delete from user_props where username=? </entry> <entry key="userprops.insert"> insert into user_props(username,propname,propvalue) values (?,?,?) </entry> <entry key="userprops.deleteAll"> delete from user_props </entry> <!-- since GeoServer version 2.3.0 --> <entry key="user.usersHavingProperty"> select u.name,u.password,u.enabled from users u ,user_props p where u.name=p.username and p.propname = ? </entry> <entry key="userprops.usersHavingProperty"> select p.username,p.propname,p.propvalue from user_props p where exists (select p1.username from user_props p1 where p.username=p1.username and p1.propname = ?) </entry> <entry key="userprops.userCountHavingProperty"> select count(*) from user_props p where p.propname = ? </entry> <entry key="user.usersNotHavingProperty"> select u.name,u.password,u.enabled from users u where not exists (select p.username from user_props p where u.name=p.username and p.propname = ?) </entry> <entry key="userprops.usersNotHavingProperty"> select p.username,p.propname,p.propvalue from user_props p where not exists (select p1.username from user_props p1 where p.username=p1.username and p1.propname = ?) </entry> <entry key="userprops.userCountNotHavingProperty"> select count(*) from users u where not exists (select p.username from user_props p where u.name=p.username and p.propname = ?) </entry> <entry key="user.usersHavingPropertyValue"> select u.name,u.password,u.enabled from users u ,user_props p where u.name=p.username and p.propname=? and p.propvalue=? </entry> <entry key="userprops.usersHavingPropertyValue"> select p.username,p.propname,p.propvalue from user_props p where exists (select p1.username from user_props p1 where p.username=p1.username and p1.propname = ? and p1.propvalue=?) </entry> <entry key="userprops.userCountHavingPropertyValue"> select count(*) from user_props p where p.propname = ? and p.propvalue = ? </entry> <!-- end GeoServer version 2.3.0 --> <entry key="groups.count"> select count(*) from groups </entry> <entry key="groups.all"> select name,enabled from groups </entry> <entry key="groups.keyed"> select enabled from groups where name = ? </entry> <entry key="groups.insert"> insert into groups(name ,enabled) values (?,?) </entry> <entry key="groups.update"> update groups set enabled = ? where name = ? </entry> <entry key="groups.delete"> delete from groups where name = ? </entry> <entry key="groups.deleteAll"> delete from groups </entry> <entry key="groupmembers.groupsForUser"> select m.groupname,g.enabled from group_members m, groups g where m.username = ? and m.groupname=g.name </entry> <entry key="groupmembers.usersForGroup"> select m.username,u.password,u.enabled from group_members m, users u where m.groupname = ? and m.username = u.name </entry> <entry key="groupmembers.insert"> insert into group_members(groupname,username) values (?,?) </entry> <entry key="groupmembers.delete"> delete from group_members where groupname=? and username = ? </entry> <entry key="groupmembers.deleteGroup"> delete from group_members where groupname=? </entry> <entry key="groupmembers.deleteUser"> delete from group_members where username = ? </entry> <entry key="groupmembers.deleteAll"> delete from group_members </entry> </properties>
------------------------------------------------------------------------------
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
