You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Azure AD authentication support (and SDK upgrade) (#9)
* A refactor of the `azure` module to support authenticating via either Azure AD or shared keys. This required a larger-than-expected series of changes because the Azure SDK now very different than the one stow used before. This is an early commit to get changes out there for discussion. Included here is:
- An upgrade of the Azure SDK used for the project (needed to support AD auth). This, unfortunately also brought in a whole series if indirect upgrades so testing will be needed.
- Support for authenticating via either Azure AD or Shared keys
- Removal of several azure config values (ConfigAPIVersion, ConfigUseHTTPS) and addition of ConfigUploadConcurrency.
- Removal of the multi-part upload code for Azure, this is now included in the SDK
- Addition of new presigned url tests into the general stow test/ module.
- Addition of a new terraform module to stand up an azure storage account for testing.
Signed-off-by: Terence Kent <terence.kent@mcg.com>
* fix misspellings (doh)
Signed-off-by: Terence Kent <terence.kent@mcg.com>
* Update azure/config.go
Accepting len(var)==0 vs var==""
Co-authored-by: Haytham Abuelfutuh <haytham@afutuh.com>
Signed-off-by: Terence Kent <terence.kent@mcg.com>
* Update azure/config.go
Accepting improved error message
Co-authored-by: Haytham Abuelfutuh <haytham@afutuh.com>
Signed-off-by: Terence Kent <terence.kent@mcg.com>
* Changes before moving PR from draft. No impact to tests or functionality at this point:
- Removed all inline context.Background() calls when using Azure SDK methods. Now set an explicit `ctx` variable at the top of each function.
- Added comments around the clock skew code, and moved all clock skews to 15 minutes (the azure-recommended value). Also left a comment explaining the decision.
- Made the use of removed config values an error state for validation. Added a test to ensure this happens.
- Moved some errant logging in the `checkMetadata` test method to only show up in inequality, to keep test output clean.
Signed-off-by: Terence Kent <terence.kent@mcg.com>
* Missed that the previous version of the Azure implementation silently ignored failures due to creating an already-existing container! The code from the old SDK to ignore "already exists" was preserved, but not working with the new SDK.
- Updated the check to work with the new SDK.
- Added a general test to confirm this behavior.
Note: It's debatable if this should be the default behavior for all stow implementations. However, it seems like whatever the desired behavior is, it should be consistent across all implementations.
Signed-off-by: Terence Kent <terence.kent@mcg.com>
---------
Signed-off-by: Terence Kent <terence.kent@mcg.com>
Co-authored-by: Terence Kent <terence.kent@mcg.com>
Co-authored-by: Haytham Abuelfutuh <haytham@afutuh.com>
0 commit comments