public void SetUp()
        {
            var hostname = Environment.GetEnvironmentVariable("keyvaultHostname");

            _client = new KeyClient(new Uri(hostname ?? throw new ArgumentException()), new DefaultAzureCredential());
            _client.CreateKey(KeyName, KeyType.Ec, new CreateEcKeyOptions(KeyName, true));
            _vaultKeyRetriever = new KeyVaultKeyRetriever(_client);
        }
Example #2
0
        public KeyVaultKeyGetController(ILogger <KeyVaultKeyGetController> logger, KeyVaultKeyRetriever vaultKeyRetriever)
        {
            _vaultKeyRetriever = vaultKeyRetriever;
            var hostname = Environment.GetEnvironmentVariable("keyvaultHostname");

            logger.LogInformation(
                $"Initiating KeyvaultGetController with hostname <{hostname}>");
        }