Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing a JWT into connect via an environment variable #474

Open
joemcdonnell opened this issue Sep 23, 2021 · 1 comment
Open

Allow passing a JWT into connect via an environment variable #474

joemcdonnell opened this issue Sep 23, 2021 · 1 comment

Comments

@joemcdonnell
Copy link
Collaborator

joemcdonnell commented Sep 23, 2021

Impyla recently added support for authenticating via a JWT bearer token passed in at connect time.

It would be useful to support some additional ways to pass in a JWT. For example, a user could specify the JWT via an environment variable or an environment variable that specifies a file containing the JWT. This could allow python programs to execute in a particular environment without having to specifying anything other than auth_mechanism=JWT.

One option is to add a parameter to connect() that specifies the environment variable that is a file containing the JWT (with a default value like "IMPYLA_JWT_FILE").

If the user specifies auth_mechanism=JWT, then the JWT value is determined by this preference order:
If the explicit jwt parameter on connect is set, use it
else if the environment has a value for the jwt file environment variable, read the file and use it
else give an error.

@yoderme
Copy link

yoderme commented Sep 27, 2021

I think that if auth_mechanism=JWT it's fine for us to dictate the name of the environment variable. However the name of this environment variable MUST be the same as what hive JDBC drivers use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants