pvillard31 commented on code in PR #11722:
URL: https://github.com/apache/nifi/pull/11722#discussion_r4137527578
##########
nifi-extension-bundles/nifi-extension-utils/nifi-dbcp-base/src/main/java/org/apache/nifi/dbcp/ProviderAwareBasicDataSource.java:
##########
@@ -20,17 +20,24 @@
import org.apache.commons.dbcp2.ConnectionFactory;
import org.apache.commons.dbcp2.Constants;
import org.apache.commons.dbcp2.DriverConnectionFactory;
+import org.apache.nifi.dbcp.api.DatabaseCredentialPlacement;
import org.apache.nifi.dbcp.api.DatabasePasswordProvider;
import org.apache.nifi.dbcp.api.DatabasePasswordRequestContext;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Arrays;
+import java.util.Locale;
+import java.util.Properties;
/**
* Extension of {@link BasicDataSource} that supports obtaining database
passwords from a {@link DatabasePasswordProvider}.
*/
public class ProviderAwareBasicDataSource extends BasicDataSource {
+ private static final String USER_PROPERTY = "user";
+ private static final String USER_NAME_PROPERTY = "username";
+ private static final String ACCESS_TOKEN_PROPERTY = "accessToken";
Review Comment:
You’re right that `accessToken` and the related user/password handling
follow Microsoft’s JDBC driver behavior. I don't think this is widely used by
other vendors but I didn't really search. The public placement enum keeps that
property name out of the provider API. Other drivers would need their own
behavior if we support them later. I felt like it was the cleanest approach but
happy to consider another approach if needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]