-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pg15-cherrypicks][#23034] YSQL: Add Support for OIDC IDP URL (jwt_jw…
…ks_url) to fetch and refresh JKWS Summary: Added support for jwt_jwks_url in JWT Authentication to fetch and refresh JWKS from url. **Configuration** In ysql_hba_conf_csv with method jwt can provide jwt_jwks_url to pass the url. Atleast one of the jwt_jwks_path or jwt_jwks_url must be provided, if both are provided then jwt_jwks_url will be used. **Fetching** Implementation is as follows: 1. Fetches the keys from url using libcurl (EasyCurl implentation) 2. The keys are used for authentication in a similar fashion as with jwt_jwks_path JIRA: DB-11962 - src/postgres/src/backend/libpq/hba.c: -- parse_hba_line: --- pg upstream commit 55782d5 changed the way of **Verify length of option lists**, but this was not changed in the master branch, so caused a conflict with master commit 18bb9b8, resolved by keeping the changes of pg15 upstream branch. -- gethba_options: --- 18bb9b8 makes changes to gethba_options, but that function was moved by upstream d4781d8873f8c3fc8b0957cc03ce91627576cf36 into hbafuncs.c, so applied the changes there. Test Plan: **Automated** ./yb_build.sh --java-test 'org.yb.pgsql.TestJWTAuth' Added similar tests as jwt_jwks_path, to check for valid url, json, and authentication. Also added checks for invalid url and invalid json. Reviewers: jason, tfoucher Reviewed By: jason Subscribers: yql Differential Revision: https://phorge.dev.yugabyte.com/D36649
- Loading branch information
1 parent
0a52e5d
commit cf8f862
Showing
8 changed files
with
239 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters