-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: enable authentication #174
feat: enable authentication #174
Conversation
Codecov Report
@@ Coverage Diff @@
## postgresql-dialect #174 +/- ##
========================================================
+ Coverage 78.87% 79.55% +0.67%
- Complexity 1011 1043 +32
========================================================
Files 89 91 +2
Lines 3494 3560 +66
Branches 406 422 +16
========================================================
+ Hits 2756 2832 +76
+ Misses 578 566 -12
- Partials 160 162 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guangylegend I wonder if this change to PGAdapter would be sufficient to enable running multiple Spangres tests against multiple databases (in the same local instance) using a single PGAdapter, like we just talked about earlier today?
Anyway -- I am by no means a qualified Java reviewer, but overall this change seems reasonable.
You actually don't need this change for that, as that is already supported. If you start PGAdapter without a This change will however also add support for connecting to different databases on different instances or even in different projects, as it will add support for fully-qualified database names in the connection request. |
Enables authentication on PGAdapter so the client can supply the credentials for a specific connection, instead of setting a fixed set of credentials on PGAdapter at startup. This also enables connecting to different Google Cloud projects and instances. The database property in the connection parameters may be a simple database id (e.g.
my-database
) or a fully qualified database name (e.g.projects/my-project/instances/my-instance/databases/my-database
).The credentials must be one of the following:
-----BEGIN PRIVATE KEY-----
and-----END PRIVATE KEY-----
headers. The username must be the email address of the service account.