-
Notifications
You must be signed in to change notification settings - Fork 65
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 azure auth method #293
Add support for azure auth method #293
Conversation
Docs Build 📝Thank you for contribution!✨ This PR has been merged and the docs are now incorporated into |
Hi @jchenship ! Thanks for opening this MR!
Check out the Contributor guide for how to check out the collection to the proper directory structure. From there, you can run:
If you have trouble running the container, you can try to run the same with As an alternative, you can try:
I've kicked off a CI run, and here's the result of the unit tests: It seems at a minimum you'll need to add your requirements to Unfortunately since you're a new contributor, I have to click the button to allow CI to run for every change you push, so it will be much faster for you to get the tests running locally. I haven't looked very deeply at the changes yet, but on the surface they look good. In addition to unit tests, you'll also need integration tests. Since we don't have access to Azure in the CI, we can do this via MMock to mock the responses from Vault. This is how we test AWS and LDAP right now, so you can take a look at how that works. This is described a little bit in this comment #78 (comment) and also in the Contributor guide. Since you've already got a fixture in place for the units, adding the appropriate mocks in MMock should be relatively easy as well. Minor nit: update the copyright name and date in the files you're adding. The sanity tests in the collection have been failing in the collection recently with these errors: I have not had the time to investigate and fix those; they will fail for you too, you may ignore those for now, however do not ignore any other sanity test failures you see. Sanity tests can be run locally too:
It's ok if you can't get the hang of all the pieces, I can help get that stuff over the line, but it may take a little while. You've caught me at a time where I have a lot going on and will be out of town until next week, so I apologize for slow responses. |
@briantist thanks a lot for the tips and feedback, I'm quite busy at work in the weekdays as well, I will continue to work on this during the weekend because |
@briantist I fixed unit tests and added integration tests, they passed in CI. So requesting a review, thank you! The only thing is there're failed sanity tests but don't seem to be related to by changes so I'm not sure what to do with it. |
@jchenship thank you! This is looking great, I think nearly complete. I just landed #297 which will fix the sanity tests. Please rebase so we can get the full CI run and see coverage. We'll still need at least a few minor changes, but let's push up the rebase first to get the CI complete. Small changes needed after that:
I would like to release the collection version 3.2.0 today or tomorrow, because it contains a bugfix that has already affected some users (#294). If we can finish this up quickly, we can include this in 3.2.0 also. If not, I will look to release that first, and this can go into 3.3.0, which is not a problem at all, I have no issue with making a new release very quickly after the other one. |
5860d90
to
68fb225
Compare
Codecov Report
@@ Coverage Diff @@
## main #293 +/- ##
==========================================
+ Coverage 98.46% 98.52% +0.05%
==========================================
Files 71 73 +2
Lines 3464 3602 +138
Branches 301 321 +20
==========================================
+ Hits 3411 3549 +138
Misses 44 44
Partials 9 9
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@briantist Hey I have fixed all the things you mentioned, please have another review, and release it in 3.2.0 if it's ok, thank you! Otherwise I will continue to fix it and hopefully we can release it in 3.3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm making some suggestions here that are mostly about wording/text changes.
I will accept commit these changes right away, but if you disagree with any of them we can discuss and change them to something else.
I have some other code changes but they are hard to do via review comments, so I will check out your PR and push some changes directly to your branch.
I'll let you know when ready so you can pull down the commits, and look over the changes I've made.
Thanks again, this is really great!
forgot to commit this one before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jchenship I think this is ready to go, please have a look at the commits I added and let me know if you think any other changes are needed, or if you have questions.
I tried to make smaller commits so it is easier to see what changes I made, I hope it's helpful.
@briantist Yeah that looks good to me, thanks for your help to refine the PR, look forward for it to be released! |
@jchenship thank you so much for this contribution! I hope you'll consider more in the future :) This is now released as part of version 3.2.0! 🎉 |
SUMMARY
Fixes #78
Supports 3 types of azure auth
jwt
) directlyISSUE TYPE
COMPONENT NAME
module_utils/_auth_method_azure.py
ADDITIONAL INFORMATION
Currently I'm not sure how to run unit tests locally, but I verify this on my azure vm with
jwt
service principal
managed identity
result