public class FederatedAuthPlugin extends AbstractConnectionPlugin
| Modifier and Type | Field and Description |
|---|---|
static AwsWrapperProperty |
DB_USER |
static AwsWrapperProperty |
HTTP_CLIENT_CONNECT_TIMEOUT |
static AwsWrapperProperty |
HTTP_CLIENT_SOCKET_TIMEOUT |
static AwsWrapperProperty |
IAM_DEFAULT_PORT |
static AwsWrapperProperty |
IAM_HOST |
static AwsWrapperProperty |
IAM_IDP_ARN |
static AwsWrapperProperty |
IAM_REGION |
static AwsWrapperProperty |
IAM_ROLE_ARN |
static AwsWrapperProperty |
IAM_TOKEN_EXPIRATION |
static AwsWrapperProperty |
IDP_ENDPOINT |
static AwsWrapperProperty |
IDP_NAME |
static AwsWrapperProperty |
IDP_PASSWORD |
static AwsWrapperProperty |
IDP_PORT |
static AwsWrapperProperty |
IDP_USERNAME |
protected PluginService |
pluginService |
protected RdsUtils |
rdsUtils |
protected static RegionUtils |
regionUtils |
static AwsWrapperProperty |
RELAYING_PARTY_ID |
protected static java.util.regex.Pattern |
SAML_RESPONSE_PATTERN |
protected static java.lang.String |
SAML_RESPONSE_PATTERN_GROUP |
protected SamlUtils |
samlUtils |
static AwsWrapperProperty |
SSL_INSECURE |
| Constructor and Description |
|---|
FederatedAuthPlugin(PluginService pluginService,
CredentialsProviderFactory credentialsProviderFactory) |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearCache() |
java.sql.Connection |
connect(java.lang.String driverProtocol,
HostSpec hostSpec,
java.util.Properties props,
boolean isInitialConnection,
JdbcCallable<java.sql.Connection,java.sql.SQLException> connectFunc)
Establishes a connection to the given host using the given driver protocol and properties.
|
java.sql.Connection |
forceConnect(@NonNull java.lang.String driverProtocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props,
boolean isInitialConnection,
@NonNull JdbcCallable<java.sql.Connection,java.sql.SQLException> forceConnectFunc)
Establishes a connection to the given host using the given driver protocol and properties.
|
java.util.Set<java.lang.String> |
getSubscribedMethods() |
acceptsStrategy, execute, getHostSpecByStrategy, getHostSpecByStrategy, initHostProvider, notifyConnectionChanged, notifyNodeListChangedpublic static final AwsWrapperProperty IDP_ENDPOINT
public static final AwsWrapperProperty IDP_PORT
public static final AwsWrapperProperty RELAYING_PARTY_ID
public static final AwsWrapperProperty IAM_ROLE_ARN
public static final AwsWrapperProperty IAM_IDP_ARN
public static final AwsWrapperProperty IAM_REGION
public static final AwsWrapperProperty IAM_TOKEN_EXPIRATION
public static final AwsWrapperProperty IDP_USERNAME
public static final AwsWrapperProperty IDP_PASSWORD
public static final AwsWrapperProperty IAM_HOST
public static final AwsWrapperProperty IAM_DEFAULT_PORT
public static final AwsWrapperProperty HTTP_CLIENT_SOCKET_TIMEOUT
public static final AwsWrapperProperty HTTP_CLIENT_CONNECT_TIMEOUT
public static final AwsWrapperProperty SSL_INSECURE
public static AwsWrapperProperty IDP_NAME
public static final AwsWrapperProperty DB_USER
protected static final java.util.regex.Pattern SAML_RESPONSE_PATTERN
protected static final java.lang.String SAML_RESPONSE_PATTERN_GROUP
protected static final RegionUtils regionUtils
protected final PluginService pluginService
protected final RdsUtils rdsUtils
protected final SamlUtils samlUtils
public FederatedAuthPlugin(PluginService pluginService, CredentialsProviderFactory credentialsProviderFactory)
public java.util.Set<java.lang.String> getSubscribedMethods()
getSubscribedMethods in interface ConnectionPlugingetSubscribedMethods in class AbstractConnectionPluginpublic java.sql.Connection connect(java.lang.String driverProtocol,
HostSpec hostSpec,
java.util.Properties props,
boolean isInitialConnection,
JdbcCallable<java.sql.Connection,java.sql.SQLException> connectFunc)
throws java.sql.SQLException
ConnectionPluginConnectionProvider has been set with
Driver.setCustomConnectionProvider(ConnectionProvider) and
ConnectionProvider.acceptsUrl(String, HostSpec, Properties) returns true for the given
protocol, host, and properties, the connection will be created by the non-default
ConnectionProvider. Otherwise, the connection will be created by the default
ConnectionProvider. The default ConnectionProvider will be DriverConnectionProvider for
connections requested via the DriverManager and
DataSourceConnectionProvider for connections requested via an
AwsWrapperDataSource.connect in interface ConnectionPluginconnect in class AbstractConnectionPlugindriverProtocol - the driver protocol that should be used to establish the connectionhostSpec - the host details for the desired connectionprops - the connection propertiesisInitialConnection - a boolean indicating whether the current Connection is
establishing an initial physical connection to the database or has
already established a physical connection in the pastconnectFunc - the function to call to continue the connect request down the
connect pipelineConnection to the requested hostjava.sql.SQLException - if there was an error establishing a Connection to the requested
hostpublic java.sql.Connection forceConnect(@NonNull java.lang.String driverProtocol,
@NonNull HostSpec hostSpec,
@NonNull java.util.Properties props,
boolean isInitialConnection,
@NonNull JdbcCallable<java.sql.Connection,java.sql.SQLException> forceConnectFunc)
throws java.sql.SQLException
ConnectionPluginConnectionPlugin.connect(java.lang.String, software.amazon.jdbc.HostSpec, java.util.Properties, boolean, software.amazon.jdbc.JdbcCallable<java.sql.Connection, java.sql.SQLException>) in that the default
ConnectionProvider will be used to establish the connection even if a non-default
ConnectionProvider has been set via Driver.setCustomConnectionProvider(ConnectionProvider).
The default ConnectionProvider will be DriverConnectionProvider for connections
requested via the DriverManager and DataSourceConnectionProvider for
connections requested via an AwsWrapperDataSource.forceConnect in interface ConnectionPluginforceConnect in class AbstractConnectionPlugindriverProtocol - the driver protocol that should be used to establish the connectionhostSpec - the host details for the desired connectionprops - the connection propertiesisInitialConnection - a boolean indicating whether the current Connection is
establishing an initial physical connection to the database or has
already established a physical connection in the pastforceConnectFunc - the function to call to continue the forceConnect request down the
forceConnect pipelineConnection to the requested hostjava.sql.SQLException - if there was an error establishing a Connection to the requested
hostpublic static void clearCache()