Commit Graph

270 Commits

Author SHA1 Message Date
Larry Osterman
53c9da1552
Pull all Websockets changes to main except for WebSockets itself. (#3954)
* Pulled WebSocket fixes into main except for WebSockets functionality


Co-authored-by: Rick Winter <rick.winter@microsoft.com>
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
Co-authored-by: George Arama <50641385+gearama@users.noreply.github.com>
Co-authored-by: Ahson Khan <ahson_ahmedk@yahoo.com>
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2022-10-04 14:58:56 -07:00
JinmingHu
eb9c35d266
Revert "Add Win32FileTimeConverter (#3941)" (#3966)
This reverts commit 14e4f52b91.
2022-09-29 09:42:23 +08:00
JinmingHu
14e4f52b91
Add Win32FileTimeConverter (#3941) 2022-09-21 09:31:34 +08:00
George Arama
992a3a9409
Helm charts (#3841)
* helm chart

* first pipe setup

* poi

* magiks

* ewewe

* stress

* cleanup

* pr

* QFE and readme

* clang

* stupid clang , waste of time

* ewqwewewrqrewewrqewrqwrqr

* stupid clang

* cspell

* PR

* try try again

* clang again
2022-07-25 11:25:05 -07:00
George Arama
7bf67350a2
Remove winhttp (#3832)
* remove refs to winhttp

* this tsst only curl
2022-07-15 13:47:01 -07:00
George Arama
e0706ba1fb
Stress test (#3820)
* mem leak fix

* PR comments fix

* PR comments

* seems to work?

* clang

* curl again

* add first stress test

* also update gitignore

* missing line

* only linux

* clang typo format

* typo 2

* PR comments

* cspell

* remove terminator
2022-07-13 13:11:50 -07:00
Larry Osterman
38b07749dc
Removed internal types from OpenTelemetry API surface; removed default parameters from OpenTelemetry API surface. (#3762)
* Removed internal references from public headers


* Updated changelog files

* Updated DistributedTracing.md to reflect Factory construction of Azure::Core::Tracing::OpenTelemetry::OpenTelemetryProvider type

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2022-06-29 21:39:56 -07:00
Anton Kolesnyk
dfe9a2be1f
InputSanitizer: rename to HttpSanitizer, remove static member (#3736)
* InputSanitizer => HttpSanitizer, remove static

* Update cpp

* Clang format

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2022-06-15 11:18:23 -07:00
Larry Osterman
99f45a5f18
Enable Distributed Tracing for Attestation SDK client. (#3706)
* Implement tracing for Attestation and Template services

* Pipeline no longer requires service name if opting into distributed tracing; enable tracing in attestation service

* Generate user-agent header from request activity policy

* Added test to catch the redacted header regression

* Updated documentation to reflect API surface changes
2022-06-08 11:40:56 -07:00
Larry Osterman
78095ce0c7
Additional OpenTelemetry Feedback... (#3691)
* OpenTelemetry API Review Feedback

* Returns std::unique_ptr<DiagnosticTracingFactory instead of raw pointer

* Late breaking pull request feedback

* Renamed clientContext parameter to CreateSpan

* Renamed ContextAndSpanFactory to TracingContextFactory and CreateSpan to CreateTracingContext.
2022-06-03 00:25:08 +00:00
Larry Osterman
ebe084bfc6
OpenTelemetry API Review Feedback (#3687)
* OpenTelemetry API Review Feedback
2022-06-02 00:20:26 +00:00
Larry Osterman
7c93854125
Complete the initial implementation of OpenTelemetry (#3677)
* Added telemetry support for HTTP pipeline elements

* Finish OpenTelemetry implementation

* clang-format and added doxygen comments
2022-05-31 10:57:32 -07:00
Larry Osterman
8ca08a1429
Initial implementation of OpenTelemetry APIs. (#3561)
* Start of tracing prototype

* Created initial implementation of azure-core-opentelemetry package

* New version of enabling MSVCRT Lib for static configs

* Attempt to add OpenTelemetry tests to build

* Take a dependency on OpenTelemetry version 1.3

* Added service API level tracing support

* API Review feedback
2022-05-23 16:44:22 -07:00
Victor Vazquez
d799012230
update log level from Retry policy (#3586)
* update log level

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

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

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2022-04-25 22:53:58 +00:00
Victor Vazquez
0564cc479e
Improve the Transport exception from Libcurl adapter (#3456)
* improve the Transport exception

* update comment and name
2022-03-21 22:23:33 +00:00
Larry Osterman
f4e99416c9
RequestFailedException includes error information #3398 (#3397)
* RequestFailedException includes error information

* Fixed test collateral

* Added changelog entry for new core version; Added tests to verify response message contains all expected fields
2022-03-11 21:15:10 +00:00
Larry Osterman
8672f985aa
Create Extendable Enumeration base class (#3421)
* Created extendableenumeration class

* Convert attestation to use extendable enumeration; added test for extendable enumerations

Co-authored-by: Casey Carter <cartec69@gmail.com>
2022-03-11 02:37:31 +00:00
Larry Osterman
ddc9eb355f
Fixed Live Tests for Attestation SDK. (#3366)
* Set WinHTTP_OPTION_CLIENT_CERT_CONTEXT to enable connections to attestation service

* Set serviceDirectory from environment variables

Co-authored-by: Victor Vazquez <victor.vazquez@microsoft.com>
2022-02-24 22:48:15 +00:00
Larry Osterman
60c075a64e
Base64::Decode throws std::runtime_error on failure. (#3305)
* Throw an exception when base64 decode has bogus inputs

Co-authored-by: Ahson Khan <ahkha@microsoft.com>
2022-02-08 09:34:00 -08:00
Ahson Khan
9c79a0725d
Removing the two param RFE ctor, there should be no callers (#3215)
* Removing the two param RFE ctor, there should be no callers

* Remove the two param RFE ctor from the source file.

* Fix-up unit test and add a changelog entry.

* Remove test that uses the removed ctor.
2022-02-03 19:00:25 -08:00
Anton Kolesnyk
c4e95dfcfc
Fix unit test compilation on UWP (#3298)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2022-01-31 18:43:37 -08:00
Anton Kolesnyk
2aae6be7a3
Encapsulate getenv(), and make it work on UWP (#3275)
It all started with UWP. The [docs](https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=msvc-170) say: "`Environment variables are not available to UWP apps.`". And it truly won't work, I tried: linker error, the function is simply not present.

So, for a year or so, we were `ifdef`ing everything enivoronment-related: console logger, environment credential, managed identity credential.

And then just recently we wanted to enable our CI for UWP, including tests and samples. And it required to do more ifdefs (in vcpkg, we don't build samples or tests, so that problem did not exist).

It just became more messy. Especially in samples - you can see how we would disable warning with `#pragma warning(disable : 4996)` or defining `_CRT_SECURE_NO_WARNINGS` already, but now came UWP, so we would have to add comment that `getenv()` is not available and make the sample compilation to either fail with clear message, or throw an exception. Plus we would have to detect that we are being compiled on UWP, which also adds visual clutter for reader. You can see how such an irrelevant (for a sample) thing as `getenv` was consuming more and more lines of sample code and reader's attention.

But then! I read docs on more APIs for UWP. And I noticed that on .NET you can read environment variables. So I went and checked Win32 API docs for [GetEnvironmentVariable()](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getenvironmentvariable) - it says: "`Minimum supported client: ... UWP apps`".

**GetEnvironmentVariable() works on UWP!**
And so does `SetEnvironmentVariable()` (our tests use it, which means we can make all of them work and execute for UWP).

That's good news, but now it would probably be more code: it usually takes more lines to invoke WinAPI, it is no more an one-liner to call `getenv()/setenv()`. So, I encapsulated that into `Azure::Core::_internal::Environment::GetVariable()` and `SetVariable()`. You can see how much less ifdefs is in our code now. Not to mention it works on UWP!

Per team request, that API is SDK-internal. Samples use their own mini-helper project, `get-env-helper` that makes is so that `getenv()` works naturally on Linux and macOS, compiles without warnings and works on Win32, and compiles and works on UWP (using `GetEnvironmentStringsA()`)

If it was for me, I would just make `Azure::Core::Environment::GetVariable()` public and simplify even further, I think it would be beneficial for sample readers (you can see that extra `get-env-helper` stuff adds just a little more visual clutter, compared to nothing). But I can see reasons against that, why team did not want to do it.
2022-01-29 08:22:33 +00:00
Daniel Jurek
fa0fa97155
Generate map files (#3181)
* Generate map files in build

* Add .map file artifact publishing

* Add Xlinker to spelling exceptions

* Remove PublishMapFiles from clang builds

* Generate the map file artifact name

* CXX_COMPILER_ID and some logging for Clang which might be linking using the GNU linker by default

* More logging

* Move logging out of conditional

* Logging up high, use OS to determine which link flags to set

* Use linker options specific to AppleClang's context, publish map files for all platforms
2022-01-03 13:56:41 -08:00
Anton Kolesnyk
b4fe751310
RequestFailedException: decouple Message and what(). (#3201)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2021-12-18 09:00:04 -08:00
Anton Kolesnyk
5f97ac1b3d
Fix nightly tests compilation on GCC5 (#3190) 2021-12-16 10:44:22 -08:00
Anton Kolesnyk
a2b2b74080
Add a few simple unit tests to boost coverage (#3163) 2021-12-13 14:50:30 -08:00
Anton Kolesnyk
12a2ca31bc
Fix DateTime::Parse validation for dates past year 9999 due to adjustments (#3177) 2021-12-13 12:55:00 -08:00
Anton Kolesnyk
98d9664dc9
Boost code coverage by adding tests (#3123)
* Boost code coverage by adding tests

* Increase Code Coverage min bar goals

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2021-12-02 08:43:07 -08:00
Ahson Khan
1d7b6bb485
Fix up build error by adding missing parenthesis in tests (#3071)
* Fix up build error by adding missing parenthesis in tests

* Because static lib curl tests were disabled we need to lower the threshold
2021-11-05 15:30:59 -07:00
Ahson Khan
ad87699a2e
Disable unit tests for staticLibCurl since they are failing on Mac (#3068) 2021-11-05 14:18:10 -07:00
Victor Vazquez
fb03127d05
Use ms for connection timeout (#3001)
* move the static transport adapter to private impl

* use MS for connection timeout

* update

* fix the value
2021-11-03 23:08:35 +00:00
Victor Vazquez
31398df179
move the static transport adapter to private impl (#2993) 2021-10-28 11:49:37 -07:00
Victor Vazquez
3be793d558
[Core] - Support azure-core version without OpenSSL dependency (#2839)
* perf test uuid

* use win impl for uuid on linux

* use c99 base64 encode-decode
2021-10-27 23:20:34 +00:00
Victor Vazquez
a4f2e510e5
Adding timeout option (#2991) 2021-10-25 12:12:53 -07:00
Victor Vazquez
ef72f3c8a1
expose Curl nosignal opt (#2985)
* add NoSignalOption

* cl

* tests
2021-10-21 17:25:02 -07:00
Anton Kolesnyk
6c0901b2ff
Fix build warning in no-RTTI config (#2981)
* Fix build warning in no-RTTI config

* Fix build warning in no-RTTI config

Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2021-10-19 16:09:06 -07:00
Anton Kolesnyk
b477373a9c
Remove extra semicolons (#2979)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2021-10-19 16:08:42 -07:00
Victor Vazquez
5e3cd1fb01
Adding a static-blocking libcurl transport adapter (#2948)
* static libcurl transport adapter

* ignore cspell

* updates to implementation
2021-10-18 15:01:00 -07:00
Victor Vazquez
8f3263a7ec
Missing fix for testing windows w/o RTTI (#2969)
* Enable no-rtti

* Apply suggestions from code review

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

* pass target

* rename

* rename

* fix for installed header

* update

* compile with tests

* add unit test for CI

* rename for each package

* wording updates

* renames

* rename

* update name

* fix for testing context pre-condition

Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
2021-10-18 15:00:47 -07:00
Victor Vazquez
f4e6390dff
Enable no-rtti (#2963)
* Enable no-rtti
2021-10-14 18:12:03 -07:00
Anton Kolesnyk
3aee1859f0
CSpell fixes for Core and Identity (#2816)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
2021-08-31 15:21:17 -07:00
Victor Vazquez
0c041c9bfa
Add core-test recording-playback (#2685)
Recording feature
2021-08-09 15:38:57 -07:00
Victor Vazquez
a508789c36
Remove warning supress (#2677)
* remove warning suppress not required anymore

* json update

* update the curl header including

* changelog
2021-07-27 18:09:52 -07:00
Victor Vazquez
0567145212
support connection close header (#2672) 2021-07-27 10:03:56 -07:00
George Arama
1f15e046e0
Progress stream reader (#2563)
* Progress stream reader

* format

* Update sdk/core/azure-core/src/io/body_stream.cpp

Co-authored-by: JinmingHu <jinmhu@microsoft.com>

* PR comments

* remove

* one more comment

* replaced if null with azure_assert

* moved from pointer to reference

* PR comments

* clang

Co-authored-by: JinmingHu <jinmhu@microsoft.com>
2021-07-20 13:28:48 -07:00
Ahson Khan
d0ca42643f
Move Sha256Hash and other Hash algorithm types from KeyVault to Azure::Core (#2526)
* Move the SHA256, 384, and 512 Hash implementations to be internal.

* Update changelog and add back missing file.

* Rename SHA256 and others to Sha256Hash and update header name.

* Fix up path in CMakeList by removing quotes.

* Rename the sha.cpp source file to match header.

* Move Sha256Hash and other Hash algorithm types from KeyVault to
Azure::Core.

* Reorder src file in cmakelist to be alpha order just to reset CI

* Revert "Reorder src file in cmakelist to be alpha order just to reset CI"

This reverts commit 6729cf311af76bb8388738cc519ea40092bc362c.
2021-07-01 15:42:36 -07:00
Ahson Khan
731d07c2cc
Fix up the implementation details of the RequestFailedException ctor. (#2536) 2021-07-01 14:08:05 -07:00
George Arama
c449e3f9bc
2502 exceptions (#2529)
* first pass

* move exception creation from keyvault to core

* merge fix

* format

* fix includes location and containers

* remove default constructor

* to trigger build

* undo change

* uncomment

* Update sdk/core/azure-core/test/ut/exception_test.cpp

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

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2021-07-01 04:17:15 +00:00
Wes Haggard
015c34a029
Update links from master to main (#2488)
* Update links from master to main

* Upate other references from master to main
2021-06-24 22:27:14 -07:00
George Arama
70c3e72763
Add Unit Tests for EnvironmentLogLevelListener (#2454)
* first UT

* formatting

* unused error

* putenv

* some refactoring

* formatting

* casting

* again

* Update sdk/core/azure-core/test/ut/environmentLogLevelListener_test.cpp

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

* some refactoring

* more tests

* format

* no env test

* put back missing empty line

* Update sdk/core/azure-core/test/ut/environmentLogLevelListener_test.cpp

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

* PR comments

* fix signed/unsigned mismatch that causes ci build to fail

Co-authored-by: Rick Winter <rick.winter@microsoft.com>
2021-06-22 21:51:41 +00:00