internal static X509Certificate2 LoadKeyVaultCertificate(string secretName) { KeyVaultWrapper kvw = KeyVaultWrapper.GetTestInfraKeyVaultWrapper(); string keyVaultUri = KeyVaultWrapper.GetTestInfraKeyVaultUri(); X509Certificate2 cert = kvw.GetCertificateFromSecret(keyVaultUri, secretName); var certBytes = cert.Export(X509ContentType.Pfx); return(new X509Certificate2(certBytes)); }
public static string GetXStoreTestResourcesConnectionString() { var keyVaultUri = KeyVaultWrapper.GetTestInfraKeyVaultUri(); var kvw = KeyVaultWrapper.GetTestInfraKeyVaultWrapper(); var storageKey = kvw.GetSecret(keyVaultUri, TestUtility.TestResourcesStorageAccountKeyName); return(string.Format( CultureInfo.InvariantCulture, "DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1}", TestUtility.TestResourcesStorageAccountName, storageKey)); }
private static string GetTestStorageAccountKey() { var kvw = KeyVaultWrapper.GetTestInfraKeyVaultWrapper(); return(kvw.GetSecret(KeyVaultWrapper.GetTestInfraKeyVaultUri(), WinFabCitStoreAccountKeySecretName)); }