| From: | Sehrope Sarkuni <noreply(at)github(dot)com> |
|---|---|
| To: | pgsql-jdbc(at)lists(dot)postgresql(dot)org |
| Subject: | [pgjdbc/pgjdbc] dd6000: feat: Change AuthenticationPlugin interface to use... |
| Date: | 2022-01-28 18:46:06 |
| Message-ID: | pgjdbc/pgjdbc/push/refs/heads/master/417c9a-dd6000@github.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: dd6000e290f55aa79467c85f641f0099c644bf07
https://github.com/pgjdbc/pgjdbc/commit/dd6000e290f55aa79467c85f641f0099c644bf07
Author: Sehrope Sarkuni <sehrop(at)jackdb(dot)com>
Date: 2022-01-28 (Fri, 28 Jan 2022)
Changed paths:
R pgjdbc/src/main/java/org/postgresql/core/AuthenticationPluginManager.java
A pgjdbc/src/main/java/org/postgresql/core/v3/AuthenticationPluginManager.java
M pgjdbc/src/main/java/org/postgresql/core/v3/ConnectionFactoryImpl.java
M pgjdbc/src/main/java/org/postgresql/gss/GSSCallbackHandler.java
M pgjdbc/src/main/java/org/postgresql/gss/MakeGSS.java
M pgjdbc/src/main/java/org/postgresql/plugin/AuthenticationPlugin.java
M pgjdbc/src/test/java/org/postgresql/test/plugin/AuthenticationPluginTest.java
Log Message:
-----------
feat: Change AuthenticationPlugin interface to use char[] rather than String
Changes AuthenticationPlugin interface for dynamic passwords to supply passwords as a
char[] rather than a String. This changes the currently unreleased public interface of
AuthenticationPlugin and allows the driver to clear the user provided char[] array
after it is finished using it for authentication. Users implementing that interface must
ensure that each invocation of the method provides a new char[] array as the contents
will be filled with zeroes by the driver after use.
Call sites within the driver have been updated to use the char[] directly wherever possible.
This includes direct usage in the GSS authentication code paths that internally were already
converting the String password into a char[] for internal usage.
The SASL (i.e. "SCRAM") internals have not been updated to use a char[] array as the entirety
of that library uses String types for provided passwords. Assuming that it is not exposed in
other parts of the driver, that could be updated as a standalone PR. For now the entrypoint
from the ConnectionFactoryImpl into the SASL library simply converts the char[] array to
a String at it's single usage point.
Co-Authored-By: Vladimir Sitnikov <sitnikov(dot)vladimir(at)gmail(dot)com>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Cramer | 2022-01-28 19:44:57 | [pgjdbc/pgjdbc] 5f9891: Changelog42.3.2 (#2418) |
| Previous Message | Andrei Paikin | 2022-01-27 22:13:07 | [pgjdbc/pgjdbc] 417c9a: minor: fix checkstyle violations for empty lines i... |