pgadmin4 icon indicating copy to clipboard operation
pgadmin4 copied to clipboard

oauth2 github - add "OAUTH2_ALLOWED_ORGANIZATIONS" to config (RM #6640)

Open dpage opened this issue 4 years ago • 4 comments

Issue migrated from Redmine: https://redmine.postgresql.org/issues/6640 Originally created by Max Vez at 2021-07-23 13:28:03 UTC.

Hello,

New OAUTH2 support in pagmin4 is awesome.

However, it would be great to be able to restrict which users can login using github oauth2 based on the organization name they belong to (at least in the case of Github).

Ex: Grafana github oauth2 support documentation: https://grafana.com/docs/grafana/latest/auth/github/

They support two extra parameters:

  • allowed_organizations = <github_org_name>
  • team_ids = <github_org_team_id>

Thanks!

dpage avatar Jul 23 '21 13:07 dpage

Comment migrated from Redmine: https://redmine.postgresql.org/issues/6640#note-1 Originally created by Akshay Joshi at 2021-07-30 11:22:05 UTC.

Redmine ticket header update:

Name Old Value New Value
Sprint changed Ready

dpage avatar Jul 30 '21 11:07 dpage

Comment migrated from Redmine: https://redmine.postgresql.org/issues/6640#note-2 Originally created by Florian Sabonchi at 2021-10-08 20:11:09 UTC.

Max Vez wrote:

Hello,

New OAUTH2 support in pagmin4 is awesome.

However, it would be great to be able to restrict which users can login using github oauth2 based on the organization name they belong to (at least in the case of Github).

Ex: Grafana github oauth2 support documentation: https://grafana.com/docs/grafana/latest/auth/github/

They support two extra parameters:

  • allowed_organizations = <github_org_name>
  • team_ids = <github_org_team_id>

Thanks!

Hi I will have a look

dpage avatar Oct 08 '21 20:10 dpage

Comment migrated from Redmine: https://redmine.postgresql.org/issues/6640#note-3 Originally created by Alan Hood at 2022-02-18 10:31:51 UTC.

Any update on this?

dpage avatar Feb 18 '22 10:02 dpage

As per https://grafana.com/docs/grafana/latest/auth/github/, the allowed organisation should be in OAuth2 provider (here GitHub) where you add the App (in this case pgAdmin) details. I don't think, this should be part of pgAdmin.

khushboovashi avatar Aug 06 '24 09:08 khushboovashi