Ignora esplorazione

Vnet/IP ACL sample for Azure Key Vault using the Azure Java SDK

Data ultimo aggiornamento: 02/07/2018
Modifica in GitHub

This sample repo demonstrates how to create an Azure Key Vault with access limited to specific IP ranges and Azure Virtual Networks.


Running the samples

  1. If not installed, install Java.

  2. Clone the repository. git clone https://github.com/Azure-Samples/key-vault-java-authentication.git

  3. Create an Azure service principal, using Azure CLI, PowerShell or Azure Portal. Note that if you wish to authenticate with the certificate authenticator the certificate should be saved locally.

  4. Add the following values to the pom.xml in the configurations for the exec-maven-plugin. <systemProperties> <systemProperty> <key>AZURE_TENANT_ID</key> <value>{AZURE_TENANT_ID}</value> </systemProperty> <systemProperty> <key>AZURE_CLIENT_ID</key> <value>{AZURE_CLIENT_ID}</value> </systemProperty> <systemProperty> <key>AZURE_CLIENT_SECRET</key> <value>{AZURE_CLIENT_SECRET}</value> </systemProperty> <systemProperty> <key>AZURE_OBJECT_ID</key> <value>{AZURE_OBJECT_ID}</value> </systemProperty> <systemProperties>

AZURE_TENANT_ID, AZURE_CLIENT_ID, and AZURE_CLIENT_SECRET must be set for general Azure authentication.

  1. Run mvn clean compile exec:java for a full run-through.

More information