-
Notifications
You must be signed in to change notification settings - Fork 160
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 identity SAS #153
Conversation
We merged the code of azure-ruby-asm-core and fixed the merge validation. Please resolve the conflicts on the latest code.
PS: there string-to-sign in the doc: Create a user delegation SAS was wrong. I've sent a PR to fix it. If you already have code to generate the delegation SAS, please modify it accordingly (no signed identifier, singed resource type and signed blob snapshot time should be added). |
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.
My major concern was about dropping ruby version 2.3.0 and the version bumps up (2.0.0 instead of 1.2.0). Please rebase to the latest dev branch and change them. Thanks!
Also, we can only use target testing to verify the E2E scenario for user delegation key, please confirm in the thread that this is already covered. Thanks for your contribution!
.travis.yml
Outdated
- 2.2.2 | ||
- 2.4.1 | ||
- 2.5.0 | ||
- 2.4 |
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.
Why 2.3 is also dropped? Can we add it back?
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 dropped support for 2.3 since it's been end of life since 2019-03-31. I will add back the version.
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.
Added back support for 2.3 in 04e0917.
blob/BreakingChanges.md
Outdated
@@ -1,3 +1,7 @@ | |||
Tracking Breaking Changes in 1.2.0 | |||
|
|||
* This module now supports Ruby versions to 2.4 through 2.7 |
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.
2.3 would be still in support matrix for latest Nokogiri.
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.
Added back support for 2.3 in 04e0917.
blob/ChangeLog.md
Outdated
@@ -1,3 +1,7 @@ | |||
2020.2 - version 1.2.0 | |||
* This module now supports Ruby versions to 2.4 through 2.7 |
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.
Also, 2.3 :)
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.
Added back support for 2.3 in 04e0917.
blob/README.md
Outdated
@@ -9,12 +9,12 @@ This project provides a Ruby package that makes it easy to access and manage Mic | |||
|
|||
# Supported Ruby Versions | |||
|
|||
* Ruby 1.9.3 to 2.5 | |||
* Ruby 2.4 to 2.7 |
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.
2.3 :)
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.
Added back support for 2.3 in 04e0917.
blob/azure-storage-blob.gemspec
Outdated
@@ -38,10 +38,10 @@ Gem::Specification.new do |s| | |||
s.license = "MIT" | |||
s.files = `git ls-files ./lib/azure/storage/blob/`.split("\n") << "./lib/azure/storage/blob.rb" | |||
|
|||
s.required_ruby_version = ">= 1.9.3" | |||
s.required_ruby_version = ">= 2.4.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.
2.3
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.
Added back support for 2.3 in 04e0917.
blob/azure-storage-blob.gemspec
Outdated
|
||
s.add_runtime_dependency("azure-core", "~> 0.1.13") | ||
s.add_runtime_dependency("azure-storage-common", "~> 1.0") | ||
s.add_runtime_dependency("azure-storage-common", "~> 1.2") |
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.
Because this is breaking change, common will have to bump up to 2.0.0 among all other services.
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.
Bumped versions to 2.0.0 in 04e0917.
I updated the pull request to use Ruby 2.3 as the minimum version and bumped the versions of azure-storage-blob and azure-storage-common to 2.0.0
For testing, You can run the test by setting the environment variables
Done. I rebased with the
I dropped support for 2.3 since it's been end of life since 2019-03-31. I can add back the version since the code should still work on 2.3.
As per the comment in
Since the docs were incorrect when I was working on this, I adapted the implementation of the signature from the Python SDK (see code) so the code in this pull request should already be correct. |
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.
LGTM except the blob version in default.rb. This will be fixed after the PR being merged.
Since API version 2018-11-09, we can use Azure Active Directory credentials to authenticate with storage services which is crucial for enterprise and multi-tenancy use-cases. This pull request adds support for this functionality.
Relevant supporting content:
When running the integration tests locally, I noticed that a few of them fail with this branch. However, several of the integration tests also fail for me with the current master branch. Any help that you could provide with regards to working on the integration tests would be much appreciated.
This change also adds a new integration test for the identity SAS which requires three new environment variables to be set:
AZURE_TENANT_ID
,AZURE_CLIENT_ID
andAZURE_CLIENT_SECRET
. These environment variables specify the Azure Active Directory identity to use for the new integration test. Note that the identity must be granted the "Storage Blob Data Contributor" and "Storage Blob Delegator" permissions on the storage account. The following bash script can be used to set up the required Azure Active Directory configuration and environment variables: