Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to resolve groups from JWT's #15955

Closed
wants to merge 3 commits into from

Conversation

connorlwilkes
Copy link

Description

The JWT auth method currently doesn't have the capability to resolve groups even though this is present in the OAuth auth method. This PR follows a similar pattern to that used in the OAuth method in order to enable this feature for JWT's. This is useful for non user or programmatic access

Additional context and related issues

Uses the same process as OAuth for config and to resolve the group (https://github.com/G-Research/trino/blob/master/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Authenticator.java#L84)

Release notes

( ) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
(x) Release notes are required, with the following suggested text:

# JWT auth
* Add support with the "http-server.authentication.jwt.groups-field" option to resolve groups from JWTs

@cla-bot
Copy link

cla-bot bot commented Feb 2, 2023

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Connor Wilkes.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@cla-bot
Copy link

cla-bot bot commented Feb 17, 2023

Thank you for your pull request and welcome to the Trino community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. Continue to work with us on the review and improvements in this PR, and submit the signed CLA to cla@trino.io. Photos, scans, or digitally-signed PDF files are all suitable. Processing may take a few days. The CLA needs to be on file before we merge your changes. For more information, see https://github.com/trinodb/cla

@Praveen2112
Copy link
Member

Hi !! @connorlwilkes Thanks for working on this PR. But unfortunately the process by which we are getting the groups from OAuthAuthenticator has been deprecated due to the following issues -

  • view SECURITY DEFINER
  • sessionUser JDBC parameter
  • identity from view expression for column masking and row filtering.

For additional rationale PTAL at this PR - #15669.

cc: @kokosing

@mahic
Copy link

mahic commented Mar 16, 2024

As mentioned in #15669 (comment), this too would be worth reopening when #16539 gets implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

4 participants