Skip to content

Commit 46e8351

Browse files
Updating SAS Version (Azure#19299)
* Updating service versions and comments * Adding to commented test * Updating CHANGELOG.md * Update azcore version to 1.1.4 * Updating azcore for perf tests
1 parent aa2a8a1 commit 46e8351

File tree

8 files changed

+24
-13
lines changed

8 files changed

+24
-13
lines changed

sdk/storage/azblob/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
### Bugs Fixed
1010

1111
* `GetSASURL()`: for container and blob clients, don't add a forward slash before the query string
12+
* Fixed issue [#19249](https://github.com/Azure/azure-sdk-for-go/issues/19249) by increasing service version to '2020-02-10'.
1213

1314
### Other Changes
1415

1516
* Improved docs for client constructors.
17+
* Updating azcore version to 1.1.4
1618

1719
## 0.5.0 (2022-09-29)
1820

sdk/storage/azblob/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/storage/azblob
33
go 1.18
44

55
require (
6-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2
6+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4
77
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0
88
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1
99
github.com/stretchr/testify v1.7.1

sdk/storage/azblob/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 h1:lneMk5qtUMulXa/eVxjVd+/bDYMEDIqYpLzLa2/EsNI=
2-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U=
1+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4 h1:pqrAR74b6EoR4kcxF7L7Wg2B8Jgil9UUZtMvxhEFqWo=
2+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U=
33
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8=
44
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0=
55
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 h1:XUNQ4mw+zJmaA2KXzP9JlQiecy1SI+Eog7xVkPiqIbg=

sdk/storage/azblob/internal/exported/user_delegation_credential.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ type UserDelegationCredential struct {
3030
userDelegationKey UserDelegationKey
3131
}
3232

33-
// AccountName returns the Storage account's Name
33+
// getAccountName returns the Storage account's Name
3434
func (f *UserDelegationCredential) getAccountName() string {
3535
return f.accountName
3636
}
3737

38-
// GetUDKParams is a helper method for accessing the user delegation key parameters outside of this package.
38+
// GetAccountName is a helper method for accessing the user delegation key parameters outside this package.
3939
func GetAccountName(udc *UserDelegationCredential) string {
4040
return udc.getAccountName()
4141
}
@@ -48,17 +48,17 @@ func (f *UserDelegationCredential) computeHMACSHA256(message string) (string, er
4848
return base64.StdEncoding.EncodeToString(h.Sum(nil)), err
4949
}
5050

51-
// ComputeUDCHMACSHA256 is a helper method for computing the signed string outside of this package.
51+
// ComputeUDCHMACSHA256 is a helper method for computing the signed string outside this package.
5252
func ComputeUDCHMACSHA256(udc *UserDelegationCredential, message string) (string, error) {
5353
return udc.computeHMACSHA256(message)
5454
}
5555

56-
// GetUDKParams returns UserDelegationKey
56+
// getUDKParams returns UserDelegationKey
5757
func (f *UserDelegationCredential) getUDKParams() *UserDelegationKey {
5858
return &f.userDelegationKey
5959
}
6060

61-
// GetUDKParams is a helper method for accessing the user delegation key parameters outside of this package.
61+
// GetUDKParams is a helper method for accessing the user delegation key parameters outside this package.
6262
func GetUDKParams(udc *UserDelegationCredential) *UserDelegationKey {
6363
return udc.getUDKParams()
6464
}

sdk/storage/azblob/sas/query_params.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323

2424
var (
2525
// Version is the default version encoded in the SAS token.
26-
Version = "2019-12-12"
26+
Version = "2020-02-10"
2727
)
2828

2929
// TimeFormats ISO 8601 format.

sdk/storage/azblob/service/client_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ func (s *ServiceUnrecordedTestsSuite) TestSASContainerClient2() {
611611
testcommon.ValidateBlobErrorCode(_require, err, bloberror.AuthorizationFailure)
612612
}
613613

614+
// Note: Test is commented out because it needs a valid ManagedIdentityCredential to run.
614615
/*func (s *ServiceRecordedTestsSuite) TestUserDelegationSAS() {
615616
_require := require.New(s.T())
616617
testName := s.T().Name()
@@ -620,7 +621,7 @@ func (s *ServiceUnrecordedTestsSuite) TestSASContainerClient2() {
620621
cred, err := azidentity.NewManagedIdentityCredential(&optsClientID)
621622
_require.Nil(err)
622623
623-
svcClient, err := azblob.NewClient(fmt.Sprintf("https://%s.blob.core.windows.net/", accountName), cred, &azblob.ClientOptions{})
624+
svcClient, err := service.NewClient(fmt.Sprintf("https://%s.blob.core.windows.net/", accountName), cred, &service.ClientOptions{})
624625
_require.Nil(err)
625626
626627
// Set current and past time, create KeyInfo

sdk/storage/azblob/testdata/perf/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/testdata/perf
33
go 1.18
44

55
require (
6-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2
6+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4
77
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1
88
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.0
99
)

sdk/storage/azblob/testdata/perf/go.sum

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2 h1:lneMk5qtUMulXa/eVxjVd+/bDYMEDIqYpLzLa2/EsNI=
2-
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.2/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U=
1+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4 h1:pqrAR74b6EoR4kcxF7L7Wg2B8Jgil9UUZtMvxhEFqWo=
2+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U=
3+
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8=
34
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1 h1:XUNQ4mw+zJmaA2KXzP9JlQiecy1SI+Eog7xVkPiqIbg=
45
github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w=
6+
github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 h1:BWe8a+f/t+7KY7zH2mqygeUD0t8hNFXe08p1Pb3/jKE=
57
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
68
github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c=
9+
github.com/golang-jwt/jwt v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c=
10+
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
11+
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
12+
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI=
713
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
814
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
15+
golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88 h1:Tgea0cVUD0ivh5ADBX4WwuI12DUd2to3nCYe2eayMIw=
916
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA=
1017
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
18+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
1119
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
1220
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
1321
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=

0 commit comments

Comments
 (0)