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

Add support for more authentication methods #178

Merged
merged 4 commits into from
Nov 30, 2021
Merged

Add support for more authentication methods #178

merged 4 commits into from
Nov 30, 2021

Conversation

sdebruyn
Copy link
Member

I've been struggling with the current authentication methods and they always require a little bit of configuration effort while authentication with other azure-identity-based packages usually works quite easily.

So I've added 3 new ways to authenticate to your Azure databases:

  • Automatic (really the easiest way)
  • By reading environment variables
  • Managed identity

All methods are properly documented on https://docs.microsoft.com/en-us/python/api/overview/azure/identity-readme?view=azure-python but I've updated the README as well.

I added tests for everything except managed identity since that is impossible to test without an actual managed identity configured.

I removed the storage of client ID & secret in the service principal authentication as environment variables to avoid side effects from using DefaultAzureCredential and to avoid leaking credentials outside of this context.

Copy link
Contributor

@JCZuurmond JCZuurmond left a comment

Choose a reason for hiding this comment

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

LGTM

I see you ran black, which is fine with me. Maybe @swanderz we should add this in a pre-commit hook and test for it in the pipeline see #72

Copy link
Collaborator

@dataders dataders left a comment

Choose a reason for hiding this comment

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

@sdebruyn this looks great! I especially love the tests you added and the documentation. happy to merge and release a new version with this change ASAP. can you please first:

  • increment the version in dbt/adapters/sqlserver/__version__.py to 0.21.1?
  • add an entry for v0.21.1 to CHANGELOG.md?

@sdebruyn
Copy link
Member Author

@swanderz done :)

Copy link
Collaborator

@dataders dataders left a comment

Choose a reason for hiding this comment

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

thanks @sdebruyn!!!

@dataders dataders merged commit 101f519 into dbt-msft:master Nov 30, 2021
@sdebruyn sdebruyn deleted the more-auth-support branch December 1, 2021 10:21
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.

3 participants