Commit Graph

261 Commits

Author SHA1 Message Date
Ahson Khan
20efadde4c
Add back-ticks around the WWW-Authenticate header name in exception (#5717)
message.
2024-06-13 10:12:05 -07:00
Azure SDK Bot
5264ee4e28
Increment package version after release of azure-identity (#5714) 2024-06-12 08:33:45 -07:00
Ahson Khan
1e8c9d0c02
Prepare for the June Identity GA release. (#5695)
* Prepare for the June Identity GA release.

* Validate azure arc.

* Update changelog entry.

* Update cspell, fixup gtest skip, and remove unnecessary logging.

* Move gtest_skip call inside the gtest.

* Use system command due to permissions on creating a directory, on linux.

* Pass in a c_str() to system.

* Update permissions to create keys and address pr feedback (rename test
var and method to remove 'valid').

* Address PR feedback - nits.

* Fix remaining rename of local variable.
2024-06-11 15:25:02 -07:00
WangWeiLin-MV
e148d89745
Update sdk vcpkg portfile with VERSION and HEAD_REF (#5516)
* Update vcpkg portfile.cmake of sdk to add parameter HEAD_REF

* Update vcpkg portfile.cmake of sdk to use variable VERSION

* Update eng\scripts\Initialize-VcpkgRelease.ps1 regex for quoted REF

* Re-trigger CI

* Revert unnecessary change

---------

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-04-12 10:25:19 -07:00
Ahson Khan
da1513977a
Rename the TESTING_BUILD macro to be _azure_TESTING_BUILD to highlight this is internal only and reduce chances of collision. (#5419)
* Remove the use of ifdef for TESTING_BUILD in KeyVault clients, where they are not needed.

* Rename the TESTING_BUILD macro to be _azure_TESTING_BUILD to highlight this is internal only and reduce chances of collision.

* Update remaining macro names and add comments.

* Revert rename change which was using BUILD_TESTING cmake flag in source.
2024-04-05 12:05:04 -07:00
Scott Addie
aa2e83cac5
Update Azure AD Learn links in Identity (#5469) 2024-03-27 12:54:14 -05:00
Scott Beddall
3658df22db
1ES Template Refactor (#5441)
* All eng/ folder changes necessary to enable 1es-templates for the azure-sdk-for-cpp
* Includes updates to all ci.yml files to reflect new syntax requirements from 1es-template changes to archetype-sdk-client
2024-03-12 15:20:45 -07:00
Anton Kolesnyk
aad2299dcd
Revert commits related to _azure_BUILD_FOR_TESTING and _azure_*_FOR_TESTS (#5416)
* Revert "Remove the use of ifdef for TESTING_BUILD in KeyVault clients, where (#5406)"

This reverts commit 2d8c940f55.

* Revert "Rename the TESTING_BUILD macro to be _azure_TESTING_BUILD to highlight (#5390)"

This reverts commit 256c2df8b5.

* Revert "Use new macros in existing surface area, so that classes marked as final don't have virtual methods. (#5389)"

This reverts commit 3d7eaddb9d.

* Revert "For new surface area, classes marked as final should not have virtual methods. (#5331)"

This reverts commit ddd0f4bd07.

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-03-07 04:03:35 +00:00
Ahson Khan
256c2df8b5
Rename the TESTING_BUILD macro to be _azure_TESTING_BUILD to highlight (#5390)
this is internal only and reduce chances of collision.
2024-03-01 05:45:36 +00:00
Ahson Khan
3d7eaddb9d
Use new macros in existing surface area, so that classes marked as final don't have virtual methods. (#5389)
* Use new macros in existing surface area, so that classes marked as final don't have virtual methods.

* Update doc comments.

* Use DOXYGEN_PREDEFINED to expand only the macros we want expanded.

* Add the compile definition for more projects.

* Address PR feedback.

* Make TestableTokenCache a friend class of TokenCache.
2024-02-29 20:48:12 -08:00
George Arama
093db5a49c
QFE Identity playback (#5377)
* mroe quotes

* dssf

* pipeline first take

* 2 out of 3

* clangs

* newline

* shoot

* cache 0/1
2024-02-26 11:50:04 -08:00
George Arama
300e518eed
Identity perf tests part 1 (#5373)
* mroe quotes

* dssf

* pipeline first take

* 2 out of 3

* clangs

* newline
2024-02-23 13:03:12 -08:00
George Arama
1bb65192d4
Identity perf tests (#5329)
* mroe quotes

* dssf

* azure identity tests

* comments

* comments
2024-02-21 12:05:43 -08:00
Anton Kolesnyk
9271d13542
Guard against Windows' min/max macros (#5348)
* Guard against Windows' min/max macros

* Add NOMINMAX and LEAN_AND_MEAN + clang-format

* clang-format

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-02-13 13:41:34 -08:00
Azure SDK Bot
31692518fe
Increment package version after release of azure-identity (#5343) 2024-02-12 19:37:18 +00:00
Ahson Khan
ddd0f4bd07
For new surface area, classes marked as final should not have virtual methods. (#5331)
* Classes marked as final should not have virtual methods.

(cherry picked from commit 7413384c111b73be448f78527a08a544fd1f6ec6)

* Update changelog.

* Address PR feedback and use named-macro.

* Only use the macro for testing_build final classes.

* Add a new compile definition _azure_TESTING_BUILD.

* Add test as a friend class and put the test in a Identity specific test
namespace.

* Remove the macro for final expansion since doxygen struggles with it.

* Address PR feedback, add ifdef guard around _azure_VIRTUAL_FOR_TESTS.
2024-02-09 17:46:04 -08:00
Ahson Khan
78a3239006
Azure Identity February Release (#5307)
* Azure Identity February Release

* Update CHANGELOG.md release date to Thurs

* Update release date.

* Remove empty CL sections.
2024-02-10 00:40:38 +00:00
Ahson Khan
3b231e5850
Enable proactive renewal of Managed Identity tokens. (#5336)
* Enable proactive renewal of Managed Identity tokens.

* Address PR feedback - move helpers to anonymous namespace and renames.

* Address local variable rename suggestion.
2024-02-09 16:01:44 -08:00
George Arama
070c7e94db
Step 1 in adding (more)perf tests for Core and Identity. (#5300)
* mroe quotes

* dssf

* sqa

* first identity test no caching

* cache no cache

* cleanup cache shortcircuit

* some cleanup

* Update sdk/core/perf/src/base_test.cpp

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>

* PR comments

* remove cache option

* wqq

* dsd

* saa

* wqq

* clang

* Update sdk/core/perf/inc/azure/perf/dynamic_test_options.hpp

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>

* PR comments

* PT comments

* clang

---------

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2024-02-01 10:47:02 -08:00
Azure SDK Bot
9d3870fe8d
Increment package version after release of azure-identity (#5257) 2024-01-11 15:47:56 -08:00
Anton Kolesnyk
23af33186e
Identity January Release (#5242)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-01-11 13:31:07 -08:00
Anton Kolesnyk
a419a63bc0
AzureCliCredential to treat datetime without TZ info as local time. (#5179)
* AzureCliCredential to treat datetime without TZ info as local time.

* Fix spelling

* CLang-format

* Parse as local by appending TimeZoneOffsetAsString()

* Fix bad merge

* PR Feedback

* Merge

* Merge

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-12-15 17:39:58 -08:00
Anton Kolesnyk
eba15a9ff4
AzureCliCredential: add support for expires_on field. (#5180)
* AzureCliCredential: add support for xpires_on field.

* Remove unused variables

* Remove unused variables

* Clang-format

* Update changelog

* PR feedback

* Update unit test expectation

* PR Feedback

* Add comment

* Remove extra line

* PR feedback

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-12-15 01:13:09 +00:00
Anton Kolesnyk
79022a36ec
Identity changelog update - PR feedback (#5211)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-11-29 12:52:22 -08:00
Anton Kolesnyk
b997e76e0d
ClientCertificateCredential: better exception message for unsupported file extensions (#5197)
* Cert Cred: better exception message for unsupported file extensions

* fix spelling

* Make it better

* Empty path case

* adfs

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-11-28 12:19:05 -08:00
Anton Kolesnyk
bce301a841
Include error details into Identity exceptions (#5184)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-11-28 11:20:44 -08:00
Anton Kolesnyk
05d1f5455c
Make vcpkg.json comment multiline (#5175)
* Make vcpkg.json comment multiline

* Update core-opentelemetry tests to be able to compile with opentelemetry-cpp version 1.12.0

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-11-21 17:06:37 -08:00
Azure SDK Bot
4db4630ee2
Increment package version after release of azure-identity (#5157) 2023-11-11 06:54:30 +00:00
Anton Kolesnyk
41b3df3dd3
Azure Identity November Release (#5102)
* Azure Identity November Release

* Re-order and move fix to new feature.

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2023-11-10 21:32:38 -08:00
Ahson Khan
f2bd22794d
Incapsulate all the defaults for options values such as authority host in a helper class and add authority host url validation. (#5155)
* Incapsulate all the defaults for options values such as authority host
in a helper class and add authority host url validation.

* Address PR feedback.
2023-11-11 05:00:14 +00:00
Ahson Khan
3b3795f3df
Revert order of credentials used within the DefaultAzureCredential (#5156)
back to what it was at previous GA.
2023-11-10 20:15:31 -08:00
Ahson Khan
d2419de28d
Add logging to WorkloadIdentityCredential to help with debugging. (#5153)
* Add logging to  to help with debugging.

* Fixup tests.

* Address PR feedback and fix up log messages to be more accurate.
2023-11-10 19:32:49 -08:00
Ahson Khan
b082d54656
Update perf test secret_credential_test.hpp to be more generic to make modifications easier (#5150) 2023-11-10 03:54:05 +00:00
Ahson Khan
7632d67584
Re-use the selected credential that works for each subsequent request in DefaultAzureCredential by caching the chosen credential per instance. (#5142)
* Re-use the selected credential that works for each subsequent request in
DefaultAzureCredential by caching the chosen credential per instance.

* Update test to include per-instance caching validation.

* Addresss PR feedback and fix clang error on atomic assignment.

* Fix typo in CL and drop ifdef testing_build to investigate clang build
issue.

* Add double-colon in front of friend class.
2023-11-09 19:33:26 -08:00
Ahson Khan
f816bb194b
Harden checks for the tenant ID across all inputs. (#5106)
* Harden checks for the tenant ID across all inputs.

* Fix clang formatting.

* Fixup unit tests.

* Fixup test comments.
2023-11-09 01:57:00 +00:00
Anton Kolesnyk
edf7ab18c7
Add a note to vcpkg manifest files that all changes made in the vcpkg repo alone might be lost. (#5110)
* Add a note to vcpkg manifest files that all changes made in the vcpkg repo alone might be lost.

* may => will

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-11-02 20:57:51 -07:00
Ahson Khan
82de63902d
Create separate lists of characters that are allowed within a tenant id vs scopes in AzureCliCredential. (#5086)
* Create separate lists of characters that are allowed within a tenant id vs scopes in AzureCliCredential.

* Update test to catch the particular exception we expect to be thrown for
tenant id but not for scopes.

* Address PR feedback.
2023-11-02 02:41:50 +00:00
Ahson Khan
677a1da61e
Disallow space character when validating tenant id and scopes as input for AzureCliCredential. (#5085)
* Disallow space character when validating tenant id and scopes as input
for AzureCliCredential.

* Address PR feedback.
2023-11-01 19:04:26 -07:00
Anton Kolesnyk
50c18516df
Ensure CMakeLists don't miss any files (#5065)
* Ensure CMakeLists don't miss any files

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-10-26 18:15:03 -07:00
Larry Osterman
a6de66df02
Remove code coverage exclusions from Azure SDK for C++ (#5055)
* Try to see what happens without coverage exclusions

* Reset coverage limits

* Mark ThrowParseError as [[noreturn]] to ensure compiler knows that code after it is dead code

* Added tests for the Azure assert macro

---------

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2023-10-25 10:30:02 -07:00
Scott Addie
1fc481b5cc
Replace AAD references in azure-identity (#5041)
* Replace AAD references in azure-identity

* Update cspell config

* Update cspell config again

* Fix code formatting

* Replace one more occurrence
2023-10-18 11:26:16 -05:00
Azure SDK Bot
50e3a0e8fb
Increment package version after release of azure-identity (#5034) 2023-10-12 20:43:08 +00:00
Anton Kolesnyk
e89625e85c
Azure Identity October Release (#5010)
* Azure Identity October Releases

* Change release to beta.3.

* Update the identity CL.`

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2023-10-12 12:44:03 -07:00
Ahson Khan
b5c3c4971d
Do not throw an exception during AzureCliCredential construction, but rather delay it on GetToken() call. (#4979)
* Do not throw an exception during `AzureCliCredential` construction, but rather delay it on GetToken() call.

* Update az cli unsafe chars test.
2023-10-05 20:31:29 +00:00
Ahson Khan
81d95c951f
Change the default value for the authority host option to be read from the environment variable first. (#4980)
* Change the default option for authority host to be read from the environment first.

* Update changelog.

* Update doc comment and refer to the env var correctly.

* Update doc comments and add unit tests.
2023-10-05 11:14:22 -07:00
Anton Kolesnyk
ec220be784
Shorten build-time paths when building in vcpkg (#4977)
* Shorten build-time paths when building in vcpkg

* if-guard

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-09-25 09:30:00 -07:00
Azure SDK Bot
ec33085d59
Increment package version after release of azure-identity (#4953) 2023-09-14 14:25:12 -07:00
Ahson Khan
13f1759acc
Do not throw an exception during Credential construction, but rather delay it on GetToken call. (#4951) 2023-09-13 16:57:24 -07:00
Anton Kolesnyk
d4bdf29ef2
Azure Identity September Release (#4930)
* Azure Identity September Release

* Update release date in CHANGELOG.md

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2023-09-13 22:39:23 +00:00
Ahson Khan
33dc61bbf8
Modify the order of the credentials used within the DefaultAzureCredential to be consistent with other languages. (#4946)
* Modify the order of the credentials used within the  to be consistent with other languages.

* Update LogMessages test since the order of credentials has changed.

* Fix the order for the rest of the log messages within the test.

* Update svg and clang format.
2023-09-13 15:02:25 -07:00