I use the Geoserver 2.11.4 version in Windows.I am adding the JDBC service to the PostgreSQL database using JDBC Users and Group Services. Next, I add a Provider for JDBC that I created using the JDBC Authentication Provider job queue. After doing this, the tables are created in the Database and I can connect as admin with postgres user. When I add user from JDBC service, user information is written in the database. PostgreSQL view

but I can not login to Geoserver with the user1 user I added. I can login with the user I created when I added the user from his user adding field even though it can not be in the table in Postresql. But I can not assign a rule to this user. How can i this problem.

2 Answers 2


After much head scratching and asking the guys who wrote this stuff on the users mailing list I have a solution to this that works.

First ignore the JDBC Authentication Provider, it only tests if the user can log into the JDBC database, which may be useful for someone but I'm not sure who.

You need to create (at least) a JDBC User Group Service (follow these instructions). If you want to control roles using the database too you'll need a matching JDBC Role Service.

Now create some users in your new provider (not the default one):

enter image description here

You can check they show up in the database tables if you like now. Then and here is the bit I think is missing from the documentation you need to create a new Basic username/Password authentication provider

enter image description here

and add it to the provider chain. Then click on it and set the user group service to the JDBC one you just created.

enter image description here

Then save that page, now in an incognito/private window (with out logging out of the main one as if you've screwed something up you will not be able to log in again) try to log in as one of your new users.

  • It works perfectly fine as long as roles are Default when I tried to put roles in PG as well, it gives me HTTP error 500 for the users. What should I do? Mar 9, 2021 at 5:52

Got the same issue (geoserver 2.14/PostgreSQL 9.6).

This ONLY works with a user that ALREADY exists as a "real" PostgreSQL user...Not a user added via Geoserver...

Looks like the authentication process doesn't take the newly created tables into account (during Geoserver JDBC Users and Group Services process).

In the same logic, when testing the new user in the newly created Authentication provider, it's not working...

But the fun part is that it takes the ROLE into account...

I don't understand : the tables are populated but are not used...

EDIT : Something's wrong when I follow the step-by-step guide : When adding a new user for the new service, I can't see the "default" in "Roles taken from active role service: default", I can only see "Roles taken from active role service:". Maybe there's no ROLE service currently active, maybe that's the problem...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.