

# JWT

The JWT (JSON Web Token) plugin sends your `web_identity_token` value to the Amazon STS `AssumeRoleWithWebIdentity` API action to obtain credentials for the configured `preferred_role`.

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



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

## Preferred role
<a name="odbc-v4-driver-jwt-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 | Required | none | preferred\_role=arn:aws:iam::123456789012:role/MyAthenaRole; | 

## Session duration
<a name="odbc-v4-driver-jwt-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; | 

## JSON web token
<a name="odbc-v4-driver-jwt-json-web-token"></a>

The JSON web token passed as `WebIdentityToken` to the Amazon STS [AssumeRoleWithWebIdentity](https://docs.amazonaws.cn/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html) API action.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| web\_identity\_token | Required | none | web\_identity\_token=eyJhbGc...<remainder of token>; | 

## Role session name
<a name="odbc-v4-driver-jwt-role-session-name"></a>

A name for the session. A common technique is to use the name or identifier of the user of your application as the role session name. This conveniently associates the temporary security credentials that your application uses with the corresponding user.



| **Connection string name** | **Parameter type** | **Default value** | **Connection string example** | 
| --- | --- | --- | --- | 
| role\_session\_name | Required | none | role\_session\_name=familiarname; | 