com.amazon.redshift.plugin

## Class AzureCredentialsProvider

- java.lang.Object
- - com.amazon.redshift.plugin.SamlCredentialsProvider
  - - com.amazon.redshift.plugin.AzureCredentialsProvider

All Implemented Interfaces:
  IPlugin

    public class AzureCredentialsProvider
    extends SamlCredentialsProvider

Class to get SAML Response from Microsoft Azure using OAuth 2.0 API

### Field Summary

Fields
`protected static Pattern` `IAM_HTTP_URL_PATTERN`
`protected static Pattern` `IAM_URL_PATTERN`
`protected static String` `KEY_SSL_INSECURE`
`protected RedshiftLogger` `m_log`
`protected boolean` `m_sslInsecure`

### Fields inherited from class com.amazon.redshift.plugin.SamlCredentialsProvider

`KEY_IDP_HOST, m_autoCreate, m_dbGroups, m_dbGroupsFilter, m_dbUser, m_disableCache, m_duration, m_forceLowercase, m_groupFederation, m_idpHost, m_idpPort, m_password, m_preferredRole, m_region, m_stsEndpoint, m_userName`

### Constructor Summary

Constructors
Constructor and Description
`AzureCredentialsProvider()`

### Method Summary

Methods
`void` `addParameter(String key, String value)` Overwritten method to grab the field parameters from JDBC connection string.
`protected CloseableHttpClient` `getHttpClient()`
`String` `getPluginSpecificCacheKey()`
`protected String` `getSamlAssertion()` Required method to grab the SAML Response.
`protected void` `validateURL(String paramString)`

### Methods inherited from class com.amazon.redshift.plugin.SamlCredentialsProvider

`checkRequiredParameters, escapeHtmlEntity, getCacheKey, getCredentials, getFormAction, getIdpToken, getInputTagsfromHTML, getSubType, getValueByKey, getValueByKeyWithoutQuotesAndValueInSingleQuote, isPassword, isText, refresh, setGroupFederation, setLogger`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### KEY_SSL_INSECURE

    protected static final String KEY_SSL_INSECURE

See Also:
  Constant Field Values

#### m_sslInsecure

    protected boolean m_sslInsecure

#### IAM_URL_PATTERN

    protected static final Pattern IAM_URL_PATTERN

#### IAM_HTTP_URL_PATTERN

    protected static final Pattern IAM_HTTP_URL_PATTERN

#### m_log

    protected RedshiftLogger m_log

### Constructor Detail

#### AzureCredentialsProvider

    public AzureCredentialsProvider()

### Method Detail

#### getSamlAssertion

    protected String getSamlAssertion()
                               throws IOException

Required method to grab the SAML Response. Used in base class to refresh temporary credentials.

Specified by:
  `getSamlAssertion` in class `SamlCredentialsProvider`
Returns:
  Base64 encoded SAML Response string
Throws:
  `IOException` - throws error when missing required parameters or unable to access IDP host.

#### addParameter

    public void addParameter(String key,
                    String value)

Overwritten method to grab the field parameters from JDBC connection string. This method calls the base class addParamter method and adds to it Azure specific parameters.

Specified by:
  `addParameter` in interface `IPlugin`
Overrides:
  `addParameter` in class `SamlCredentialsProvider`
Parameters:
  `key` - parameter key passed to JDBC
  `value` - paramter value associated with the given key

#### getPluginSpecificCacheKey

    public String getPluginSpecificCacheKey()

Specified by:
  `getPluginSpecificCacheKey` in interface `IPlugin`
Overrides:
  `getPluginSpecificCacheKey` in class `SamlCredentialsProvider`

#### getHttpClient

    protected CloseableHttpClient getHttpClient()
                                         throws GeneralSecurityException

Throws:
  `GeneralSecurityException`

#### validateURL

    protected void validateURL(String paramString)
                        throws IOException

Throws:
  `IOException`