Skip to content

Commit 999709a

Browse files
microzchangantkmsftazure-sdkbenbpdanieljurek
authored
Storage/Merge STG95 to main (#5885)
* Storage/STG95 Files OAuth - full data plane support (#5759) * File OAuth * Remove comment * update test record * [Storage STG95 Branch] Merge Main to fix cmake build error (#5796) * Update vcpkg SHA (#5757) Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> * Sync eng/common directory with azure-sdk-tools for PR 8528 (#5755) * Fix default value for env vars in build-test-resource-config template * Add empty pool condition --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> * Sync eng/common directory with azure-sdk-tools for PR 8516 (#5752) * Ensure subConfigFiles is not an empty string * Skip instances where $file is an empty string --------- Co-authored-by: Daniel Jurek <djurek@microsoft.com> * Sync eng/common directory with azure-sdk-tools for PR 8549 (#5762) * commit the file changes so that we can see them running * use standalone tool --------- Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com> * Disable codeql as it is causing build issues (#5761) All the other languages have disabled codeql and we are now hitting blocking issues when running codeql on macos (https://dev.azure.com/twcdot/Data/_workitems/edit/138580) and even on the other OS's the configuration causes the builds to run for a long time. * Delete eng/common/InterdependencyGraph.html which is unused. (#5763) Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> * Add missing include (#5766) * Update GitHubEventProcessor version to 1.0.0-dev.20240708.1 (#5768) Co-authored-by: James Suplizio <jasupliz@microsoft.com> * Provide a walkthrough for how to install the Azure SDK packages in a VS (#5751) MSBuild project via vcpkg. * Sync eng/common directory with azure-sdk-tools for PR 8558 (#5764) * Support storage network access and worm removal in remove test resources script * Move storage network access script to common resource helpers file * Improve storage container deletion resilience * Plumb through pool variable to live test cleanup template * Add sleep for network rule application --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> * add the ability to override default succeeded() conditioning by parameter (#5780) Co-authored-by: Scott Beddall <scbedd@microsoft.com> * Support regex/negative regex filters for stress test discovery. Add storage env defaults (#5779) Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> * Update vcpkg SHA (#5772) * Show-FailureLogs to include vcpkg build failure logs (#5776) * Show-FailureLogs to include vcpkg build failure logs * Add comment * Add proper array syntax * Use proper syntax to create an array even if there's only a single element Co-authored-by: Ben Broderick Phillips <ben@benbp.net> --------- Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net> * Turn federated auth on for Identity tests. (#5785) * Turn federated auth on for Identity tests. * Update test resources json. * Move tests to use azure pipeline credentials (#5754) * test1 * hgdfchg * remove the remnants of azure client secret * test KV with federated auth * UseFederatedAuth * fdsa * kv template with managed * try try again * retry permissions * add net acls * blunt force replace the resource json * put back stuff * trey again with new method * attempt * missed something * flip if else * Temporarily use empty sub config file path for preview cloud * remove client secret * try to fix the identity tests * live skip failing tests and return in samples * samples for identity fix * disable failing samples in identity * fix winhttp failing test * comment out code * remove managed identity * restore version from main * revert readme changes * PR comments * test 2 * clang * attempt default creds with pipeline chanined * clangs * identity test and clangs * oops * live * cleanup * reter * test * revert the DAC change * missed one * taking the samples to a farm upstate * PR comments * Fix bad merge --------- Co-authored-by: Daniel Jurek <djurek@microsoft.com> Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> * Update the RetryPolicy for the GA release, keeping ShouldRetry extension point hidden. (#5771) * Update the RetryPolicy for the GA release, keeping ShouldRetry extension point hidden. * Mark test helper virtual functions private, so they aren't accessible/callable by callers. * Update the changelog. * Update CL. * Azure Core July GA Release (#5792) Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> * Revert commits related to the new RetryPolicy method (#5793) * Revert "Update the RetryPolicy for the GA release, keeping ShouldRetry extension point hidden. (#5771)" This reverts commit 9ccd206. * Revert "Update the RetryPolicy and ShouldRetry customization logic to allow loosening the retry condition. (#5656)" This reverts commit f1d9552. * Do not remove changelog entry from a previous beta release * Revert "Add a virtual ShouldRetry method to the RetryPolicy for customization. (#5584)" This reverts commit ab90ef6. --------- Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> * Sync eng/common directory with azure-sdk-tools for PR 8598 (#5777) * Set storage account test resources to disable blob public access * Skip adding network rules to storage accounts that don't need them during cleanup * Add succeeded check to set pipeline subnet info step * Disable network firewall by default in resource creation/removal --------- Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> * Increment package version after release of azure-core (#5794) * Acknowledge community contribution in the changelog (#5797) * Mention community contribution in the changelog * cspell * Remove double spaces --------- Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> --------- Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> Co-authored-by: Daniel Jurek <djurek@microsoft.com> Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: Robert Schulze <robert@clickhouse.com> Co-authored-by: James Suplizio <jasupliz@microsoft.com> Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net> Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com> * Storage/STG95 Premium Files Paid Burst (#5795) * paid burst * update record * Storeage/STG95 Files Binary ACE (#5824) * feature code * update test case to playback only * update records * fix cspell * update record * fix cspell * fix cspell * fix comments * Remove copy opreation rest code. * Storage/STG95 Support Sas StringToSign for debugging (#5830) * StringToSign * Update deprecate * Update Func name * ignore deprecated warning * Add missing ignore * fix clang format * Storage/STG95 Resolve Archboard Review Comments (#5856) * fix comments * fix comments * Add Create dir and upload from support (#5866) * merge test recordings * Remove other changes * Remove deprecated (#5873) * Remove others --------- Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com> Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com> Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com> Co-authored-by: Daniel Jurek <djurek@microsoft.com> Co-authored-by: Scott Beddall (from Dev Box) <scbedd@microsoft.com> Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com> Co-authored-by: Robert Schulze <robert@clickhouse.com> Co-authored-by: James Suplizio <jasupliz@microsoft.com> Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com> Co-authored-by: Ben Broderick Phillips <ben@benbp.net> Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com>
1 parent 7d5c76c commit 999709a

34 files changed

+1816
-751
lines changed

.vscode/cspell.json

+2
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@
228228
"Schulze",
229229
"scus",
230230
"SDDL",
231+
"Sddl",
232+
"sddl",
231233
"sdpath",
232234
"serializers",
233235
"Seriot",

sdk/storage/assets.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "cpp",
44
"TagPrefix": "cpp/storage",
5-
"Tag": "cpp/storage_c3a4a21ce9"
5+
"Tag": "cpp/storage_90767ef070"
66
}

sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/blob_sas_builder.hpp

+23
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,29 @@ namespace Azure { namespace Storage { namespace Sas {
327327
const Blobs::Models::UserDelegationKey& userDelegationKey,
328328
const std::string& accountName);
329329

330+
/**
331+
* @brief For debugging purposes only.
332+
*
333+
* @param credential
334+
* The storage account's shared key credential.
335+
* @return Returns the string to sign that will be used to generate the signature for the SAS
336+
* URL.
337+
*/
338+
std::string GenerateSasStringToSign(const StorageSharedKeyCredential& credential);
339+
340+
/**
341+
* @brief For debugging purposes only.
342+
*
343+
* @param userDelegationKey UserDelegationKey returned from
344+
* BlobServiceClient.GetUserDelegationKey.
345+
* @param accountName The name of the storage account.
346+
* @return Returns the string to sign that will be used to generate the signature for the SAS
347+
* URL.
348+
*/
349+
std::string GenerateSasStringToSign(
350+
const Blobs::Models::UserDelegationKey& userDelegationKey,
351+
const std::string& accountName);
352+
330353
private:
331354
std::string Permissions;
332355
};

sdk/storage/azure-storage-blobs/inc/azure/storage/blobs/rest_client.hpp

+213-397
Large diffs are not rendered by default.

sdk/storage/azure-storage-blobs/src/blob_sas_builder.cpp

+80
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,84 @@ namespace Azure { namespace Storage { namespace Sas {
323323
return builder.GetAbsoluteUrl();
324324
}
325325

326+
std::string BlobSasBuilder::GenerateSasStringToSign(const StorageSharedKeyCredential& credential)
327+
{
328+
std::string canonicalName = "/blob/" + credential.AccountName + "/" + BlobContainerName;
329+
if (Resource == BlobSasResource::Blob || Resource == BlobSasResource::BlobSnapshot
330+
|| Resource == BlobSasResource::BlobVersion)
331+
{
332+
canonicalName += "/" + BlobName;
333+
}
334+
std::string protocol = _detail::SasProtocolToString(Protocol);
335+
std::string resource = BlobSasResourceToString(Resource);
336+
337+
std::string snapshotVersion;
338+
if (Resource == BlobSasResource::BlobSnapshot)
339+
{
340+
snapshotVersion = Snapshot;
341+
}
342+
else if (Resource == BlobSasResource::BlobVersion)
343+
{
344+
snapshotVersion = BlobVersionId;
345+
}
346+
347+
std::string startsOnStr = StartsOn.HasValue()
348+
? StartsOn.Value().ToString(
349+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate)
350+
: "";
351+
std::string expiresOnStr = Identifier.empty()
352+
? ExpiresOn.ToString(
353+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate)
354+
: "";
355+
356+
return Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n"
357+
+ Identifier + "\n" + (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n"
358+
+ SasVersion + "\n" + resource + "\n" + snapshotVersion + "\n" + EncryptionScope + "\n"
359+
+ CacheControl + "\n" + ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage
360+
+ "\n" + ContentType;
361+
}
362+
363+
std::string BlobSasBuilder::GenerateSasStringToSign(
364+
const Blobs::Models::UserDelegationKey& userDelegationKey,
365+
const std::string& accountName)
366+
{
367+
std::string canonicalName = "/blob/" + accountName + "/" + BlobContainerName;
368+
if (Resource == BlobSasResource::Blob || Resource == BlobSasResource::BlobSnapshot
369+
|| Resource == BlobSasResource::BlobVersion)
370+
{
371+
canonicalName += "/" + BlobName;
372+
}
373+
std::string protocol = _detail::SasProtocolToString(Protocol);
374+
std::string resource = BlobSasResourceToString(Resource);
375+
376+
std::string snapshotVersion;
377+
if (Resource == BlobSasResource::BlobSnapshot)
378+
{
379+
snapshotVersion = Snapshot;
380+
}
381+
else if (Resource == BlobSasResource::BlobVersion)
382+
{
383+
snapshotVersion = BlobVersionId;
384+
}
385+
386+
std::string startsOnStr = StartsOn.HasValue()
387+
? StartsOn.Value().ToString(
388+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate)
389+
: "";
390+
std::string expiresOnStr = ExpiresOn.ToString(
391+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate);
392+
std::string signedStartsOnStr = userDelegationKey.SignedStartsOn.ToString(
393+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate);
394+
std::string signedExpiresOnStr = userDelegationKey.SignedExpiresOn.ToString(
395+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate);
396+
397+
return Permissions + "\n" + startsOnStr + "\n" + expiresOnStr + "\n" + canonicalName + "\n"
398+
+ userDelegationKey.SignedObjectId + "\n" + userDelegationKey.SignedTenantId + "\n"
399+
+ signedStartsOnStr + "\n" + signedExpiresOnStr + "\n" + userDelegationKey.SignedService
400+
+ "\n" + userDelegationKey.SignedVersion + "\n\n\n\n"
401+
+ (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n" + SasVersion + "\n"
402+
+ resource + "\n" + snapshotVersion + "\n" + EncryptionScope + "\n" + CacheControl + "\n"
403+
+ ContentDisposition + "\n" + ContentEncoding + "\n" + ContentLanguage + "\n" + ContentType;
404+
}
405+
326406
}}} // namespace Azure::Storage::Sas

sdk/storage/azure-storage-blobs/swagger/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ package-name: azure-storage-blobs
99
namespace: Azure::Storage::Blobs
1010
output-folder: generated
1111
clear-output-folder: true
12-
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.BlobStorage/stable/2021-12-02/blob.json
12+
input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/storage/data-plane/Microsoft.BlobStorage/stable/2024-08-04/blob.json
1313
```
1414
1515
## ModelFour Options

sdk/storage/azure-storage-blobs/test/ut/blob_sas_test.cpp

+78
Original file line numberDiff line numberDiff line change
@@ -771,4 +771,82 @@ namespace Azure { namespace Storage { namespace Test {
771771
EXPECT_TRUE(e.AdditionalInformation.count("ExtendedErrorDetail") != 0);
772772
}
773773
}
774+
775+
TEST(SasStringToSignTest, GenerateStringToSign)
776+
{
777+
std::string accountName = "testAccountName";
778+
std::string accountKey = "dGVzdEFjY291bnRLZXk=";
779+
std::string blobUrl = "https://testAccountName.blob.core.windows.net/container/blob";
780+
auto keyCredential = std::make_shared<StorageSharedKeyCredential>(accountName, accountKey);
781+
auto sasStartsOn = std::chrono::system_clock::now() - std::chrono::minutes(5);
782+
auto sasExpiresOn = std::chrono::system_clock::now() + std::chrono::minutes(60);
783+
784+
// Account Sas
785+
{
786+
Sas::AccountSasBuilder accountSasBuilder;
787+
accountSasBuilder.Protocol = Sas::SasProtocol::HttpsAndHttp;
788+
accountSasBuilder.StartsOn = sasStartsOn;
789+
accountSasBuilder.ExpiresOn = sasExpiresOn;
790+
accountSasBuilder.Services = Sas::AccountSasServices::Blobs;
791+
accountSasBuilder.ResourceTypes = Sas::AccountSasResource::All;
792+
accountSasBuilder.SetPermissions(Sas::AccountSasPermissions::Read);
793+
auto sasToken = accountSasBuilder.GenerateSasToken(*keyCredential);
794+
auto signature = Azure::Core::Url::Decode(
795+
Azure::Core::Url(blobUrl + sasToken).GetQueryParameters().find("sig")->second);
796+
auto stringToSign = accountSasBuilder.GenerateSasStringToSign(*keyCredential);
797+
auto signatureFromStringToSign = Azure::Core::Convert::Base64Encode(_internal::HmacSha256(
798+
std::vector<uint8_t>(stringToSign.begin(), stringToSign.end()),
799+
Azure::Core::Convert::Base64Decode(accountKey)));
800+
EXPECT_EQ(signature, signatureFromStringToSign);
801+
}
802+
803+
// Blob Sas
804+
{
805+
Sas::BlobSasBuilder blobSasBuilder;
806+
blobSasBuilder.Protocol = Sas::SasProtocol::HttpsAndHttp;
807+
blobSasBuilder.StartsOn = sasStartsOn;
808+
blobSasBuilder.ExpiresOn = sasExpiresOn;
809+
blobSasBuilder.BlobContainerName = "container";
810+
blobSasBuilder.BlobName = "blob";
811+
blobSasBuilder.Resource = Sas::BlobSasResource::Blob;
812+
blobSasBuilder.SetPermissions(Sas::BlobSasPermissions::Read);
813+
auto sasToken = blobSasBuilder.GenerateSasToken(*keyCredential);
814+
auto signature = Azure::Core::Url::Decode(
815+
Azure::Core::Url(blobUrl + sasToken).GetQueryParameters().find("sig")->second);
816+
auto stringToSign = blobSasBuilder.GenerateSasStringToSign(*keyCredential);
817+
auto signatureFromStringToSign = Azure::Core::Convert::Base64Encode(_internal::HmacSha256(
818+
std::vector<uint8_t>(stringToSign.begin(), stringToSign.end()),
819+
Azure::Core::Convert::Base64Decode(accountKey)));
820+
EXPECT_EQ(signature, signatureFromStringToSign);
821+
}
822+
823+
// Blob User Delegation Sas
824+
{
825+
Blobs::Models::UserDelegationKey userDelegationKey;
826+
userDelegationKey.SignedObjectId = "testSignedObjectId";
827+
userDelegationKey.SignedTenantId = "testSignedTenantId";
828+
userDelegationKey.SignedStartsOn = sasStartsOn;
829+
userDelegationKey.SignedExpiresOn = sasExpiresOn;
830+
userDelegationKey.SignedService = "b";
831+
userDelegationKey.SignedVersion = "2020-08-04";
832+
userDelegationKey.Value = accountKey;
833+
834+
Sas::BlobSasBuilder blobSasBuilder;
835+
blobSasBuilder.Protocol = Sas::SasProtocol::HttpsAndHttp;
836+
blobSasBuilder.StartsOn = sasStartsOn;
837+
blobSasBuilder.ExpiresOn = sasExpiresOn;
838+
blobSasBuilder.BlobContainerName = "container";
839+
blobSasBuilder.BlobName = "blob";
840+
blobSasBuilder.Resource = Sas::BlobSasResource::Blob;
841+
blobSasBuilder.SetPermissions(Sas::BlobSasPermissions::Read);
842+
auto sasToken = blobSasBuilder.GenerateSasToken(userDelegationKey, accountName);
843+
auto signature = Azure::Core::Url::Decode(
844+
Azure::Core::Url(blobUrl + sasToken).GetQueryParameters().find("sig")->second);
845+
auto stringToSign = blobSasBuilder.GenerateSasStringToSign(userDelegationKey, accountName);
846+
auto signatureFromStringToSign = Azure::Core::Convert::Base64Encode(_internal::HmacSha256(
847+
std::vector<uint8_t>(stringToSign.begin(), stringToSign.end()),
848+
Azure::Core::Convert::Base64Decode(accountKey)));
849+
EXPECT_EQ(signature, signatureFromStringToSign);
850+
}
851+
}
774852
}}} // namespace Azure::Storage::Test

sdk/storage/azure-storage-common/inc/azure/storage/common/account_sas_builder.hpp

+10
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,16 @@ namespace Azure { namespace Storage { namespace Sas {
286286
*/
287287
std::string GenerateSasToken(const StorageSharedKeyCredential& credential);
288288

289+
/**
290+
* @brief For debugging purposes only.
291+
*
292+
* @param credential
293+
* The storage account's shared key credential.
294+
* @return Returns the string to sign that will be used to generate the signature for the SAS
295+
* URL.
296+
*/
297+
std::string GenerateSasStringToSign(const StorageSharedKeyCredential& credential);
298+
289299
private:
290300
std::string Permissions;
291301
};

sdk/storage/azure-storage-common/src/account_sas_builder.cpp

+46
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,50 @@ namespace Azure { namespace Storage { namespace Sas {
144144
return builder.GetAbsoluteUrl();
145145
}
146146

147+
std::string AccountSasBuilder::GenerateSasStringToSign(
148+
const StorageSharedKeyCredential& credential)
149+
{
150+
std::string protocol = _detail::SasProtocolToString(Protocol);
151+
152+
std::string services;
153+
if ((Services & AccountSasServices::Blobs) == AccountSasServices::Blobs)
154+
{
155+
services += "b";
156+
}
157+
if ((Services & AccountSasServices::Queue) == AccountSasServices::Queue)
158+
{
159+
services += "q";
160+
}
161+
if ((Services & AccountSasServices::Files) == AccountSasServices::Files)
162+
{
163+
services += "f";
164+
}
165+
166+
std::string resourceTypes;
167+
if ((ResourceTypes & AccountSasResource::Service) == AccountSasResource::Service)
168+
{
169+
resourceTypes += "s";
170+
}
171+
if ((ResourceTypes & AccountSasResource::Container) == AccountSasResource::Container)
172+
{
173+
resourceTypes += "c";
174+
}
175+
if ((ResourceTypes & AccountSasResource::Object) == AccountSasResource::Object)
176+
{
177+
resourceTypes += "o";
178+
}
179+
180+
std::string startsOnStr = StartsOn.HasValue()
181+
? StartsOn.Value().ToString(
182+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate)
183+
: "";
184+
std::string expiresOnStr = ExpiresOn.ToString(
185+
Azure::DateTime::DateFormat::Rfc3339, Azure::DateTime::TimeFractionFormat::Truncate);
186+
187+
return credential.AccountName + "\n" + Permissions + "\n" + services + "\n" + resourceTypes
188+
+ "\n" + startsOnStr + "\n" + expiresOnStr + "\n"
189+
+ (IPRange.HasValue() ? IPRange.Value() : "") + "\n" + protocol + "\n" + SasVersion + "\n"
190+
+ EncryptionScope + "\n";
191+
}
192+
147193
}}} // namespace Azure::Storage::Sas

sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_sas_builder.hpp

+23
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,29 @@ namespace Azure { namespace Storage { namespace Sas {
341341
const Files::DataLake::Models::UserDelegationKey& userDelegationKey,
342342
const std::string& accountName);
343343

344+
/**
345+
* @brief For debugging purposes only.
346+
*
347+
* @param credential
348+
* The storage account's shared key credential.
349+
* @return Returns the string to sign that will be used to generate the signature for the SAS
350+
* URL.
351+
*/
352+
std::string GenerateSasStringToSign(const StorageSharedKeyCredential& credential);
353+
354+
/**
355+
* @brief For debugging purposes only.
356+
*
357+
* @param userDelegationKey UserDelegationKey returned from
358+
* BlobServiceClient.GetUserDelegationKey.
359+
* @param accountName The name of the storage account.
360+
* @return Returns the string to sign that will be used to generate the signature for the SAS
361+
* URL.
362+
*/
363+
std::string GenerateSasStringToSign(
364+
const Blobs::Models::UserDelegationKey& userDelegationKey,
365+
const std::string& accountName);
366+
344367
private:
345368
std::string Permissions;
346369
};

0 commit comments

Comments
 (0)