Keyvault regen (#5445)
* mroe quotes * dssf * update to api version 7.5 , added field to key properties , regen tests * update hsm location * fds
This commit is contained in:
parent
1ecceb6f7a
commit
a733518306
@ -2,5 +2,5 @@
|
||||
"AssetsRepo": "Azure/azure-sdk-assets",
|
||||
"AssetsRepoPrefixPath": "cpp",
|
||||
"TagPrefix": "cpp/keyvault",
|
||||
"Tag": "cpp/keyvault_51f59d3347"
|
||||
"Tag": "cpp/keyvault_c86efa6555"
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Certificat
|
||||
* @brief Service Version used.
|
||||
*
|
||||
*/
|
||||
const std::string ApiVersion{"7.3"};
|
||||
const std::string ApiVersion{"7.5"};
|
||||
};
|
||||
|
||||
}}}} // namespace Azure::Security::KeyVault::Certificates
|
||||
|
||||
@ -900,8 +900,8 @@ TEST_F(KeyVaultCertificateClientTest, ServiceVersion)
|
||||
{
|
||||
auto credential
|
||||
= std::make_shared<Azure::Identity::ClientSecretCredential>("tenantID", "AppId", "SecretId");
|
||||
// 7.3
|
||||
// 7.5
|
||||
EXPECT_NO_THROW(auto options = CertificateClientOptions(); CertificateClient certificateClient(
|
||||
"http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.3"););
|
||||
EXPECT_EQ(options.ApiVersion, "7.5"););
|
||||
}
|
||||
|
||||
@ -41,6 +41,6 @@ namespace Azure {
|
||||
* @brief Construct a new Key Client Options object.
|
||||
*
|
||||
*/
|
||||
CryptographyClientOptions() : Azure::Core::_internal::ClientOptions() { Version = "7.3"; }
|
||||
CryptographyClientOptions() : Azure::Core::_internal::ClientOptions() { Version = "7.5"; }
|
||||
};
|
||||
}}}}} // namespace Azure::Security::KeyVault::Keys::Cryptography
|
||||
|
||||
@ -559,6 +559,12 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
||||
*/
|
||||
Azure::Nullable<bool> Exportable;
|
||||
|
||||
/**
|
||||
* @brief Indicates if the private key can be exported.
|
||||
*
|
||||
*/
|
||||
Azure::Nullable<std::string> HsmPlatform;
|
||||
|
||||
/**
|
||||
* @brief Construct a new Key Properties object.
|
||||
*
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys {
|
||||
* @brief Service Version used.
|
||||
*
|
||||
*/
|
||||
const std::string ApiVersion{"7.3"};
|
||||
const std::string ApiVersion{"7.5"};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -80,6 +80,9 @@ void _detail::KeyVaultKeySerializer::KeyVaultKeyDeserialize(
|
||||
attributes,
|
||||
_detail::UpdatedPropertyName,
|
||||
PosixTimeConverter::PosixTimeToDateTime);
|
||||
|
||||
JsonOptional::SetIfExists<std::string>(
|
||||
key.Properties.HsmPlatform, attributes, _detail::HsmPlatformPropertyName);
|
||||
}
|
||||
|
||||
JsonOptional::SetIfExists<json, KeyReleasePolicy>(
|
||||
|
||||
@ -32,6 +32,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Keys { nam
|
||||
constexpr static const char UpdatedPropertyName[] = "updated";
|
||||
constexpr static const char RecoverableDaysPropertyName[] = "recoverableDays";
|
||||
constexpr static const char RecoveryLevelPropertyName[] = "recoveryLevel";
|
||||
constexpr static const char HsmPlatformPropertyName[] = "hsmPlatform";
|
||||
|
||||
/***************** Key Request Parameters *****************/
|
||||
constexpr static const char KeyTypePropertyName[] = "kty";
|
||||
|
||||
@ -27,6 +27,7 @@ TEST_F(KeyVaultKeyHSMClient, CreateEcHsmKey)
|
||||
CheckValidResponse(keyResponse);
|
||||
auto keyVaultKey = keyResponse.Value;
|
||||
EXPECT_EQ(keyVaultKey.Name(), keyName);
|
||||
EXPECT_TRUE(keyVaultKey.Properties.HsmPlatform.HasValue());
|
||||
EXPECT_TRUE(keyVaultKey.Properties.Enabled.Value());
|
||||
}
|
||||
{
|
||||
@ -36,6 +37,7 @@ TEST_F(KeyVaultKeyHSMClient, CreateEcHsmKey)
|
||||
auto keyVaultKey = keyResponse.Value;
|
||||
EXPECT_EQ(keyVaultKey.Name(), keyName);
|
||||
EXPECT_FALSE(keyResponse.Value.Properties.ReleasePolicy.HasValue());
|
||||
EXPECT_TRUE(keyVaultKey.Properties.HsmPlatform.HasValue());
|
||||
EXPECT_TRUE(keyVaultKey.Properties.Enabled.Value());
|
||||
}
|
||||
}
|
||||
@ -54,6 +56,7 @@ TEST_F(KeyVaultKeyHSMClient, CreateRsaHsmKey)
|
||||
CheckValidResponse(keyResponse);
|
||||
auto keyVaultKey = keyResponse.Value;
|
||||
EXPECT_EQ(keyVaultKey.Name(), keyName);
|
||||
EXPECT_TRUE(keyVaultKey.Properties.HsmPlatform.HasValue());
|
||||
}
|
||||
{
|
||||
// Now get the key
|
||||
@ -63,6 +66,7 @@ TEST_F(KeyVaultKeyHSMClient, CreateRsaHsmKey)
|
||||
EXPECT_EQ(keyVaultKey.Name(), keyName);
|
||||
EXPECT_FALSE(keyResponse.Value.Properties.ReleasePolicy.HasValue());
|
||||
EXPECT_TRUE(keyVaultKey.Properties.Enabled.Value());
|
||||
EXPECT_TRUE(keyVaultKey.Properties.HsmPlatform.HasValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,10 +32,10 @@ TEST(KeyVaultKeyClientUnitTest, ServiceVersion)
|
||||
{
|
||||
auto credential
|
||||
= std::make_shared<Azure::Identity::ClientSecretCredential>("tenantID", "AppId", "SecretId");
|
||||
// 7.3
|
||||
// 7.5
|
||||
EXPECT_NO_THROW(auto options = KeyClientOptions();
|
||||
KeyClient keyClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.3"););
|
||||
EXPECT_EQ(options.ApiVersion, "7.5"););
|
||||
}
|
||||
|
||||
TEST(KeyVaultKeyClientUnitTest, GetUrl)
|
||||
|
||||
@ -22,7 +22,7 @@ namespace Azure { namespace Security { namespace KeyVault { namespace Secrets {
|
||||
* @brief Service Version used.
|
||||
*
|
||||
*/
|
||||
const std::string ApiVersion{"7.3"};
|
||||
const std::string ApiVersion{"7.5"};
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@ -30,10 +30,10 @@ TEST(SecretClient, ServiceVersion)
|
||||
{
|
||||
auto credential
|
||||
= std::make_shared<Azure::Identity::ClientSecretCredential>("tenantID", "AppId", "SecretId");
|
||||
// 7.3
|
||||
// 7.5
|
||||
EXPECT_NO_THROW(auto options = SecretClientOptions();
|
||||
SecretClient SecretClient("http://account.vault.azure.net", credential, options);
|
||||
EXPECT_EQ(options.ApiVersion, "7.3"););
|
||||
EXPECT_EQ(options.ApiVersion, "7.5"););
|
||||
}
|
||||
|
||||
TEST(SecretClient, GetUrl)
|
||||
|
||||
@ -62,7 +62,7 @@ extends:
|
||||
- Name: AZURE_KEYVAULT_URL
|
||||
Value: "https://non-real-account.vault.azure.net"
|
||||
- Name: AZURE_KEYVAULT_HSM_URL
|
||||
Value: "https://non-real-account.managedhsm.azure.net/"
|
||||
Value: "https://non-real-account.vault.azure.net"
|
||||
# Tenant ID should use the uniqueID format for playback recordings
|
||||
- Name: AZURE_TENANT_ID
|
||||
Value: "33333333-3333-3333-3333-333333333333"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user