Skip to content

Support for authentication using Service principal #56

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nomtrosk
Copy link

@nomtrosk nomtrosk commented Feb 18, 2025

The design is as follow

  • In config.ex we determine which type of autentication the user has chosen
  • The selected method is used via the Auth module which is to replace the SharedKey.sign function everywhere
  • Introduced an azure_integration test tag that will test against the real azure blob storage
  • Barer tokens are requested from "https://login.microsoftonline.com" by default
  • Bearer tokens are cached between calls

@nomtrosk nomtrosk marked this pull request as draft February 18, 2025 19:57
 * In config.ex we determine which type of autentication the user has choosen
 * The selected method is used via the Auth module which is to replace the SharedKey.sign function everywhere
 * Introduced an azure_integration test tag that will test against the real azure blob stoage
@nomtrosk nomtrosk force-pushed the support-service-principals branch from 889709a to 285b5a7 Compare March 13, 2025 19:44
@nomtrosk nomtrosk marked this pull request as ready for review March 13, 2025 19:44
@nomtrosk nomtrosk changed the title WIP: Support for authentication Service principal Support for authentication Service principal Mar 13, 2025
@nomtrosk nomtrosk changed the title Support for authentication Service principal Support for authentication using Service principal Mar 13, 2025
@ktayah
Copy link

ktayah commented Mar 31, 2025

Awesome stuff, as a new user to this library. This PR came in just when I needed it. I found some issues when attempting to run this against CI and local testing that were easy to fix. I made those changes on a fork on my side and then extended this to allow for Managed Identities and User delegation SAS tokens.

The changes I made to get this PR working against CI can be seen here: https://github.com/ktayah/azurex/commits/support-service-principals/

Let me know what you want to do, I can open a PR to merge those changes into this PR to start and then bring the other changes in separate PRs

@nomtrosk
Copy link
Author

@ktayah Thanks a lot! I think you changes are great! We should get those merged into this pr, and then hopefully we can get @jakobht to approve and merge to main?

I Also need User delegated SAS tokens so your PR ktayah#5 will be very helpful! Thanks!

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