From: Sehrope Sarkuni <noreply@github.com>
To: pgsql-jdbc@lists.postgresql.org
Subject: [pgjdbc/pgjdbc] dd6000: feat: Change AuthenticationPlugin interface to use...
Date: Fri, 28 Jan 2022 10:46:06 -0800
Message-ID: <pgjdbc/pgjdbc/push/refs/heads/master/417c9a-dd6000@github.com> (raw)
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: dd6000e290f55aa79467c85f641f0099c644bf07
https://github.com/pgjdbc/pgjdbc/commit/dd6000e290f55aa79467c85f641f0099c644bf07
Author: Sehrope Sarkuni <sehrop@jackdb.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.vladimir@gmail.com>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: noreply@github.com
Subject: Re: [pgjdbc/pgjdbc] dd6000: feat: Change AuthenticationPlugin interface to use...
In-Reply-To: <pgjdbc/pgjdbc/push/refs/heads/master/417c9a-dd6000@github.com>
References: <pgjdbc/pgjdbc/push/refs/heads/master/417c9a-dd6000@github.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox