For example if a jdbc url requires to retrieve and authorized token this interface shall be implemented to
+ * retrieve the token.
+ */
+public interface DatabaseAuthenticationProvider {
+
+ /**
+ * Authenticate a user for the given jdbc url.
+ *
+ * @return authorization token
+ */
+ String authenticate(String jdbcUrl, String username, String password);
+}
diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/util/jdbi/DatabaseAuthenticationProviderException.java b/openmetadata-service/src/main/java/org/openmetadata/service/util/jdbi/DatabaseAuthenticationProviderException.java
new file mode 100644
index 00000000000..a9c04ce1d21
--- /dev/null
+++ b/openmetadata-service/src/main/java/org/openmetadata/service/util/jdbi/DatabaseAuthenticationProviderException.java
@@ -0,0 +1,23 @@
+package org.openmetadata.service.util.jdbi;
+
+/** Database authentication provider exception responsible to all generic exception thrown by this layer. */
+public class DatabaseAuthenticationProviderException extends RuntimeException {
+ public DatabaseAuthenticationProviderException() {}
+
+ public DatabaseAuthenticationProviderException(String message) {
+ super(message);
+ }
+
+ public DatabaseAuthenticationProviderException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public DatabaseAuthenticationProviderException(Throwable cause) {
+ super(cause);
+ }
+
+ public DatabaseAuthenticationProviderException(
+ String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+}
diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/util/jdbi/DatabaseAuthenticationProviderFactory.java b/openmetadata-service/src/main/java/org/openmetadata/service/util/jdbi/DatabaseAuthenticationProviderFactory.java
new file mode 100644
index 00000000000..e5bb6dc7f5a
--- /dev/null
+++ b/openmetadata-service/src/main/java/org/openmetadata/service/util/jdbi/DatabaseAuthenticationProviderFactory.java
@@ -0,0 +1,27 @@
+package org.openmetadata.service.util.jdbi;
+
+import java.util.Optional;
+
+/** Factory class for {@link DatabaseAuthenticationProvider}. */
+public class DatabaseAuthenticationProviderFactory {
+ /** C'tor */
+ private DatabaseAuthenticationProviderFactory() {}
+
+ /**
+ * Get auth provider based on the given jdbc url.
+ *
+ * @param jdbcURL the jdbc url.
+ * @return instance of {@link DatabaseAuthenticationProvider}.
+ */
+ public static Optional