Commit Graph

338 Commits

Author SHA1 Message Date
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
3cd85cde0d
Identity samples: make sample service to invoke GetToken() (#6604)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-06-03 13:59:06 -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
Scott Addie
ebdbafd959
Direct traffic to credential chains doc (#6591) 2025-05-22 13:46:37 -07:00
Anton Kolesnyk
9b32b889d7
Identity: update Troubleshooting.md with all the credentials (#6552)
* Identity: update Troubleshooting.md with all the credentials

* </li></ul>

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-05-01 22:16:15 -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
e8d34efc67
Update Identity live test (#6516)
* Update Identity live test

* Clang-format

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-04-08 11:55:11 -07: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
Anton Kolesnyk
eaae21410c
Update Identity root README to align with the common format (#6493)
* Update Identity root README to align with the common format

* Update vcpkg link identifier in README

* Remove vcpkg installation instructions from README

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-03-31 09:54:19 -07:00
Anton Kolesnyk
22a08bc969
Use TokenCredential *const* everywhere (#6453)
* Use TokenCredential *const* everywhere

* Use left const where the surrounding code also uses it

* Use left const everywhere

* Clang-format

* More clang-format

* typos

* Clang-format

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2025-03-12 11:57:11 -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
Ronnie Geraghty
049b7a6fe6
added missing link to identity readme (#6310)
The Identity README was missing the link for the Azure subscription trial
2024-12-20 13:36:43 -08:00
Anton Kolesnyk
bef420162e
Fix typos (#6234)
* Fix typos

* Fix name collision

* Re-trigger CI

* Re-trigger CI

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-11-17 23:06:28 -08:00
Anton Kolesnyk
b74d9c36be
Minor code cleanups (3) (#6179)
* Minor code cleanups (3)

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-11-11 15:36:58 -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
868a14f4d8
Minor code cleanups 2 (#6171)
* Minor code cleanups

* Clang-format

* Adjust line coverage target

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-11-05 10:12:13 -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
James Le Cuirot
a091f4c8e0
Set VERSION property against all libraries to write versioned SONAME (#6087)
The SONAME currently written to shared libraries is unversioned, e.g.
libazure-core.so. The SDK's ABI is unstable, so replacing these .so
files with newer versions will immediately break any consumers.

Setting the VERSION property results in libazure-core.so being a symlink
that is used at build time to point to the versioned library, e.g.
libazure-core.so.1.14.0. Consumers point directly to the versioned
library and continue to work against the older version when the library
is upgraded. Once rebuilt, they then point to the newer version instead.

It is more common to use an ABI version that is separate to the library
version, but it makes sense to use the latter when the ABI is unstable.
The Boost libraries do exactly this.

This change has no effect on static libraries, which is the more common
use case. See the CMake documentation for its wider effects.

https://cmake.org/cmake/help/latest/prop_tgt/VERSION.html
2024-10-11 11:42:13 -07:00
John Blischak
7f8647a33d
azure-identity-cpp 1.10.0 requires azure-core-cpp >= 1.14.0 (#6086) 2024-10-09 09:51:21 -07: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
f80caf2fea
Remove support for customizing the IMDS endpoint within ManagedIdentityCredential using an env var (#5997)
* Remove support for customizing the IMDS endpoint within ManagedIdentityCredential using an env var

* Remove test after merge.

* Revert "Remove test after merge."

This reverts commit 0d1a4fb8ca5c34bc253e999a86d337bbcddea63e.

* Only remove the test, after merge.

* Move imds endpoint url to a named const string and add doc link
2024-10-03 13:49:34 -07:00
Ahson Khan
d22781c84a
Use static factory methods to create ManagedIdentityId rather than an enum (#6051)
* Use a static factory method

* Update tests and samples.

* Remove unnecessary std::move and update the samples in readme.

* Address PR feedback - use more real values for resourceIDs in tests.

* Update tests and samples to use resourceID strings with the expected prefix.

* Fix test assert.
2024-10-02 09:22:29 -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
aa728eed6d
Use code snippets from managed identity credential samples in identity readme doc and fix minor generation issues (#6020)
* Use code snippets from managed identity credential samples in identity readme doc.

* Generate readme from snippets.

* Update snippet generation script to remove unnecessary indentation and extra new line at eof.

* Update Snippet Generation doc to show a concrete example on how to run it.

* Update other repo READMEs with the generation fixes.

* Fix KeyVault Secrets sample and use the snippets in its README

* Use the added sample snippet.
2024-09-25 16:56:57 -07:00
Ahson Khan
023469bc18
Remove unused included header from core that isn't available in the GA'd version (#6042) 2024-09-25 16:09:22 -07:00
Ahson Khan
309a390947
Add a readme section for user and system assigned managed identity for ManagedIdentityCredential. (#5838)
* Add a readme section for user and system assigned managed identity for
MICredential.

* Update the README to reflect new API surface and add section about Object ID.

* Mention object ID in the intro.

* Reorder the list of IDs mentioned to match the section order.
2024-09-21 07:00:12 +00: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
Ahson Khan
d1cd23f4c1
Address archboard review feedback for new Azure Identity features - renames (#6000) 2024-09-18 16:07:46 -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
d7b63eef12
Add const& to input std::string params in ClientCertificateCredential. (#5993) 2024-09-17 15:56:31 -07:00
Ahson Khan
102da820c6
Prepare for Azure Identity September Beta Release (#5977) 2024-09-17 10:10:08 -07:00
Ahson Khan
e7420dfd04
Accept base64 (PEM) encoded certificate as std::string instead of vector<uint8_t> (#5991)
* Accept base64 (PEM) encoded certificate as std::string instead of vector<uint8_t>

* Fix unix implementation and remove use of privacy enhance mail in comments, in favor of PEM
2024-09-16 12:10:39 -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
Scott Addie
df6f5c910d
Create credential chains section in Azure Identity README (#5973) 2024-09-12 14:48:20 +00:00
Ahson Khan
ea3f1442b2
Move the ResourceIdentifier type from Azure::Identity to Azure::Core. (#5864)
* Move the ResourceIdentifier type from Identity to Azure::Core.

* Fix the namespace in the source cpp file.

* Fix managed identity credential tests.

* Fix clang format.
2024-09-05 15:22:18 -04: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
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