Fine-grained sharing of database connections

Open
#9,538 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@schaerfo is already working on this.

Since Jan 16, 2026.

Assessment

This issue has not been assessed yet.

Description

Feature

Describe the solution you'd like

As of now, database connections can be shared with either none or all users. It would be useful to be able to share database connections only with selected users.

In my case, some maintenance tasks must be performed manually on the database. I would like to add database connections that use PostgreSQL roles with the required permissions and share them with the respective authorized pgadmin users. Then, the users can log into pgadmin using OAuth2 and access the database with their respective permissions without access to database credentials.

For compatibility with existing installations, it would probably be best to not re-purpose the notion of ‘roles’ and instead implement user groups to which users can be added. Then, database connections can be shared with selected groups.

Describe alternatives you've considered

Alternatively, users could log into pgadmin with PostgreSQL roles, bypassing the user management of pgadmin (this was suggested in #6939).

Additional context

Similar proposals have been put forward in the past, e.g. #5534

I would be willing to try and implement this if it gets approved.

Dominant language
Python
Stars
3.9k
Forks
922
Avg merge
2d 3h
Merged PRs (30d)
33

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pgadmin-org/pgadmin4

All issues in pgadmin-org/pgadmin4

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.