pgadmin-org / pgadmin-org/pgadmin4

Assign Admin role from OAuth2

Open
#8,115 2 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
3.8k
Forks
891
Avg merge
4d 7h
Merged PRs (30d)
8

Description

Describe the solution you'd like

A new setting akin to OAUTH2_ADDITIONAL_CLAIMS should enable accounts from OAuth2 sources to become admin users automatically (or have that role revoked).

Describe alternatives you've considered

Manually managing admin roles in pgAdmin in addition to the OAuth2 Identity Provider.

Additional context

This proposal might seem moot, since the admin role only provides the user management option, which might not seem relevant in OAuth2-only environments. However, when there are shared servers, one might want to delete the user that originally created them to transfer them to another user, even in a OAuth2-only environment (since pgAdmin cannot know when a user is no longer valid if they don't try to sign in).

Contributor guide

Open the contributing guide

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.

Research direction

Start by tracing the existing OAUTH2_ADDITIONAL_CLAIMS setting and the OAuth2 account provisioning path. Determine how an OAuth2 claim should grant or revoke the admin role, then identify the relevant tests and verify that both assignment and revocation work when users sign in.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
authentication, authorization, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.