Skip to content

AWS Athena ODBC driver support for App Access#19649

Merged
greedy52 merged 8 commits intomasterfrom
STeve/8281_athena_odbc_driver_support
Jan 10, 2023
Merged

AWS Athena ODBC driver support for App Access#19649
greedy52 merged 8 commits intomasterfrom
STeve/8281_athena_odbc_driver_support

Conversation

@greedy52
Copy link
Copy Markdown
Contributor

@greedy52 greedy52 commented Dec 23, 2022

Implements #8281

Note that both Athena JDBC driver and Timestream JDBC driver use Java SDK v1 so Teleport would not able to support them (details see #19366)

Changes

Interestingly, the copy header logic change from #19387 actually fixed an issue that AWS would reject ODBC driver requests when Expect: 100-continue headers are signed (by the old logic). I had a similar change prior to Gavin's refactor but it's no longer necessary.

This PR then adds a new athena-odbc format tsh proxy aws to dump pre-compiled list of ODBC properties.

UX

Login

$ tsh apps login aws
Logged into AWS app "aws".

Your IAM role:
  arn:aws:iam::<account_account_id>:role/steve-poweruser

Example AWS CLI command:
  tsh aws s3 ls

Or start a local proxy:
  tsh proxy aws --app aws

New proxy format

$ tsh proxy aws --app aws -p 8888 -f athena-odbc
Started AWS proxy on http://127.0.0.1:8888.

Set the following properties for the Athena ODBC data source:
[Teleport Athena Access]
AuthenticationType = IAM Credentials
UID = <aws_access_key_id>
PWD = <aws_secret_access_key>
UseProxy = 1;
ProxyScheme = http;
ProxyHost = 127.0.0.1;
ProxyPort = 8888;
TrustedCerts = <path_to_ca_bundle>

Here is a sample connection string using the above credentials and proxy settings:
DRIVER=Simba Amazon Athena ODBC Connector;AwsRegion=us-east-1;S3OutputLocation=s3://example-bucket/athena/output/;Workgroup=example-workgroup;AuthenticationType=IAM Credentials;UID=<aws_access_key_id>;PWD=<aws_secret_access_key>;UseProxy=1;ProxyScheme=http;ProxyHost=127.0.0.1;ProxyPort=8888;TrustedCerts=<path_to_ca_bundle>

@greedy52 greedy52 added feature-request Used for new features in Teleport, improvements to current should be #enhancements aws Used for AWS Related Issues. application-access labels Dec 23, 2022
@greedy52 greedy52 self-assigned this Dec 23, 2022
@greedy52 greedy52 force-pushed the STeve/8281_athena_odbc_driver_support branch from 5995ba7 to bf973d1 Compare December 23, 2022 17:10
@greedy52 greedy52 marked this pull request as ready for review December 23, 2022 17:10
@github-actions github-actions Bot added size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels Dec 23, 2022
Copy link
Copy Markdown
Contributor

@GavinFrazar GavinFrazar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, glad the signing service refactor fixed a header signing issue I wasn't even aware of 😄

Comment thread tool/tsh/proxy.go Outdated
Copy link
Copy Markdown
Contributor

@mdwn mdwn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread tool/tsh/proxy.go Outdated
Comment thread tool/tsh/proxy.go
@greedy52 greedy52 enabled auto-merge (squash) January 10, 2023 14:27
@greedy52 greedy52 merged commit 286b810 into master Jan 10, 2023
@greedy52 greedy52 deleted the STeve/8281_athena_odbc_driver_support branch January 10, 2023 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

application-access aws Used for AWS Related Issues. feature-request Used for new features in Teleport, improvements to current should be #enhancements size/sm tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants