Commit Graph

157 Commits

Author SHA1 Message Date
Anton Kolesnyk
11a2a38aa7
Implement Phase 3 features for DefaultAzureCredential (#6724)
* Implement Phase 3 features for DefaultAzureCredential

* Forgotten change to update header

* Clang-format

* GCC fix

* Change 'envVarName' string parameter to a boolean 'requireEnvVarValue' parameter

* Rename EnvVarName to CredentialSpecifierEnvVarName and make it constexpr auto

* requireEnvVarValue => requireCredentialSpecifierEnvVarValue

* Clang-format

* Update unit test name

* Clang-format

* Update CHANGELOG with new features and bug fixes

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-09-10 13:34:22 -07:00
Anton Kolesnyk
573fe95a0e
Azure Core and Identity September Releases (#6725)
* Azure Core and Identity September Releases

* "Identity"

* Update azure-core-cpp version to 1.16.0

* Enclose BIO_seek() OpenSSL macro in -Wold-style-cast ignore pragmas for macOS

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-09-10 12:45:39 -07:00
James Le Cuirot
b33fb227ce
Fix IMDS token requests for managed identities (#6698)
This was broken by a035ee5f94, which
accidentally constructed the IMDS URL with a double slash at the start
of the path. This is not properly routed on the server side, leading to
a 404 error with some very misleading XML.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2025-08-14 00:22:53 -07:00
Azure SDK Bot
c67192484f
Increment package version after release of azure-identity (#6684) 2025-08-05 14:15:39 -07:00
Anton Kolesnyk
6aea93d041
Azure Identity August GA Release (#6681)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-08-05 10:02:51 -07:00
Azure SDK Bot
4771bb3bcd
Increment package version after release of azure-identity (#6657)
---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-07-15 11:40:48 -07:00
Anton Kolesnyk
95b9f6e538
Azure Identity July Beta Release (#6652)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-07-15 08:19:04 -07:00
Anton Kolesnyk
65508720fb
Identity: 'AZURE_TOKEN_CREDENTIALS' env var support for specific credential names (#6634)
* Identity: 'AZURE_TOKEN_CREDENTIALS' env var support for specific credential names

* No need to use index-based loop at that place

* Clang-format

* Require 'Credential' suffix for env var values

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

Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
2025-07-10 12:10:03 -07:00
Azure SDK Bot
970b619b28
Increment package version after release of azure-identity (#6655)
---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-07-10 11:09:44 -07:00
Anton Kolesnyk
de3cc64a55
Azure Core and Identity July GA Releases (#6651)
* Azure Core and Identity July GA Releases

* Add Identity to the release

* Undo change to FolderList.cmake (chicken vs egg problem; we'll have to update after the release)

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-07-10 08:25:05 -07:00
Azure SDK Bot
8573c29cde
Increment package version after release of azure-identity (#6615)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-06-05 09:35:16 -07:00
Anton Kolesnyk
2e9f0472b4
Core and Identity June Beta releases (#6605)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-06-05 07:03:18 -07:00
Anton Kolesnyk
a035ee5f94
Identity: IMDS fail-fast and Cred order change in DAC (and Core support) (#6573)
* Identity: IMDS fail-fast and Cred order change in DAC (and Core support)

* Mac fix and cspell update

* Update unit test and clang-format

* Temporarily update samples to use AzCliCred until recordings are re-recorded

* Revert samples back to use DAC

* Remove SAS auth from Tables template

* Clang-format

* Add support for 'AZURE_POD_IDENTITY_AUTHORITY_HOST', override it for running samples in CI

* Add unit test for AZURE_POD_IDENTITY_AUTHORITY_HOST

* "in milliseconds"

Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>

* PR Feedback

* Named constant + comment

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
2025-05-30 16:47:50 -07:00
Anton Kolesnyk
47c738bba2
Implement AZURE_TOKEN_CREDENTIALS (#6593)
* Implement AZURE_TOKEN_CREDENTIALS

* Clang-format

* Update sdk/identity/azure-identity/src/default_azure_credential.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update sdk/identity/azure-identity/src/default_azure_credential.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

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

Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>

* TrimString()

* Test against contains() or startsWith() being used

* Update sdk/identity/azure-identity/src/default_azure_credential.cpp

Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>

* TrimString() => StringExtensions::Trim()

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
2025-05-27 16:40:16 -07:00
Azure SDK Bot
86245d07e6
Increment package version after release of azure-identity (#6517) 2025-04-08 20:08:17 +00:00
Anton Kolesnyk
170660ff80
Identity April GA Release (#6504)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-04-08 10:31:59 -07:00
Azure SDK Bot
e37c433672
Increment package version after release of azure-identity (#6457) 2025-03-11 19:57:33 +00:00
Anton Kolesnyk
1c1f500eb7
Azure Identity March Beta Release (#6451)
* Azure Identity March Beta Release

* Remove empty sections

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-03-11 11:36:46 -07:00
Anton Kolesnyk
237e617a4a
Identity: Log Client ID used in ManagedIdentityCredential (#6426)
* Identity: Log Client ID used in ManagedIdentityCredential

* Clang-format

* [&]

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-02-24 12:27:33 -08:00
Anton Kolesnyk
d96cd6b76a
Identity: disable GCC warning (#6414)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-02-13 16:19:46 -08:00
Anton Kolesnyk
b40045e8e9
Identity: Add AzureCliCredentialOptions::Subscription (#6415)
* Identity: Add AzureCliCredentialOptions::Subscription

* Clang-format

* Id => ID

* Fix typo

* Apply suggestions from code review

Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>

* Replace `decltype` with `auto` in test file

* + "If this is the name of a subscription, use its ID instead."

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
2025-02-13 15:26:10 -08:00
Azure SDK Bot
3ca9fe5540
Increment package version after release of azure-identity (#6197) 2024-11-08 20:09:44 +00:00
Ahson Khan
c7d19e2832
Prepare for Identity Nov GA patch release. (#6194) 2024-11-08 10:40:52 -08:00
Ahson Khan
ac3321c857
Fix overflow issue in token cache. (#6190)
* Fix overflow issue in token cache.

* Add test
2024-11-06 18:32:09 -08:00
Anton Kolesnyk
e1d9893467
Acknowledge community contribution to Identity (#6092)
* Acknowledge community contribution to Identity

* Update cspell.json

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-10-11 21:28:34 +00:00
Azure SDK Bot
8abdba048f
Increment package version after release of azure-identity (#6080) 2024-10-08 14:18:11 -07:00
Ahson Khan
29bbab9747
Azure Identity October GA Release (#6057)
* Azure Identity October GA Release

* Update CL entry to include resource ID feature.
2024-10-08 11:00:03 -07:00
Ahson Khan
1ce3178c42
In ClientCertificateCredential, add the x5c parameter of the JWT token as a JSON array rather than a JSON string. (#6052)
* In ClientCertificateCredential, add the x5c parameter of the JWT token as a JSON array rather than a JSON string.

* Update sdk/identity/azure-identity/src/client_certificate_credential.cpp

Co-authored-by: Ray Luo <rayluo.mba@gmail.com>

---------

Co-authored-by: Ray Luo <rayluo.mba@gmail.com>
2024-10-01 22:01:59 -07:00
Anton Kolesnyk
171386533a
Fix/unify links in CHANGELOG.md files (#6048)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-09-30 12:35:55 -07:00
Ahson Khan
b1f147e884
Updated the request header sent to the OIDC endpoint in so it doesn't result in a redirect response when an invalid system access token is provided. (#6019)
* Updated the request header sent to the OIDC endpoint in  so it doesn't result in a redirect response when an invalid system access token is provided.

* Add comment on what X-TFS-FedAuthRedirect does.
2024-09-20 17:42:57 -07:00
Ahson Khan
641dcc84f1
Allow x-vss-e2eid response header to be logged in AzurePipelinesCredential for diagnostics. (#6001)
* Allow x-vss-e2eid response header to be logged in AzurePipelinesCredential for diagnostics.

* Dont redact the x-msedge-ref header either.

* Add the necessary response headers to the exception message.

* Update cspell.

* Update CL

* Fix size_t comparison

* Use std::array to get the size() method.

* Add the <array> include directive to be explicit.
2024-09-20 17:26:30 -07:00
Azure SDK Bot
eeaa711966
Increment package version after release of azure-identity (#5999) 2024-09-17 18:00:22 -07:00
Ahson Khan
102da820c6
Prepare for Azure Identity September Beta Release (#5977) 2024-09-17 10:10:08 -07:00
Ahson Khan
639fc9f594
Add support for passing in the x509 certificate and its corresponding private key directly to ClientCertificateCredential, rather than reading from a pem file. (#5989)
* Add support for passing in the x509 certificate and its corresponding private key directly to , rather than reading from a pem file.

* Move the x509 and pkey objects

* Add basic test.

* Fix doc comment due to merge.

* Fix merge, add back the bool

* Pass in bool in other locations

* Fix finding pem cert content from memory and add tests with send chain true.

* Use d2i_PrivateKey_bio instead of PEM_read_bio_PrivateKey since the private key isn't in pem format.

* Fix doc comments to match the type name rather than copy/paste typo from client secret cred.

* Make options optional and add invalid content tests.

* Disable cspell in some places within tests.

* Make exception message consistent between platforms when reading a file.
2024-09-14 11:12:53 -07:00
Ahson Khan
e1afe4d7ea
Add support for sending an x5c parameter in the JWT token header for ClientCertificateCredential. (#5988)
* Add public surface area to support sending a chain of certs.

* Add x5c param to the JWT token.

* Simplify test.

* Address PR feedback and fix typo.

* Fix typo.
2024-09-13 19:35:40 -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
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
Azure SDK Bot
28baef9b80
Increment package version after release of azure-identity (#5880) 2024-08-07 10:21:36 -07:00
Ahson Khan
1d9ccf4434
Prepare for the August Identity GA release. (#5862) 2024-08-02 16:07:13 -07:00
Azure SDK Bot
cce5fc98a6
Increment package version after release of azure-identity (#5835) 2024-07-22 20:26:28 -07:00
Ahson Khan
b1674473eb
Prepare for the July Identity beta release. (#5770)
* Prepare for the July Identity beta release.

* Update release date.

* Update CL - remove empty headings.
2024-07-22 19:06:04 -07:00
Ahson Khan
193bbe6963
Add support for providing a Resource ID to ManagedIdentityCredential. (#5832)
* Add support for providing a Resource ID to ManagedIdentityCredential.

* Fix typo in param name.

* Fix clang format and undo removing of private methods (that are unused).

* Address PR feedback.

* Add back Azure:: to fix doxygen docs issue.
2024-07-22 19:00:13 -07:00
Ahson Khan
00304a0556
Add support for customizing the IMDS endpoint within ManagedIdentityCredential using an env var. (#5834)
* Add support for customizing the IMDS endpoint within
ManagedIdentityCredential using an env var.

* Clean up the impl.

* Add imds as an opt-out for spell checl.

* Address PR feedback.
2024-07-22 18:27:16 -07:00
Ahson Khan
7e9906f884
Added ClientAssertionCredential to enable applications to authenticate with custom client assertions. (#5789)
* Added `ClientAssertionCredential` to enable applications to authenticate with custom client assertions.

* Rename test file.

* Update client assertion credential tests.

* Fix typo.

* Address PR feedback - pass in function by value and some comment fixup.

* Update log messages to use credential name as a prefix.
2024-07-15 19:30:56 -07:00
Azure SDK Bot
e488093c19
Increment package version after release of azure-identity (#5742) 2024-06-25 21:33:16 -07:00
Ahson Khan
dd83659802
Prepare for the June Identity beta release, oob. (#5735) 2024-06-21 14:15:48 -07:00
Ahson Khan
9b2c3b337e
Add AzurePipelinesCredential for authenticating an Azure Pipelines service connection with workload identity federation. (#5733)
* Add AzurePipelinesCredential for authenticating an Azure Pipelines service connection with workload identity federation.

* Add unit tests.

* Add comment about not throwing in the ctor, but rather deferring it.

* Order field in order of initialization and fix cspell.

* Fix ambiguous call to EnvironmentOverride in tests.

* Address PR feedback, suppress warning, move oidc fetch in token cache,
and update exception message.

* Address PR feedback, use ID and capitalize Azure Pipelines.

* Revert back to the workaround for the warning, rather than suppressing
it.

* Address PR feedback, move getting an assertion to a helper, and add
const.
2024-06-20 21:09:31 -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
Azure SDK Bot
31692518fe
Increment package version after release of azure-identity (#5343) 2024-02-12 19:37:18 +00:00