Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Azure-Samples/key-vault-java-managed-storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

services platforms author
key-vault
java
tiffanyachen

Managed Storage Authentication sample for Azure Key Vault using the Azure Key Vault SDK

This sample repo includes sample code demonstrating common mechanisms for managing storage account keys using Key Vault.

Samples in this repo

  • KeyVaultManagedStorageSample
    • demonstrateStorageAccountManagement - creates a storage account and then adds the storage account to the vault to manage its keys
    • updateStorageAccount - updates a storage account in the vault
    • regenerateStorageAccountKeys - regenerates a key of a storage account managed by the vault
    • getStorageAccounts - lists the storage accounts in the vault, then gets each
    • deletStorageAccount - deletes a storage account from the vault
  • SasDefinitionSample
    • createAccountSasDefinition - creates an account SAS definition to manage storage account and its entities
    • createBlobSasDefinition - creates a service SAS definition to manage access to a blob container
    • getSasDefinition - lists and gets each of the sas definitions for this account

Prerequisites

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
  1. 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.

  2. Export these environment variables into your current shell or IDE.

    AZURE_TENANT_ID={your tenant id}
    RESOURCE_GROUP={your resource group}
  1. Run main.java for a sample run through. This project uses maven so you can do so either through an IDE or on the command line.

More information

About

Samples for use with managed storage account keys for key vault

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages