Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8226174
Reword the curl proxy fix changelog entry. (#3606)
ahsonkhan May 2, 2022
0494d24
Add Emma Zhu as code owner (#3605)
Jinming-Hu May 2, 2022
2c3d73e
Short circuit out of msdocs publish if no package locations are speci…
azure-sdk May 3, 2022
f1de8d2
sdk/core: Reimplement Md5OpenSSL using EVP API (#3609)
jepio May 3, 2022
a2d975c
API Review Feedback for Attestation SDK (#3543)
LarryOsterman May 3, 2022
f8ced21
Remove version pin for OpenSSL (#3610)
LarryOsterman May 3, 2022
e010b91
Update the version tool to the latest (#3616)
azure-sdk May 4, 2022
b9fb5ef
Get rid of warnings in nullable.hpp (#3617)
Jinming-Hu May 4, 2022
d317e06
cl (#3613)
vhvb1989 May 5, 2022
d3dbd56
Update pipeline-generator version (#3623)
azure-sdk May 5, 2022
44af947
Prepare Attestation SDK for May Release. (#3625)
LarryOsterman May 5, 2022
c2ce38d
Increment package version after release of azure-core (#3624)
azure-sdk May 6, 2022
d96216f
Update CODEOWNERS (#3628)
RickWinter May 9, 2022
7c34ab0
Fix identity samples running in CI (#3632)
antkmsft May 11, 2022
a4a6efb
azure identity may 2022 release (#3615)
vhvb1989 May 11, 2022
bfaf27c
Increment package version after release of azure-identity (#3637)
azure-sdk May 11, 2022
7c2682b
Removed uwp-x86 from platform matrix. (#3629)
LarryOsterman May 11, 2022
c0e92e4
Increment package version after release of azure-security-attestation…
azure-sdk May 11, 2022
0e68b12
Update readme for -pre and -post TestResource scripts (#3645)
azure-sdk May 11, 2022
fc2f7c5
Fixed a bug where text of XML element cannot be empty. (#3643)
Jinming-Hu May 12, 2022
f4a5dbe
String parsing improvements to service directory resource names (#3644)
azure-sdk May 12, 2022
ca9a40b
Adding Acknowledgments (#3611)
vhvb1989 May 13, 2022
a43622b
Add skip variable for remove test resources to support debugging (#3648)
azure-sdk May 13, 2022
e65ea2f
Storage Blob Stg78 Features (#3650)
Jinming-Hu May 17, 2022
3ec224e
Clean up target_include_directories() (#3641)
antkmsft May 17, 2022
80cf3d0
Update all-inclusive headers, and CMakeFiles for including all header…
antkmsft May 18, 2022
593464c
Remove (#3657)
antkmsft May 20, 2022
43519e6
Merge remote-tracking branch 'upstream/main' into dm
Jinming-Hu May 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
################

# Git Hub integration and bot rules
/.github/ @AlexGhiondea @jsquire @rickwinter
/.github/ @jsquire @rickwinter

###########
# SDK
Expand Down
3 changes: 3 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@
"Intel",
"itfactor",
"iusg",
"jepio",
"Jeremi",
"Kirilov",
"lcov",
"LIBCMTD",
Expand All @@ -89,6 +91,7 @@
"okhttp",
"PBYTE",
"pdbs",
"Piotrowski",
"PUCHAR",
"pwsh",
"Ragrs",
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ include(AzureVersion)

if(BUILD_SAMPLES)
add_subdirectory(samples/helpers/get-env)
add_subdirectory(samples/helpers/service)
endif()

# sub-projects
Expand Down
4 changes: 2 additions & 2 deletions eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ try {
$BaseName = 't' + (New-Guid).ToString('n').Substring(0, 16)
Log "Generated base name '$BaseName' for CI build"
} else {
$BaseName = GetBaseName $UserName $ServiceDirectory
$BaseName = GetBaseName $UserName (GetServiceLeafDirectoryName $ServiceDirectory)
Log "BaseName was not set. Using default base name '$BaseName'"
}
}
Expand Down Expand Up @@ -520,7 +520,7 @@ try {
$ResourceGroupName
} elseif ($CI) {
# Format the resource group name based on resource group naming recommendations and limitations.
"rg-{0}-$BaseName" -f ($serviceName -replace '[\\\/:]', '-').Substring(0, [Math]::Min($serviceName.Length, 90 - $BaseName.Length - 4)).Trim('-')
"rg-{0}-$BaseName" -f ($serviceName -replace '[\.\\\/:]', '-').ToLowerInvariant().Substring(0, [Math]::Min($serviceName.Length, 90 - $BaseName.Length - 4)).Trim('-')
} else {
"rg-$BaseName"
}
Expand Down
43 changes: 43 additions & 0 deletions eng/common/TestResources/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,49 @@ setx KEYVAULT_SKU ${env:KEYVAULT_SKU}
setx AZURE_KEYVAULT_URL ${env:AZURE_KEYVAULT_URL}
```

### Pre- and Post- Scripts

Sometimes creating test resources requires either some work to be done prior to or after the main test-resources.json script is executed.
For these scenarios a `test-resources-pre.ps1` or `test-resources-post.ps1`, respectively, can be created in the same folder as the `test-resources.json` file.

For example, it may be necessary to create artifacts prior to provisioning the actual resource, such as a certificate.
Typically the created artifact will need to be passed to `test-resources.json` to be used in the ARM template or as output (or both).

Below is an example of how `$templateFileParameters` can be used to pass data from the `pre-` script to `test-resources.json`.

**Snippet from `test-resources-pre.ps1`**
```powershell
$cert = New-X509Certificate2 -SubjectName 'E=opensource@microsoft.com, CN=Azure SDK, OU=Azure SDK, O=Microsoft, L=Frisco, S=TX, C=US' -ValidDays 3652
# Create new entries in $templateFileParameters
$templateFileParameters['ConfidentialLedgerPrincipalPEM'] = Format-X509Certificate2 -Certificate $cert
$templateFileParameters['ConfidentialLedgerPrincipalPEMPK'] = Format-X509Certificate2 -Type Pkcs8 -Certificate $cert
```

**Snippet from the corresponding `test-resources.json`.**

Note that the values present in `$templateFileParameters` will map to parameters of the same name.
```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"_comment": "Other required parameters would go here... (this is not part of the actual test-resources.json)",
"ConfidentialLedgerPrincipalPEM": {
"type": "string",
"metadata": {
"description": "The certificate to configure as a certBasedSecurityPrincipal."
}
},
"ConfidentialLedgerPrincipalPEMPK": {
"type": "string",
"metadata": {
"description": "The certificate to configure as a certBasedSecurityPrincipal."
}
}
},
}
```

### Cleaning up Resources

By default, resource groups are tagged with a `DeleteAfter` value and date according to the default or specified
Expand Down
5 changes: 3 additions & 2 deletions eng/common/TestResources/SubConfig-Helpers.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
function BuildServiceDirectoryPrefix([string]$serviceName) {
$serviceName = $serviceName -replace '[\./\\]', '_'
return $serviceName.ToUpperInvariant() + "_"
}

Expand All @@ -17,8 +18,8 @@ function GetUserName() {

function GetBaseName([string]$user, [string]$serviceDirectoryName) {
# Handle service directories in nested directories, e.g. `data/aztables`
$serviceDirectorySafeName = $serviceDirectoryName -replace '[/\\]', ''
return "$user$serviceDirectorySafeName"
$serviceDirectorySafeName = $serviceDirectoryName -replace '[\./\\]', ''
return "$user$serviceDirectorySafeName".ToLowerInvariant()
}

function ShouldMarkValueAsSecret([string]$serviceName, [string]$key, [string]$value, [array]$allowedValues = @())
Expand Down
2 changes: 1 addition & 1 deletion eng/common/TestResources/remove-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ steps:
-Force `
-Verbose
displayName: Remove test resources
condition: eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true')
condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
continueOnError: true
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ steps:
- script: >
dotnet tool install
Azure.Sdk.Tools.PipelineGenerator
--version 1.0.2-dev.20220321.1
--version 1.0.2-dev.20220504.1
--add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json
--tool-path ${{parameters.ToolPath}}
workingDirectory: $(Pipeline.Workspace)/pipeline-generator
Expand Down
3 changes: 0 additions & 3 deletions eng/pipelines/templates/stages/platform-matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,6 @@
}
},
"TargetArchitecture": {
"x86": {
"CMAKE_GENERATOR_PLATFORM": "Win32"
},
"x64": {
"CMAKE_GENERATOR_PLATFORM": "x64",
"VCPKG_DEFAULT_TRIPLET": "x64-uwp"
Expand Down
17 changes: 17 additions & 0 deletions samples/helpers/service/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT

cmake_minimum_required (VERSION 3.12)
project(service LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

add_library(
service
INTERFACE
inc/azure/service/client.hpp
)

target_include_directories(service INTERFACE inc)
21 changes: 21 additions & 0 deletions samples/helpers/service/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
3 changes: 3 additions & 0 deletions samples/helpers/service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generic Service for Samples

This is a helper library for samples that provides a generic service client library.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ namespace Azure { namespace Service {

public:
explicit Client(
const std::string& someParameter,
const std::string& serviceUrl,
std::shared_ptr<Core::Credentials::TokenCredential> credential)
: m_credential(std::move(credential))
{
static_cast<void>(someParameter); // to suppress the "unused variable" warning.
static_cast<void>(serviceUrl); // to suppress the "unused variable" warning.
}

void DoSomething(const Core::Context& context) const
Expand Down
11 changes: 6 additions & 5 deletions samples/integration/vcpkg-all-smoke/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include <azure/attestation.hpp>
#include <azure/core.hpp>
#include <azure/identity.hpp>
#include <azure/keyvault/keyvault_certificates.hpp>
#include <azure/keyvault/keyvault_keys.hpp>
#include <azure/keyvault/keyvault_secrets.hpp>
#include <azure/keyvault/certificates.hpp>
#include <azure/keyvault/keys.hpp>
#include <azure/keyvault/secrets.hpp>
#include <azure/storage/blobs.hpp>
#include <azure/storage/files/datalake.hpp>
#include <azure/storage/files/shares.hpp>
Expand Down Expand Up @@ -67,10 +67,11 @@ int main()
ShareLeaseClient shareLeaseClient(shareFileClient, leaseID);
ShareServiceClient shareServiceClient(smokeUrl);

//Attestation
// Attestation
std::cout << "Creating Attestation Clients" << std::endl;
AttestationClient attestationClient(AttestationClient::Create(smokeUrl));
AttestationAdministrationClient attestationAdminClient(AttestationAdministrationClient::Create(smokeUrl, credential));
AttestationAdministrationClient attestationAdminClient(
AttestationAdministrationClient::Create(smokeUrl, credential));

std::cout << "Successfully Created the Clients" << std::endl;
}
Expand Down
2 changes: 1 addition & 1 deletion samples/integration/vcpkg-keyvault/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <azure/core.hpp>
#include <azure/identity.hpp>
#include <azure/keyvault/keyvault_keys.hpp>
#include <azure/keyvault/keys.hpp>

#include <chrono>
#include <iostream>
Expand Down
14 changes: 8 additions & 6 deletions sdk/attestation/azure-security-attestation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.3 (Unreleased)

### Features Added

No new features, addressed API Review Feedback.

### Breaking Changes

Breaking Changes from API Review
### Bugs Fixed

### Other Changes

## 1.0.0-beta.2 (2022-05-10)

### Breaking Changes

- Renamed `AttestationOpenIdMetadata` type to `OpenIdMetadata`.
- Renamed `AttestationSigningCertificateResult` type to `TokenValidationCertificateResult` to more accurately reflect the
Expand Down Expand Up @@ -36,8 +40,6 @@ Breaking Changes from API Review
- `AttestationAdministrationClient::RemovePolicyManagementCertificate` becomes `AttestationAdministrationClient::RemoveIsolatedModeCertificate`.
- Removed `ClientVersion` API from `AttestationClient` and `AttestationAdministrationClient`

### Bugs Fixed

### Other Changes

- Added `Endpoint` property to `AttestationClient` and `AttestationAdministrationClient`
Expand Down
46 changes: 23 additions & 23 deletions sdk/attestation/azure-security-attestation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,38 +31,38 @@ find_package(OpenSSL REQUIRED)

set(
AZURE_ATTESTATION_HEADER
inc/azure/attestation/dll_import_export.hpp
inc/azure/attestation/attestation_client.hpp
inc/azure/attestation/attestation_administration_client.hpp
inc/azure/attestation.hpp
inc/azure/attestation/attestation_client.hpp
inc/azure/attestation/attestation_client_models.hpp
inc/azure/attestation/attestation_client_options.hpp

src/private/package_version.hpp
src/private/attestation_common_request.hpp
src/private/attestation_deserializers_private.hpp

src/private/attestation_client_models_private.hpp
src/private/crypto/inc/crypto.hpp

src/private/attestation_client_private.hpp)
inc/azure/attestation/dll_import_export.hpp
inc/azure/attestation/rtti.hpp
inc/azure/attestation.hpp
)

set(
AZURE_ATTESTATION_SOURCE
src/attestation_client.cpp
src/attestation_administration_client.cpp
src/attestation_client_options.cpp
src/private/crypto/inc/crypto.hpp
src/private/crypto/openssl/openssl_helpers.hpp
src/private/crypto/openssl/opensslcert.cpp
src/private/crypto/openssl/opensslcert.hpp
src/private/crypto/openssl/opensslcrypto.cpp
src/private/crypto/openssl/opensslkeys.cpp
src/private/crypto/openssl/opensslkeys.hpp
src/private/attestation_client_models_private.hpp
src/private/attestation_client_private.cpp
src/private/attestation_client_private.hpp
src/private/attestation_common_request.cpp
src/private/attestation_common_request.hpp
src/private/attestation_deserializers_private.cpp
src/private/attestation_deserializers_private.hpp
src/private/jsonhelpers.cpp
src/private/attestation_client_private.cpp)

set(
AZURE_ATTESTATION_SOURCE
${AZURE_ATTESTATION_SOURCE}
src/private/crypto/openssl/opensslcrypto.cpp
src/private/crypto/openssl/opensslkeys.cpp
src/private/crypto/openssl/opensslcert.cpp)
src/private/jsonhelpers_private.hpp
src/private/package_version.hpp
src/attestation_administration_client.cpp
src/attestation_client.cpp
src/attestation_client_options.cpp
)

add_library(azure-security-attestation ${AZURE_ATTESTATION_HEADER} ${AZURE_ATTESTATION_SOURCE})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,7 @@

#include "attestation/attestation_administration_client.hpp"
#include "attestation/attestation_client.hpp"
#include "attestation/attestation_client_models.hpp"
#include "attestation/attestation_client_options.hpp"
#include "attestation/dll_import_export.hpp"
#include "attestation/rtti.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define AZURE_ATTESTATION_VERSION_MAJOR 1
#define AZURE_ATTESTATION_VERSION_MINOR 0
#define AZURE_ATTESTATION_VERSION_PATCH 0
#define AZURE_ATTESTATION_VERSION_PRERELEASE "beta.2"
#define AZURE_ATTESTATION_VERSION_PRERELEASE "beta.3"

#define AZURE_ATTESTATION_VERSION_ITOA_HELPER(i) #i
#define AZURE_ATTESTATION_VERSION_ITOA(i) AZURE_ATTESTATION_VERSION_ITOA_HELPER(i)
Expand Down
23 changes: 20 additions & 3 deletions sdk/core/azure-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# Release History

## 1.6.0-beta.1 (Unreleased)
## 1.7.0-beta.1 (Unreleased)

### Features Added

- Add `Azure::Core::Http::Request` constructor overload to support payload and non-buffered response.

### Breaking Changes

- Removed `noexcept` specification from `Azure::Core::Context::IsCancelled()`.

### Bugs Fixed

### Other Changes

## 1.6.0 (2022-05-05)

### Features Added

- Add `Azure::Core::Http::Request` constructor overload to support payload and non-buffered response.

### Bugs Fixed

- [[#3537]](https://github.com/Azure/azure-sdk-for-cpp/issues/3537) Updated field type `CurlTransportOptions.Proxy` from `std::string` to `Azure::Nullable<std::string>`. This allows libcurl to ignore the proxy settings from the environment when the string is empty.
Expand All @@ -16,6 +26,13 @@
### Other Changes

- [[#3581]](https://github.com/Azure/azure-sdk-for-cpp/issues/3581) Update log level in retry policy from warning to informational.
- Updated the MD5 Hash implementation to work on top of OpenSSL 3.0. (A community contribution, courtesy of _[jepio](https://github.com/jepio)_)

### Acknowledgments

Thank you to our developer community members who helped to make Azure Core better with their contributions to this release:

- Jeremi Piotrowski _([GitHub](https://github.com/jepio))_

## 1.5.0 (2022-03-31)

Expand Down
Loading