

# Okta

Okta is a SAML-based authentication plugin that works with the Okta identity provider. For information about configuring federation for Okta and Amazon Athena, see [Configure SSO for ODBC using the Okta plugin and Okta Identity Provider](odbc-okta-plugin.md).

## Authentication Type
<a name="odbc-v4-driver-okta-authentication-type"></a>



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| AuthenticationType | Required | IAM Credentials | AuthenticationType=Okta; | 

## User ID
<a name="odbc-v4-driver-okta-user-id"></a>

Your Okta user name.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| UID | Required | none | UID=jane.doe@org.com; | 

## Password
<a name="odbc-v4-driver-okta-password"></a>

Your Okta user password.

In the connection string example, replace the placeholder with the value for your connection.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| PWD | Required | none | PWD={{password}}; | 

## Preferred role
<a name="odbc-v4-driver-okta-preferred-role"></a>

The Amazon Resource Name (ARN) of the role to assume. For more information about ARN roles, see [AssumeRole](https://docs.amazonaws.cn/STS/latest/APIReference/API_AssumeRole.html) in the *Amazon Security Token Service API Reference*.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| preferred\_role | Optional | none | preferred\_role=arn:aws:iam::123456789012:role/MyAthenaRole; | 

## Session duration
<a name="odbc-v4-driver-okta-session-duration"></a>

The role session duration in seconds. When this parameter is unset, the driver omits `DurationSeconds` from the request. The selected service determines the resulting session duration.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| duration | Optional | Not set | duration=900; | 

## IdP host
<a name="odbc-v4-driver-okta-idp-host"></a>

The host name of your Okta organization, such as `trial-1234567.okta.com`. Specify the host without `https://`, because the driver adds that scheme.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| idp\_host | Required | None | idp\_host=dev-99999999.okta.com; | 

## IdP port
<a name="odbc-v4-driver-okta-idp-port"></a>

This parameter is required by the Okta connection validator for compatibility. The Okta HTTP request URLs do not use its value.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| idp\_port | Required | None | idp\_port=443; | 

## Okta app ID
<a name="odbc-v4-driver-okta-app-id"></a>

The application identifier used in the Okta application URL. The driver appends this value to the path after `app_name`.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| app\_id | Required | None | app\_id=0oa25kx8ze9A3example/alnexamplea0piaWa0g7; | 

## Okta app name
<a name="odbc-v4-driver-okta-app-name"></a>

The name of the Okta application.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| app\_name | Required | None | app\_name=amazon\_aws\_redshift; | 

## Okta wait time
<a name="odbc-v4-driver-okta-wait-time"></a>

The duration in seconds to wait for multifactor authentication. The default is `60`; a configured value must be at least `10`.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| okta\_mfa\_wait\_time | Optional | 60 | okta\_mfa\_wait\_time=20; | 

## Okta MFA type
<a name="odbc-v4-driver-okta-mfa-type"></a>

The MFA factor type. The driver implements Google Authenticator, SMS (Okta), Okta Verify with Push, and Okta Verify with TOTP factor flows.



| **Connection string name** | **Parameter type** | **Default value** | **Possible values** | **Connection string example** | 
| --- | --- | --- | --- | --- | 
| okta\_mfa\_type | Optional | None | googleauthenticator, smsauthentication, oktaverifywithpush, oktaverifywithtotp | okta\_mfa\_type=oktaverifywithpush; | 

## Okta phone number
<a name="odbc-v4-driver-okta-phone-number"></a>

The phone number to use with Amazon SMS authentication. This parameter is required only for multifactor enrollment. If your mobile number is already enrolled, or if Amazon SMS authentication is not used by the security policy, you can ignore this field.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| okta\_mfa\_phone\_number | Required for SMS MFA enrollment, optional otherwise | None | okta\_mfa\_phone\_number=19991234567; | 

## Enable Okta file cache
<a name="odbc-v4-driver-okta-file-cache"></a>

With `okta_cache=1`, the driver can reuse valid temporary credentials from its file cache. If the cache entry is missing or invalid, it runs the Okta authentication flow.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| okta\_cache | Optional | 0 | okta\_cache=1; | 