From 42ce7ae5e96e5602562cd227c0fabf953cc1f042 Mon Sep 17 00:00:00 2001 From: siminsavani-msft <77068571+siminsavani-msft@users.noreply.github.com> Date: Thu, 6 Oct 2022 12:43:50 -0400 Subject: [PATCH 1/5] Updating service versions and comments --- .../internal/exported/user_delegation_credential.go | 10 +++++----- sdk/storage/azblob/sas/query_params.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sdk/storage/azblob/internal/exported/user_delegation_credential.go b/sdk/storage/azblob/internal/exported/user_delegation_credential.go index b0aca86eea63..2e2dd16e426c 100644 --- a/sdk/storage/azblob/internal/exported/user_delegation_credential.go +++ b/sdk/storage/azblob/internal/exported/user_delegation_credential.go @@ -30,12 +30,12 @@ type UserDelegationCredential struct { userDelegationKey UserDelegationKey } -// AccountName returns the Storage account's Name +// getAccountName returns the Storage account's Name func (f *UserDelegationCredential) getAccountName() string { return f.accountName } -// GetUDKParams is a helper method for accessing the user delegation key parameters outside of this package. +// GetAccountName is a helper method for accessing the user delegation key parameters outside this package. func GetAccountName(udc *UserDelegationCredential) string { return udc.getAccountName() } @@ -48,17 +48,17 @@ func (f *UserDelegationCredential) computeHMACSHA256(message string) (string, er return base64.StdEncoding.EncodeToString(h.Sum(nil)), err } -// ComputeUDCHMACSHA256 is a helper method for computing the signed string outside of this package. +// ComputeUDCHMACSHA256 is a helper method for computing the signed string outside this package. func ComputeUDCHMACSHA256(udc *UserDelegationCredential, message string) (string, error) { return udc.computeHMACSHA256(message) } -// GetUDKParams returns UserDelegationKey +// getUDKParams returns UserDelegationKey func (f *UserDelegationCredential) getUDKParams() *UserDelegationKey { return &f.userDelegationKey } -// GetUDKParams is a helper method for accessing the user delegation key parameters outside of this package. +// GetUDKParams is a helper method for accessing the user delegation key parameters outside this package. func GetUDKParams(udc *UserDelegationCredential) *UserDelegationKey { return udc.getUDKParams() } diff --git a/sdk/storage/azblob/sas/query_params.go b/sdk/storage/azblob/sas/query_params.go index f439b86c30e9..1a9c8c12d17b 100644 --- a/sdk/storage/azblob/sas/query_params.go +++ b/sdk/storage/azblob/sas/query_params.go @@ -23,7 +23,7 @@ const ( var ( // Version is the default version encoded in the SAS token. - Version = "2019-12-12" + Version = "2020-02-10" ) // TimeFormats ISO 8601 format. From 933df5603c4b06a06d6bad3529142c45bfcc6f55 Mon Sep 17 00:00:00 2001 From: siminsavani-msft <77068571+siminsavani-msft@users.noreply.github.com> Date: Thu, 6 Oct 2022 12:49:49 -0400 Subject: [PATCH 2/5] Adding to commented test --- sdk/storage/azblob/service/client_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/storage/azblob/service/client_test.go b/sdk/storage/azblob/service/client_test.go index 491dd3048478..1f044fcad416 100644 --- a/sdk/storage/azblob/service/client_test.go +++ b/sdk/storage/azblob/service/client_test.go @@ -600,6 +600,7 @@ func (s *ServiceUnrecordedTestsSuite) TestSASContainerClient2() { //_require.Nil(err) } +// Note: Test is commented out because it needs a valid ManagedIdentityCredential to run. /*func (s *ServiceRecordedTestsSuite) TestUserDelegationSAS() { _require := require.New(s.T()) testName := s.T().Name() @@ -609,7 +610,7 @@ func (s *ServiceUnrecordedTestsSuite) TestSASContainerClient2() { cred, err := azidentity.NewManagedIdentityCredential(&optsClientID) _require.Nil(err) - svcClient, err := azblob.NewClient(fmt.Sprintf("https://%s.blob.core.windows.net/", accountName), cred, &azblob.ClientOptions{}) + svcClient, err := service.NewClient(fmt.Sprintf("https://%s.blob.core.windows.net/", accountName), cred, &service.ClientOptions{}) _require.Nil(err) // Set current and past time, create KeyInfo From bb996ad5f00fc7ec97a6a890529573ef71caceeb Mon Sep 17 00:00:00 2001 From: siminsavani-msft <77068571+siminsavani-msft@users.noreply.github.com> Date: Thu, 6 Oct 2022 13:46:06 -0400 Subject: [PATCH 3/5] Updating CHANGELOG.md --- sdk/storage/azblob/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/sdk/storage/azblob/CHANGELOG.md b/sdk/storage/azblob/CHANGELOG.md index cd2e82d5d9f5..85a3d0bec901 100644 --- a/sdk/storage/azblob/CHANGELOG.md +++ b/sdk/storage/azblob/CHANGELOG.md @@ -9,6 +9,7 @@ ### Bugs Fixed * `GetSASURL()`: for container and blob clients, don't add a forward slash before the query string +* Fixed issue [#19249](https://github.com/Azure/azure-sdk-for-go/issues/19249) by increasing service version to '2020-02-10'. ### Other Changes From 5acfe92005e859bd80c47a4d2a866772bf636445 Mon Sep 17 00:00:00 2001 From: siminsavani-msft <77068571+siminsavani-msft@users.noreply.github.com> Date: Thu, 6 Oct 2022 15:44:55 -0400 Subject: [PATCH 4/5] Update azcore version to 1.1.4 --- sdk/storage/azblob/CHANGELOG.md | 1 + sdk/storage/azblob/go.mod | 2 +- sdk/storage/azblob/go.sum | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azblob/CHANGELOG.md b/sdk/storage/azblob/CHANGELOG.md index 85a3d0bec901..2c022ceb0d71 100644 --- a/sdk/storage/azblob/CHANGELOG.md +++ b/sdk/storage/azblob/CHANGELOG.md @@ -14,6 +14,7 @@ ### Other Changes * Improved docs for client constructors. +* Updating azcore version to 1.1.4 ## 0.5.0 (2022-09-29) diff --git a/sdk/storage/azblob/go.mod b/sdk/storage/azblob/go.mod index ed68a7091d62..2b71c74e4c18 100644 --- a/sdk/storage/azblob/go.mod +++ b/sdk/storage/azblob/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/storage/azblob go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4 github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 github.com/stretchr/testify v1.7.1 diff --git a/sdk/storage/azblob/go.sum b/sdk/storage/azblob/go.sum index 9aceed9cdd55..5abbcfac1f3f 100644 --- a/sdk/storage/azblob/go.sum +++ b/sdk/storage/azblob/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 h1:lneMk5qtUMulXa/eVxjVd+/bDYMEDIqYpLzLa2/EsNI= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4 h1:pqrAR74b6EoR4kcxF7L7Wg2B8Jgil9UUZtMvxhEFqWo= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 h1:XUNQ4mw+zJmaA2KXzP9JlQiecy1SI+Eog7xVkPiqIbg= From deb9f79d12c450f429d296ffa26416671ac21f1a Mon Sep 17 00:00:00 2001 From: siminsavani-msft <77068571+siminsavani-msft@users.noreply.github.com> Date: Thu, 6 Oct 2022 16:04:38 -0400 Subject: [PATCH 5/5] Updating azcore for perf tests --- sdk/storage/azblob/testdata/perf/go.mod | 2 +- sdk/storage/azblob/testdata/perf/go.sum | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sdk/storage/azblob/testdata/perf/go.mod b/sdk/storage/azblob/testdata/perf/go.mod index 286a3b87a8f2..da98e9603de3 100644 --- a/sdk/storage/azblob/testdata/perf/go.mod +++ b/sdk/storage/azblob/testdata/perf/go.mod @@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/testdata/perf go 1.18 require ( - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4 github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0 ) diff --git a/sdk/storage/azblob/testdata/perf/go.sum b/sdk/storage/azblob/testdata/perf/go.sum index a915a2758bd1..2888fa3e6b8d 100644 --- a/sdk/storage/azblob/testdata/perf/go.sum +++ b/sdk/storage/azblob/testdata/perf/go.sum @@ -1,13 +1,21 @@ -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 h1:lneMk5qtUMulXa/eVxjVd+/bDYMEDIqYpLzLa2/EsNI= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4 h1:pqrAR74b6EoR4kcxF7L7Wg2B8Jgil9UUZtMvxhEFqWo= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 h1:XUNQ4mw+zJmaA2KXzP9JlQiecy1SI+Eog7xVkPiqIbg= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=