Commit Graph

3340 Commits

Author SHA1 Message Date
Anton Kolesnyk
91608bb5dc
Uuid::operator==(): self-comparison optimization, and more tests (#5939)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-08-27 14:22:21 -07:00
Azure SDK Bot
5c082753ac
Sync eng/common directory with azure-sdk-tools for PR 8865 (#5933)
* bump proxy version

* bump proxy version

* restore most of the old performance, only fall back to json matching when something goes wrong

* use newest version with protection from invalid json

---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
2024-08-25 11:36:13 -07:00
Anton Kolesnyk
ee0c7565df
Uuid: add default ctor and Parse() (#5935)
* Uuid: add default ctor and Parse()

* Fix merge, integrate better

* nano-optimization for IsNil()

* Changelog

* Pedantism

* GCC fix

* GCC fix (include <stdexcept>)

* PR feedback

* Update sdk/core/azure-core/test/ut/uuid_test.cpp

Co-authored-by: Rick Winter <rick.winter@microsoft.com>

* Comments for bad tests

* Add doxygen comments

* One more constexpr, and clang-format

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2024-08-23 23:15:24 -07:00
Azure SDK Bot
227ae0ea0b
Allow Save-package-properties to exit 0 when prs produce no package changes (#5936)
Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
2024-08-23 17:15:24 -07:00
Ahson Khan
d8b555a670
Optimize Uuid.ToString() by avoiding using sprintf to do the basic string transformation (#5925)
* Optimize Uuid.ToString() to use a cached value on multiple calls.

* Add tests which call ToString() multiple times.

* Optimize Uuid::ToString by avoiding using sprintf.

* Assert all byte values will fit into a hex character.

* Update comment in test.
2024-08-22 17:34:17 -07:00
Larry Osterman
ef538101f2
V2 of integrating uAMQP vixes into vendored copy (#5931) 2024-08-21 12:19:31 -07:00
JinmingHu
40fa516d87
reduce stack usage (#5929) 2024-08-21 13:06:57 +08:00
Ahson Khan
7a9c54d915
Remove the ResourceIdentifier accepting ctor overload for ManagedIdentityCredential. (#5928) 2024-08-19 15:07:55 -07:00
Ahson Khan
042d2ed734
Add more input validation for passing in an empty id, or an invalid enum value. (#5924)
* Add more input validation for passing in an empty id, or an invalid enum
value.

* Fix typo in exception message.
2024-08-19 10:35:07 -07:00
Larry Osterman
d74b08f8b3
AMQP static analysis fixes (#5918)
* AMQP static analysis fixes?
2024-08-16 20:49:06 -07:00
Ahson Khan
54a7bc363b
Add support for providing an object ID to ManagedIdentityCredential. (#5910)
* Add support for providing an object ID to ManagedIdentityCredential.

* Update cspell checks.

* Add support for creating a Uuid from a string, and use that as the
MICred overload for objectId.

* Add a remark comment to make it clear that object and client ids are not interchangeable.

* Remove the non-const ToString() as that isn't required.

* Update tests to use valid hex Uuid values.

* Use a discriminated union design approach with a ManagedIdentityType
object and ManagedIdentityIdType enum.

* Fix typo and remove Uuid CreateFromString.

* Address PR feedback.

* Update doc comment.

* Update comments and exception message to consistently use hyphens
between user/system and assigned.
2024-08-16 20:47:05 -07:00
Azure SDK Bot
758460d618
Add FilePattern support for .github\workflow sync (#5919)
Given we cannot create subfolders under .github\workflow folder
and we have repos that want additional workflows then we have
in the tools repo we need to setup a file pattern matching for
the sync processing to only sync the ones we want to be common.

For now just use the existing *event* pattern but we can move them
to another pattern similar to *common* or *sync* in the future as
we add more common workflows.

Co-authored-by: Wes Haggard <Wes.Haggard@microsoft.com>
2024-08-16 14:03:15 -07:00
Azure SDK Bot
211b1fdb95
Sync .github/workflows directory with azure-sdk-tools repository (#5920) 2024-08-16 13:14:53 -07:00
Wes Haggard
244b4b5d51
Remove azure-sdk-docs-prod-blob-name usage (#5911) 2024-08-16 12:25:19 -07:00
Larry Osterman
863e2b2b91
Ported uAMQP changes to vendored copy of uAMQP (#5917) 2024-08-15 22:28:08 -07:00
George Arama
d609c00412
Backup Tests redo PR (#5916)
* redo PR

* fdedws

* added logging
2024-08-15 23:13:21 +00:00
Azure SDK Bot
6d77ab85dc
Sync eng/common directory with azure-sdk-tools for PR 8842 (#5912)
* Clean-up publish-blobs.yml to have better defaults

* Update copy-docs-to-blobstorage.ps1

* Update publish-blobs.yml

---------

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
2024-08-15 10:45:52 -07:00
Azure SDK Bot
4d829f32ba
Sync eng/common directory with azure-sdk-tools for PR 8830 (#5915)
* Add RestAPISpecsDocsRepos to branch cleanup.

* Remove commented out yml, add pre-message to limit output and output core limit at the start of processing

* updates for feedback

---------

Co-authored-by: James Suplizio <jasupliz@microsoft.com>
2024-08-15 10:03:50 -07:00
Azure SDK Bot
c3e0967d16
Sync eng/common directory with azure-sdk-tools for PR 8831 (#5913)
* we want the path that we write to to be defined by literalpath, otherwise files with [ or ] will break powershell when writing the file to disk

* slight wording adjustment so the command can be invoked directly

---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
2024-08-14 17:58:38 -07:00
Ahson Khan
cf562e0d12
Do not pass a client ID into the request body for MICredential within a Cloud Shell environment, but rather throw, as not supported. (#5837)
* Do not pass in a client ID into the request body in a Cloud Shell
environment, but rather throw, as not supported.

* Address PR feedback - reword exception to avoid mention of SAI.

* Address PR feedback - use param name in exception.
2024-08-13 16:26:03 -07:00
George Arama
f85dd16ab9
Identity perf pipeline run triggers (#5892)
* update changelog

* test 1
2024-08-12 15:37:14 -07:00
Ahson Khan
4f77d817b9
Revert "Pull beta-only changes out of identity for the August GA release (#5863)" (#5889)
This reverts commit 60dff1dac1.
2024-08-09 11:35:24 -07:00
Azure SDK Bot
59aa20e3fa
Increment version for storage releases (#5887)
* Increment package version after release of azure-storage-common

* Increment package version after release of azure-storage-blobs

* Increment package version after release of azure-storage-files-datalake

* Increment package version after release of azure-storage-files-shares

* Increment package version after release of azure-storage-queues
2024-08-08 09:21:21 +00:00
Azure SDK Bot
b4020493c4
Sync eng/common directory with azure-sdk-tools for PR 8754 (#5884)
* more compatibility with expanding/contracting packages. add ability for packages to have DependentPackages that must be included in the set of packages that should be built given a changeset


---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
Co-authored-by: Scott Beddall <45376673+scbedd@users.noreply.github.com>
Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
2024-08-07 16:18:42 -07:00
George Arama
70dc0ebecb
Log policy extra headers (#5868)
* log policy extra headers

* failing test

* adding back WWW-Authenticate

* changelog update

* Update sdk/core/azure-core/CHANGELOG.md

Co-authored-by: Ahson Khan <ahkha@microsoft.com>

---------

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2024-08-07 17:40:37 +00:00
Azure SDK Bot
28baef9b80
Increment package version after release of azure-identity (#5880) 2024-08-07 10:21:36 -07:00
Azure SDK Bot
5c642fc59a
Increment package version after release of azure-data-tables (#5879) 2024-08-07 10:02:46 -07:00
Azure SDK Bot
b68ced4c2c
Increment package version after release of azure-security-keyvault-administration (#5882) 2024-08-07 10:02:04 -07:00
Azure SDK Bot
3e21abaf74
Increment package version after release of azure-data-tables (#5883) 2024-08-07 10:01:41 -07:00
microzchang
da1f9ddf3b
Storage August Release (#5886)
* Update to Aug version

* Update change log

* Update change log
2024-08-07 13:57:14 +08:00
microzchang
999709ab98
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 9ccd206ff8.

* Revert "Update the RetryPolicy and ShouldRetry customization logic to allow loosening the retry condition. (#5656)"

This reverts commit f1d95520d1.

* 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 ab90ef68b0.

---------

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>
2024-08-07 12:18:48 +08:00
George Arama
7d5c76c24a
update changelog (#5881) 2024-08-06 14:55:58 -07:00
Azure SDK Bot
65e2547763
Sync eng/common directory with azure-sdk-tools for PR 8760 (#5874)
* Do not mark values as secret that are from git-hosted sub config files

* Simplify sub config build yaml

---------

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
2024-08-06 12:54:24 -07:00
Azure SDK Bot
4da0180c98
bump proxy to one with an audit log and more correct locking (#5878)
Co-authored-by: Scott Beddall <scbedd@microsoft.com>
2024-08-06 12:32:07 -07:00
George Arama
d151ac9691
Tables Release (#5859) 2024-08-06 12:07:33 -07:00
George Arama
51ea990395
release (#5857) 2024-08-06 12:07:26 -07:00
Ahson Khan
bee901e0b0
Update the TSG for AzurePipelinesCredential. (#5736)
* Update the TSG for AzurePipelinesCredential.

* Add a section to APC TSG about invalid client id.

* Add more error cases.

* Revert test change.
2024-08-02 17:44:08 -07:00
Ahson Khan
1d9ccf4434
Prepare for the August Identity GA release. (#5862) 2024-08-02 16:07:13 -07:00
Ahson Khan
60dff1dac1
Pull beta-only changes out of identity for the August GA release (#5863)
* Revert "Add support for providing a Resource ID to ManagedIdentityCredential. (#5832)"

This reverts commit 193bbe6963.

* Revert "Add support for customizing the IMDS endpoint within ManagedIdentityCredential using an env var. (#5834)"

This reverts commit 00304a0556.
2024-08-02 16:06:04 -07:00
Ahson Khan
5fd26a6832
Use client assertion credential within AzurePipelinesCredential and WorkloadIdentityCredential (#5802)
* Use ClientAssertionCredential within AzurePipelinesCredential.

* Use ClientAssertionCredential in WorkloadIdentityCredential.

* Fix DefaultAzureCredentia.LogMessages test since an extra log got added.

* Disable tests that dont correctly simulate the token request and return
the test response.

* Address PR feedback and make sure base options are passed in to underlying
client assertion credential.

* Address PR feedback - move credential ctor into validation checks.

* Address PR feedback, add const.

* Add a ClientAssertionCredentialImpl to make sure logs use the calling
credential name.
2024-08-02 16:05:01 -07:00
Azure SDK Bot
f9ea69c0e8
Sync eng/common directory with azure-sdk-tools for PR 8746 (#5865)
* update targeted proxy version


---------

Co-authored-by: Scott Beddall <scbedd@microsoft.com>
2024-08-02 12:45:48 -07:00
Azure SDK Bot
cd385362f9
Increment package version after release of azure-core (#5870)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-08-01 22:38:35 +00:00
Anton Kolesnyk
8fdb1fcd57
Azure Core August Beta Release (#5858)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-08-01 14:11:08 -07:00
George Arama
e5f2cda065
remove const (#5869) 2024-08-01 20:57:05 +00:00
George Arama
20e3bd3ff4
Updates for the api review (#5861)
* update nemaspace usage

* updated based on PR comments
2024-08-01 00:48:07 +00:00
George Arama
34c2441523
Enable UseFederatedAuth by default (#5852)
* enable use federated

* 401 unauthorized

* 401

* cleanup readmes

* DISABLE RUN

* Remove UseFederatedAuth overrides from ci.yml

* DISABLE RUN for admin samples,
2024-07-31 17:10:39 -07:00
Anton Kolesnyk
2c0a35dad4
Undo unnecessary Core vcpkg dependency version bump (#5860)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-31 22:23:29 +00:00
Anton Kolesnyk
d32aab96eb
Acknowledge community contributions in changelogs (#5850)
* Acknowledge cusomer contributions

* Update cspell

* Add more contributors

* More cspell

* Update contributions

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-31 13:44:28 -07:00
Robert Schulze
401b97e0ac
Remove unneeded <regex> includes (#5851)
* Remove unneeded <regex> includes

* Fix build (hopefully)
2024-07-31 13:07:47 -07:00
George Arama
ec6a66d53e
Keyvault full backup/restore support (#5744)
* first build pass

* move models

Refactor KeyVault backup/restore client

This commit represents a significant refactoring of the Azure Security KeyVault Administration client library, transitioning from a generic `KeyVaultClient` to a more specialized `BackupRestoreClient`. The refactoring includes:

- Renaming `KeyVaultClient` to `BackupRestoreClient` in both `backup_restore_client.hpp` and `backup_restore_client.cpp` to better reflect the focused functionality on backup and restore operations.
- Moving model definitions from `backup_restore_client.hpp` to `rest_client_models.hpp`, including structures for errors, full backup, restore, and selective key restore operations, along with their options. This change centralizes model definitions for improved maintainability and reuse across the client library.
- Updating method implementations in `backup_restore_client.cpp` to align with the `BackupRestoreClient` class name and its specialized backup and restore operations.

These changes aim to provide clearer separation of concerns within the library, making it more manageable and focused on backup and restore functionalities for Azure KeyVault.

* Add BackupRestoreClient with tests and options

This commit introduces the BackupRestoreClient for Azure Key Vault backup and restore operations, along with BackupRestoreClientOptions for configuration. Significant refactoring within the Azure::Security::KeyVault::Administration namespace simplifies namespace usage by directly using `using namespace Models;`. The BackupRestoreClient has been enhanced with a new constructor accepting `vaultUrl`, a `TokenCredential` shared pointer, and optionally `BackupRestoreClientOptions`. Additionally, a copy constructor and a default destructor have been added, alongside a private member `m_apiVersion` for API version management.

The BackupRestoreClientOptions struct extends Azure::Core::_internal::ClientOptions with an `ApiVersion` member initialized to "7.5". Changes in the implementation file include additional headers for internal use and authentication, and updates to the constructor for initializing member variables and setting up the HTTP pipeline.

Test infrastructure has been enhanced with modifications in `CMakeLists.txt` to include test source files, the introduction of a base test class `BackupRestoreClientTest` for setup, and a test case `CreateClient1` demonstrating client creation.

These changes collectively enhance the Azure Key Vault Administration library by adding a new client for backup and restore operations, improving code organization, and setting up a testing framework.

* Enhance BackupRestoreClient and tests

This commit significantly updates the BackupRestoreClient and its associated models, introducing new features for backup and restore operations, and improving error handling with a new Error model. The `BackupRestoreClient` class has been marked as `final` to prevent inheritance, and several new methods such as `FullBackup`, `FullBackupStatus`, `FullRestore`, `RestoreStatus`, and `SelectiveKeyRestore` have been added, along with corresponding data models in `rest_client_models.hpp`. These changes enhance the client's functionality and API clarity. Additionally, the test infrastructure has seen substantial improvements, including refactoring in `backup_restore_client_base_test.hpp` for better encapsulation and updated utility methods for more effective testing. The practical application of these enhancements is demonstrated in `backup_restore_client_test.cpp` through the `CreateClient1` test case, showcasing the use of the `FullBackup` method. Overall, these updates bolster the Azure Key Vault Backup and Restore client library's capabilities and test support.

* Enhance BackupRestoreClient for Azure backups

- Updated `BackupRestoreClient` to support full backups and restores using Azure blob storage SAS tokens, including changes to method signatures for SAS token and job identifier parameters.
- Introduced nullable types for `StatusDetails` and `Error` in operation models to handle optional response fields.
- Removed `FullBackupOptions`, `FullRestoreOperationOptions`, and `RestoreStatusOptions` structures in favor of direct parameter usage in methods.
- Refined HTTP request construction to include necessary headers and dynamically set API version.
- Updated JSON parsing logic to handle nullable fields and adapt to changed response JSON structure.
- Enhanced test infrastructure with methods for creating test-configured `BackupRestoreClient` and generating SAS tokens for backups. Added new tests for full backup, backup status, full restore, and restore status functionalities.
- Adjusted URL path construction and query parameter setting in HTTP requests for updated API endpoints and parameters compatibility.

* Refine SelectiveKeyRestore API and tests

This commit overhauls the SelectiveKeyRestore function in the Azure Key Vault Backup and Restore client library. The function signature in `backup_restore_client.hpp` has been updated to replace the `SelectiveKeyRestoreOperationOptions` parameter with two distinct parameters: `keyName` (std::string) and `restoreBlobDetails` (SelectiveKeyRestoreOperationParameters). This change enhances the API's clarity and usability by explicitly requiring the key name and restore blob details for the operation.

Additionally, the `SelectiveKeyRestoreOperationOptions` structure has been removed from `rest_client_models.hpp`, aligning with the shift towards using direct parameters for the selective key restore operation. Corresponding implementation adjustments in `backup_restore_client.cpp` include changes to request URL and JSON body construction, as well as improved error handling in response parsing.

The test suite in `backup_restore_client_test.cpp` has also been updated. The `CreateClient1` test case was removed, and a new test case, `RestoreSelectiveStatus`, was added to demonstrate the updated API's functionality through a full backup and selective key restore operation scenario.

These changes collectively improve the API's intuitiveness and demonstrate its practical application through updated test cases.

* oops

* fds

* negative tests

Enhance backup/restore tests and cleanups

- Added a new test case `BackupFullErrorStatus` to the `BackupRestoreClientTest` suite to simulate a full backup operation with an invalid URI and verify the transition of backup status from "InProgress" to "Failed" with detailed error status.
- Refined the `RestoreFull` test case by removing unnecessary line breaks, improving code formatting without affecting functionality.
- Adjusted formatting in the `RestoreFullStatus` test by removing unnecessary braces and line breaks, streamlining the code.
- Improved readability in the `RestoreSelectiveStatus` test by adding a space after a comma.
- Introduced a new test case `RestoreSelectiveInvalidKeyStatus` to test the system's handling of invalid key restore requests, ensuring error reporting is accurate when keys or their versions are not found.

* recordings and pipeline

* linux build issues

* comment

* parse the error type

* fix paths

* ewrwe

* fdss

* reencode ansi

* fdsfsd

* Enhance samples and refine project structure

- Adjusted `CMakeLists.txt` for better project clarity, moving `BUILD_SAMPLES_HSM` from `test/samples` to `samples` and adding new sample directories for backup and restore functionalities.
- Updated `sample1_administration.cpp` to use `Azure::Core::_internal::Environment::GetVariable` for environment variable access and removed settings management code to focus on specific functionalities.
- Added new sample applications `sample2_full_backup_restore.cpp` and `sample3_backup_selective_restore.cpp` demonstrating full and selective backup and restore operations using the Azure Key Vault administration client library, including detailed steps and error handling.
- Included `CMakeLists.txt` for each new sample, specifying C++ standards and linking necessary libraries, with a focus on ease of use and configuration through the inclusion of `get-env-helper`.

* restore sample 1

* attempt reformat doc

* gfddgdf

* attempt 2

* are you serious ?

* treter

* docs

* typo

* changelog

* doc

* KHlAAAAAAAAAAANg said Kirk

* error check

* Updates to API

* clangs

* test new macro use in cmake file

* clang again

* missing include

* update1

* LROs

* clang 11

* attempt2

* fhkwerjhfkj

* documentation

* attempt++

* separating the op in its own files

* clang

* docs ++

* docc +++

* clang

* typo

* slkjlkdsjflks

* rename to backupclient

* hoping it's building

* PR comments

* address magic param check

* assets update
2024-07-31 10:29:41 -07:00