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

Authentication from config #177

Merged
merged 5 commits into from
Mar 3, 2022
Merged

Conversation

ShishirPatil
Copy link
Member

@ShishirPatil ShishirPatil commented Mar 1, 2022

Authentication for object stores. Azure was missing -> introduced. AWS moved to config file rather than environment variables

Solves #168
Related to #165 and #149

@ShishirPatil ShishirPatil requested a review from parasj March 1, 2022 22:27
@ShishirPatil ShishirPatil changed the title Dev/shishir/azure authentication Authentication from config Mar 1, 2022
@parasj parasj added AWS labels Mar 1, 2022
Copy link
Contributor

@parasj parasj left a comment

Choose a reason for hiding this comment

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

LGTM. Minor nit, can we avoid the [:-2] somehow (e.g. config.strip())?

except Exception as e:
logger.error(f"Failed to read AWS credentials locally {e}")
# copy config file
config = config_file.read_text()[:-2] + "}"
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose of the substring? Can we not load it via json.loads?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm concerned that the exact format of the JSON could change subtly. We should parse it and then dump it back as a string. Neat trick to use json.dumps to escape the string though.

@ShishirPatil ShishirPatil merged commit f513789 into main Mar 3, 2022
@ShishirPatil ShishirPatil deleted the dev/shishir/azure-authentication branch March 3, 2022 00:59
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

Successfully merging this pull request may close these issues.

2 participants