Commit Graph

981 Commits

Author SHA1 Message Date
Anton Kolesnyk
28c6d139ad
Azure Core November Beta Release (#6217)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-11-13 15:43:06 -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
Larry Osterman
9770fb77dc
Implement mTLS support in WinHTTP transport. (#6131)
* Very preliminary mTLS implementation

* Tests for TLS client certificate

* Tested mTLS functionality

* Added changelog entry; updated PCCERT_CONTEXT using declaration to be more succinct.
2024-11-06 20:03:08 +00: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
daeff2ce9e
Minor code cleanups (#6169)
* Minor code cleanups

* Update claims_based_security_impl.hpp

Undo UniqueAmqpCbsHandle removal - it is right, but will create problems for Larry working in a feature branch when merging it back.

* Update claims_based_security_impl.hpp

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-11-04 19:58:06 +00:00
Azure SDK Bot
54872294f9
Increment package version after release of azure-core (#6168)
---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-11-01 16:21:12 -07:00
Anton Kolesnyk
0180c8ee5c
HttpShared::GenerateUserAgent() (#6163)
* Rename UserAgentGenerator

* Update includes

* Clang-format

* Move GenerateUserAgent() to HttpShared class

* Update invocations

* Update invocations

* Clang-format

* Drop unnecessary include

* Update release dates

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-11-01 14:07:45 -07:00
Anton Kolesnyk
99e0895a5d
Move UserAgentGenerator to _internal (#6067)
* Move UserAgentGenerator to _internal

* Clang-format

* Update release date to November release (Core)

* Update release date to November release (EventHubs)

* _MSVC_LANG

* Move comment up

* Add /Zc:__cplusplus when building the SDK, and add unittest

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-10-31 10:00:12 -07:00
Ahson Khan
064fcad72f
Set token to be expired if response comes back as unauthorized, within BeareTokenAuthenticationPolicy. (#6151)
* Set token to be expired if response comes back as unauthorized.

* Add CL entry.

* Update CL.

* Use trc MinimumExpiration to invalidate the credential's token cache.

* Add test.

* Address PR feedback.

* Remove comment as it is no longer relevant.

* Use initializer list syntax to see if posix compilers are okay with that.

* Keep the bool field as non-atomic.

* Revert "Keep the bool field as non-atomic."

This reverts commit 1b8c7622d5234b010bb0a4eb5db8a436de5a2adf.
2024-10-30 14:00:42 -07:00
Anton Kolesnyk
bf550f2544
Acknowledge community contribution to Core (#6091)
* Acknowledge community contribution to Core

* Update CHANGELOG.md

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-10-11 21:06:40 +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
Ahson Khan
8f8d24280f
Fixed warning for an unused function in curl.cpp when building the SDK using a version of libcurl older than 7.77.0 (#6073) 2024-10-07 16:28:25 -07:00
Azure SDK Bot
4722e3df3c
Increment package version after release of azure-core (#6062)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-10-03 19:50:04 -07:00
Anton Kolesnyk
9aa25a063d
UserAgentGenerator compatibility for previously published EventHubs (#6063)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-10-03 19:48:47 -07:00
Anton Kolesnyk
1289063cc2
Azure Core October GA Release (#6053)
* Azure Core October GA Release

* Change to re-trigger CI

* Undo change, still re-trigger CI

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

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

* Also update wording in the previous release

* Spelling

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Larry Osterman <LarryOsterman@users.noreply.github.com>
2024-10-03 11:29:28 -07:00
Ahson Khan
5a6176706d
Add basic input validation to ResourceIdentifier for ensuring the prefix match what is expected. (#6056)
* Initial verification and tests.

* Simplify validation checks to what's needed.

* Update changelog entry.

* Fix typo and disable cspell for a test line.

* Address PR feedback.
2024-10-02 06:42:01 +00: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
Anton Kolesnyk
488b65e6a2
Acknowledge community contributions in Changelog (#6047)
* Acknowledge community contributions in Changelog

* Update cspell.json

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

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2024-09-27 17:00:43 -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
23729124bd
Make the HTTP transport behavior consistent between WinHTTP and libcurl by disabling automatically following redirects on Windows. (#6018)
* Make the HTTP transport behavior consistent between WinHTTP and libCurl by disabling automatically following redirects on Windows.

* Re-enable APC test.

* Fix casing in changelog.

* Add http bin based unit test and fix typo in doc comment for curl.

* Update test name to avoid 'dont'

* Fix typo.
2024-09-24 13:14:08 -07:00
James Le Cuirot
7fea3ff677
Fix etag.hpp comment that breaks Doxygen 1.12.0 (#6014)
Unfortunately, "*" breaks Doxygen 1.12.0 with the following error:

    error: end of comment block while expecting command </em>

I have no idea why. Anything else like '*' or "x" works, but "*" was
clearly intended here. The best I can suggest is: * in quotes.
2024-09-20 08:51:25 -07:00
Azure SDK Bot
da2ea2113d
Increment version for core releases (#5980)
* Increment package version after release of azure-core-amqp

* Increment package version after release of azure-core

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-09-12 11:22:35 -07:00
Anton Kolesnyk
cfbe21ca82
Azure Core September Releases (#5975)
* Azure Core September Releases

* Update CHANGELOG.md

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-09-12 07:38:49 -07:00
Larry Osterman
b45276fc24
Update CHANGELOG.md for September release (#5976) 2024-09-11 15:40:39 -07:00
Ahson Khan
c3265d3e5b
Fix input validation check for TimeFractionFormat in the DateTime ToString method (#5927)
* Fix input validation check for TimeFractionFormat in the DateTime ToString() method.

* Add changelog entry.

* Use switch-case instead of static casting the enum values.

* Address CL PR feedback.

* Fix the features added CL to put ResourceIdentifier in the right release.

* Address PR feedback - use type traits
2024-09-10 14:35:07 -07: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
Anton Kolesnyk
6ae78faec8
Update Uuid parameter name, and improve tests (#5943)
* Update Uuid parameter name, and improve tests

* Update sdk/core/azure-core/inc/azure/core/uuid.hpp

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

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2024-08-27 18:40:54 -07:00
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
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
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
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
Larry Osterman
863e2b2b91
Ported uAMQP changes to vendored copy of uAMQP (#5917) 2024-08-15 22:28:08 -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
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
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
Anton Kolesnyk
0f62b3aa63
Add consumption-time value of __cplusplus to User-Agent (#5662)
* Add consumption-time value of __cplusplus to User-Agent

---------

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-29 18:31:51 -07:00
Larry Osterman
90089ad326
Cleaned up Azure::Core::Context API surface (#5676)
* Deprecated Azure::Core::ApplicationContext because its use is confusing and inconsistent with the original design. 

---------

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2024-07-17 12:38:30 -07:00
Larry Osterman
2b987eeed8
Improve code coverage numbers by excluding some options (#5805)
* Potentially improve code coverage numbers by excluding some options

* Removed dead lines; replicated switches to both gcovr executions

* added link to gcovr branch coverage faq
2024-07-17 18:36:10 +00:00
Anton Kolesnyk
e47e3168fe
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>
2024-07-15 18:45:06 +00:00
Azure SDK Bot
fb6c039f5e
Increment package version after release of azure-core (#5794) 2024-07-12 21:34:14 +00:00
Anton Kolesnyk
6b9e1cc691
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>
2024-07-12 12:03:43 -07:00
Anton Kolesnyk
e8c7c559d9
Azure Core July GA Release (#5792)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2024-07-12 10:24:12 -07:00
Ahson Khan
9ccd206ff8
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.
2024-07-11 17:39:37 -07:00
George Arama
313fb0e58f
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>
2024-07-11 17:38:19 -07:00