Commit Graph

208 Commits

Author SHA1 Message Date
Anton Kolesnyk
a8dd2b021b
Fix Identity compilation (WinAPI crypto API) on UWP (#4931)
* Fix Identity compilation (WinAPI crypto API) on UWP

* Clang-format

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-09-07 10:28:37 -07:00
Ahson Khan
f7452cc233
Update the workload identity credential sample to work with required environment variables that need to be set. (#4924)
* Update the workload identity credential sample to work with required environment variables that need to be set.

* Fix clang format.
2023-09-06 10:25:26 -07:00
Larry Osterman
0ad52a028c
Ignore compiler and STL version mismatch on published packages to unblock ApiView (#4925) 2023-09-06 10:22:52 -07:00
Anton Kolesnyk
146460ec5a
Acknowledge community contributions in the changelogs (#4919)
* Acknowledge customer contributions in the changelogs

* cspell

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-09-05 14:05:19 -07:00
Larry Osterman
1177548540
WIL headers and C++ static analysis don't always get along (#4918)
* WIL headers and C++ static analysis don't always get along

* Accidentally removed a header
2023-08-29 13:41:52 -07:00
Theodore Tsirpanis
b7afe2faf1
[identity] Remove OpenSSL dependency on Windows. (#4747)
* Add dependency to WIL in azure-identity-cpp when on WIndows.

* Use Win32 APIs to get the thumbprint and private key of a certificate.

* Don't use `out_param_ptr` in `GetPrivateKey`.

`NCRYPT_KEY_HANDLE` is not a pointer but a uintptr and using `out_param_ptr` with it causes compiler errors.

* Use Win32 APIs to sign messages with a private key.

* Remove the OpenSSL dependency from azure-identity-cpp on Windows.

We can't remove it from the root vcpkg.json that gets used for development, because an attestation example uses OpenSSL for certificate code.

* Update the changelog.

* Fix compile errors.

We can't use WIL in the public headers; we will use instead the same approach with the OpenSSL handles.

* Fix more compile errors.

* Use `AZ_PLATFORM_WINDOWS`.

* clang-format

* Update cspell.json

* Update CHANGELOG.md

* Update cspell.json

* Update cspell.json

* Attempt to make spell checker happy with minimum changes

* Ignore `CMakeUserPresets.json`.

* Move to the BCrypt APIs in anticipation of the rewrite.

* Use Windows APIs to read the certificate and the private key in PEM format.

* Move decoding the PEM string to its own function.

* Remove redundant error messages from some checks.

WIL does not recommend them if they do not provide additional information, and it already captures the source location.

* Support opening raw RSA and ECC private keys.

* Stop using pseudo-handles.

They are not supported in Windows Server 2012 R2, which is still supported.

* Fix CI.

* Refactor the ClientCertificateCredential tests and test more certificates.

Thanks to googletest's parameterized tests, duplicate code was eliminated and we test twelve cases with only two test methods.

* Improve code sharing across OpenSSL and CNG.

* Fix error checks when signing.

* Remove ECC certificate support.

Turns out Microsoft identity platform itself does not support them.

* Replace `#ifdef` with `#if defined`.

* Move some CryptoAPI-related terms to a `cspell.json` file local to `azure-identity`.

* Exclude the root `cspell.json` file from gitignore.

* Clean-up `cspell.json`.

* Fix linked libraries of `azure-identity`.
We don't use ncrypt anymore.

* Move `platform.hpp` to `client_certificate_credential.cpp`.

* Clean-up `UniquePrivateKey` and reduce mentions of `pkey`.

---------

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2023-08-28 10:55:49 -07:00
Ahson Khan
66e36b0399
Add a sample on how to use Workload Identity Credential. (#4894) 2023-08-18 12:44:35 -07:00
Azure SDK Bot
5590c3bfbd
Increment package version after release of azure-identity (#4876) 2023-08-11 19:31:51 -07:00
Anton Kolesnyk
d6294aaa9f
Azure Identity August Release (#4839)
* Azure Identity August Release

* Update CL

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2023-08-12 01:18:04 +00:00
Ahson Khan
e43c34c90a
Add support for Workload Identity Credential for Kubernetes. (#4872)
* Add support for Workload Identity Credential for Kubernetes.

* Fix order of initialization for member fields.
2023-08-11 17:43:02 -07:00
Anton Kolesnyk
0a175f2c83
Clean up version requirements (#4814)
* Clean up version requirements

* Revert curl back to 7.44

* Update vcpkg.json

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-07-20 16:03:57 -07:00
Ahson Khan
107a30e558
Update managed_identity_credential doc to avoid copy/paste error from client secret credential. (#4809)
* Update managed_identity_credential doc to avoid copy/paste error from client secret credential.

* Fix clang formatting.
2023-07-20 11:11:55 -07:00
Rick Winter
b54d509c72
Use standard syntax for MIT license (#4786)
* Use standard syntax for MIT license

* Stop appending "All rights reserved"
2023-07-12 22:37:36 -07:00
Azure SDK Bot
0e36ac0585
Increment version for identity releases (#4759)
* Increment package version after release of azure-identity

* Update CHANGELOG.md

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

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

---------

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2023-07-06 14:59:32 -07:00
Anton Kolesnyk
c2b2d56579
Azure Identity July Release (#4753)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-07-06 06:00:19 -07:00
Anton Kolesnyk
68be8b4568
Identity: Improve diagnosability (#4744)
* Identity: Improve diagnosability

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

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

* GCC fix

* Mac fix

* More agressive sanitizing

* cspell

* minor CI fixes

* Improve

* More tests

* min/max values test

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
2023-07-05 13:34:47 -07:00
Anton Kolesnyk
f22eafad30
Identity: Credentials to accept a wider variety of token responses (#4740)
* Identity: Credentials to accept a wider variety of token responses

* Restructure code

* GCC warning

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-06-28 15:05:47 -07:00
Larry Osterman
fba91e34c9
Enabled doxygen validation in CI pipeline. (#4715)
* doxygen fixes

* enable doxygen errors now that doxygen is updated.

---------

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2023-06-22 18:26:07 -07:00
Larry Osterman
184303a893
Manually disable tests in all vcpkg portfile.cmake files (#4697) 2023-06-05 11:52:21 -07:00
Larry Osterman
b303a70eaa
Stop disabling security warnings in get_env.hpp; Fixed all incorrect … (#4655)
* Disable deprecation warnings in cmakelists.txt to avoid introducing new concepts; removed unnecessary uses of get_env.hpp

* Removed use of GetEnvHelper from AMQP samples

* Removed special case for get_env.hpp
2023-06-01 12:50:45 -07:00
Scott Addie
8cc316191c
Fix DefaultAzureCredential image syntax (#4678) 2023-05-31 18:24:37 +00:00
Scott Addie
822063c838
Add DefaultAzureCredential auth flow SVG to Identity README (#4658) 2023-05-30 11:46:04 -07:00
Larry Osterman
fb240a4b25
Define a standardized header ordering for Azure SDK for C++ (#4632)
* Standardized header ordering for C++ repo

* Reordered categories to move private headers above public headers; added space between categories to enable future flexibility
2023-05-26 14:32:45 -07:00
Scott Addie
98daaf70a8
Add DefaultAzureCredential auth flow diagram (#4654)
* Add DefaultAzureCredential auth flow diagram

* Update cspell.json

---------

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2023-05-26 08:38:43 -05:00
Azure SDK Bot
56d3e057f5
Increment package version after release of azure-identity (#4606) 2023-05-04 13:04:32 -07:00
Anton Kolesnyk
e534c3ee4a
Azure Identity May Release (#4579)
* Azure Identity May Release

* Update FolderList.cmake

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-05-04 10:32:52 -07:00
Azure SDK Bot
b9e09760e5
Increment package version after release of azure-identity (#4529) 2023-04-07 00:44:21 +00:00
Anton Kolesnyk
42efcebcbf
Identity April Beta Release (#4517)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-04-06 16:47:10 -07:00
Anton Kolesnyk
fd687c32fa
Add support for challenge-based and multi-tenant authentication (#4506)
* Add support for challenge-based and multi-tenant authentication

* Clang-format

* cspell

* clang-format

* gcc warning

* clang warning

* Remove debug message

* clang-format

* update version>= in vcpkg manifests

* unpublic copy ctor in polymorphic class

* KeyVault::_internal::ChallengeBasedAuthenticationPolicy => KeyVault::_internal::KeyVaultChallengeBasedAuthenticationPolicy

* keyvault/shared/challenge_based_authentication_policy.hpp => keyvault/shared/keyvault_challenge_based_authentication_policy.hpp

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-04-04 11:00:05 -07:00
Anton Kolesnyk
2a39a3422b
Organize applying Identity log prefix (#4459)
* Organize applying Identity log prefix

* logLevel

* Cosmetic changes

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-22 14:46:32 -07:00
Anton Kolesnyk
ba086576be
Fix potentially high CPU usage on Windows (#4448)
* Fix potentially high CPU usage on Windows

* Undo unnecessary formatting

* Undo unnecessary changelog

* Undo unnecessary formatting

* Undo unnecessary formatting

* Uninclude locale

* Add issue link to changelog

* EXPECT_TRUE(a == b) => EXPECT_EQ(a, b)

* Update second changelog with link as well

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-20 13:06:11 -07:00
Anton Kolesnyk
83f736d8ad
Simpler identity logging (#4455)
* Simpler identity logging

* Even simpler

* Remove refactoring artifact

* Cosmetic change

* foreach

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-16 12:50:15 -07:00
Anton Kolesnyk
acb8e3b9e6
Undocument ChainedCred usage by DefaultAzCred & remove friend and private ctor (#4447)
* Undocument ChainedCred usage by DefaultAzCred & remove friend and private ctor

* Clang warning fix

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-15 17:00:01 -07:00
Anton Kolesnyk
9f19a28af3
Use aka.ms link to Identity troubleshooting (#4449)
* Use aka.ms link to Identity troubleshooting

* Update default_azure_credential.cpp

* Update default_azure_credential.cpp

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-15 16:18:51 -07:00
Anton Kolesnyk
ef24dfda2e
Add GetCredentialName() (#4428)
* Add GetCredentialName()

* Update

* Undo accidental change

* Clang-format

* Call GetCredentialName() instead of using constant; Return in-place constructed name; Explicit tests for GetCredentialName()

* PR feedback

* constructor parameter + non-virtual GetCredentialName()

* Update sdk/core/azure-core/CMakeLists.txt

* Update sdk/identity/azure-identity/test/ut/client_secret_credential_test.cpp

* Update sdk/identity/azure-identity/test/ut/client_certificate_credential_test.cpp

* GCC and Clang warnings

* Promote ThrowIfNotSafeCmdLineInput() to private member; avoid copies when calling GetCredentialName()

* Spelling

* Fix deprecated usage

* Fix iteration

* Clang-format

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-14 16:46:10 -07:00
Anton Kolesnyk
c673e9550c
Update vcpkg release manifest templates per vcpkg team recommendation (#4425)
* Update vcpkg release manifest templates per vcpkg team recommendation

* Forgotten change

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-08 21:00:59 -08:00
Azure SDK Bot
d114e4d58d
Increment package version after release of azure-identity (#4426) 2023-03-07 22:04:26 -08:00
Anton Kolesnyk
fc61bb4848
Add DefaultAzureCredential (#4409)
* Added DefaultAzureCredential

* Improved Llgging

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-03-07 20:24:44 -08:00
Azure SDK Bot
8286a1c0ae
Increment package version after release of azure-identity (#4342) 2023-02-07 23:17:00 +00:00
Anton Kolesnyk
52c77153e0
Identity February Release (#4317)
* Identity February Release

* Accumulate changelog entries from previous Beta releases

* Update core minimum version requirement

* Best way to fix which may not work in CI

* Drop version from cmakelists

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-02-07 13:27:39 -08:00
Anton Kolesnyk
243fb4c58d
Compilation fixes for UWP (#4335)
* Compilation fixes for UWP

* More accurate condition

* Fix warnings

* Format files as vcpkg formats them; pull one change back from vcpkg

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-02-02 20:04:21 -08:00
Larry Osterman
a34b8d19a5
Add ApiView settings for existing packages. (#4226)
* Create ApiViewSettings for most existing packages

* Corrected name for blobs storage review name

* Added cspell settings for DCURL

* Create ApiViewSettings for most existing packages

* Corrected name for blobs storage review name

* Added cspell settings for DCURL

* ApiView settings changes for DataLake

* Renamed includeInternal to allowInternal; Added storage common; Fixed package names

* Fixed spelling error

* If there's an error accessing the site with no CRL checks, don't try it any more

* Stop checking example.com because it doesn't work

* Update sdk/attestation/azure-security-attestation/inc/ApiViewSettings.json

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

* Update sdk/core/azure-core/inc/ApiViewSettings.json

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

* Update sdk/keyvault/azure-security-keyvault-secrets/inc/ApiViewSettings.json

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

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2023-01-11 08:16:13 -08:00
Azure SDK Bot
01af6783b1
Increment package version after release of azure-identity (#4235) 2023-01-10 21:05:32 +00:00
George Arama
fa2f20326b
Identity January Release (#4220)
* changelog update

* Identity January Release

* trigger PR
2023-01-10 11:18:52 -08:00
Anton Kolesnyk
5304a0857d
PR follow-ups (#4201)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com>
2023-01-03 12:08:00 -08:00
Anton Kolesnyk
a70be339e7
Audit string comparisons (#4197)
* Audit string comparisons

* Mac fix

* !isxdigit()

* Rewrite condition + comment

* <3

* Clang-format

* 255

* Allow uppercase

* stoi() radix

* ShouldEncode()

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2023-01-03 11:16:54 -08:00
Anton Kolesnyk
9ab6a1f62a
Clean up token cache from expired items on Fibonacci cache sizes instead of 2^Ns (#4180)
* Clean up token cache from expired items on Fibonacci cache sizes instead of 2^N

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2022-12-13 18:24:57 -08:00
George Arama
ef4d41267f
Test proxy (#4118)
* start

* recording

* playback

* refactor, playback and record

* recordings for kv

* klklk

* open telemetry, identity

* attest

* all tests recorded except storage

* STORAGE RECORDINGDS

* some cleanup

* ignore result

* testproxy remade

* fiiine , do something with the result , goooosh

* install test proxy

* clang

* clang

* certs maybe

* cmake generate fix,

* start test proxy script

* start test proxy on env

* clang, move TP after build

* reregen

* certs

* sda

* dss

* allow insecure connections

* put back

* debug

* iuy

* try again

* ewew

* chmod

* try again

* update sanitizer

* output testproxy log

* sjhgasjgdajh

* folder

* worxy

* fix tests and log file

* format files

* clang format

* clang

* sa

* sa

* cleanup

* cspell

* oops

* remove redundant method

* tests

* put back original

* restore to 933486385a

* recordings

* remove storage values

* storage recordings

* disable non functioning tests

* remove core install of test proxy

* _LIVEONLY_ tests

* clang install when needed

* logs on condition

* skip tests

* revert cpp to original version

* quick test

* right that one

* one skip

* identity pushed

* maybe

* override

* clang

* clang

* attestetion

* keyvault

* reenable 20+ tests

* 5 tests left , lease related

* a bit of cleanup

* try now

* snitizers

* some fixes

* capitalization

* clang , cover, peakA

* WEIRD NAME THING ON WINDOWS

* storage recordings

* one more livee

* createappenddelete_liveonly

* CreateWithTags_LIVEONLY_

* try capitalization

* another onw

* maybe now

* all liveonly

* try restore before test

* typo

* condition

* clang and cc

* azure core ci

* qwqwq

* dsasdas

* cleanup1

* typo

* spaces

* cleanup2

* cleanup 3

* remove start proxy

* cleanup +1

* Update cmake-modules/TestProxyPrep.cmake

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

* Update eng/scripts/Start-TestProxy.ps1

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

* Update eng/scripts/Stop-TestProxy.ps1

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

* PR comments

* clangs

* Update sdk/core/azure-core-test/src/test_proxy_policy.cpp

* build

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2022-12-13 10:58:19 -08:00
Anton Kolesnyk
40f2fde457
ClientCertificateCredential: Add AuthorityHost override and Azure Stack support (#4181)
* ClientCertificateCredential: Add AuthorityHost override and Azure Stack support
* Use RAII types for handles

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2022-12-13 04:43:16 +00:00
Anton Kolesnyk
97235cb46b
Add support for space character instead of 'T' when parsing RFC3339 DateTimes (#4184)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2022-12-12 13:16:11 -08:00