* Added deprecated constructors for attestation service
* Disable deprecation warnings for clang; improved documentation to reflect deprecated functions
* Use doxygen @deprecated on deprecated functions
*
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
---------
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
* Policies do not overwrite HTTP headers if they are already set
* Use static constant UserAgent
---------
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
- Made Context immutable (including marking the static ApplicationContext as const
- Put back TelemetryPolicy in all pipeline cases and removed User-Agent generation from RequestActivityPolicy (note: This part of the change may end up being reverted). Also updated parameters for TelemetryPolicy to make it clearer that the parameter is a package name, not a service name.
- Changed Az.Namespace value from being the package name to being the service name.
- Change test SpanExporter to fully capture exported values rather than keeping references to the values.
Co-authored-by: Anton Kolesnyk <41349689+antkmsft@users.noreply.github.com>
* 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>
* Remove noexcept specification from Azure::DateTime::clock::now()
* Undo unnecessary change (my local clang-format is broken)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
* 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>
* 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>
* 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
* 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.
* 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
* Reuse the same session handle for all requests rather than creating a new one each time.
* Move the session handle creation to the transport adapter ctor.
* Update changelog entry.
* Address PR feedback.
* Change CreateSessionHandle to return a local session handle
* Added GetPolicyManagementCertificates
* Added Add and Remove policy certificate
* Added support for Tpm attestation
* Moved TPM to attestation service specific section
* Added support for validation callback
* Updated RequestFailedException documentation
* RequestFailedException includes error information
* Fixed test collateral
* Added changelog entry for new core version; Added tests to verify response message contains all expected fields
* Created extendableenumeration class
* Convert attestation to use extendable enumeration; added test for extendable enumerations
Co-authored-by: Casey Carter <cartec69@gmail.com>
* 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>
* 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.
* Delegate to RFE string ctor and move impl from header to src.
* 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.
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.