Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Assess and enforce Azure compliance requirements including policies, regulatory standards, and security baselines
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/sdk/azure-security-keyvault-keys-java.md
1# Key Vault Keys — Java SDK Quick Reference23> Condensed from **azure-security-keyvault-keys-java**. Full patterns4> (crypto operations, HSM keys, key rotation, backup/restore, import)5> in the **azure-security-keyvault-keys-java** plugin skill if installed.67## Install8```xml9<dependency>10<groupId>com.azure</groupId>11<artifactId>azure-security-keyvault-keys</artifactId>12<version>4.9.0</version>13</dependency>14<dependency>15<groupId>com.azure</groupId>16<artifactId>azure-identity</artifactId>17</dependency>18```1920## Quick Start2122> **Auth:** `DefaultAzureCredential` is for local development. See [auth-best-practices.md](../auth-best-practices.md) for production patterns.2324```java25import com.azure.security.keyvault.keys.KeyClientBuilder;26import com.azure.identity.DefaultAzureCredentialBuilder;27var keyClient = new KeyClientBuilder()28.vaultUrl("https://<vault>.vault.azure.net")29.credential(new DefaultAzureCredentialBuilder().build())30.buildClient();31```3233## Best Practices34- Use HSM keys for production — set `setHardwareProtected(true)` for sensitive keys35- Enable soft delete — protects against accidental deletion36- Key rotation — set up automatic rotation policies37- Least privilege — use separate keys for different operations38- Local crypto when possible — use CryptographyClient with local key material to reduce round-trips39