Advanced Key vault settings

Implement Azure Security for Developers

Anushika Agarwal

Cloud Data Engineer

Entra ID powers Key vault authentication

  • First step of accessing Key Vault = Authentication
  • Key Vault uses Microsoft Entra ID for authentication

Microsoft Entra ID

Implement Azure Security for Developers

Identity types in Key vault

  • User: A person

User

  • Group: A set of users

Group

  • Service Principal: An app or service identity

Service Principal

Implement Azure Security for Developers

App authentication methods

  • Managed Identity (recommended)
    • No secrets, managed by Azure

Managed Identity

  • App Registration
    • Manual setup, credentials required

App Registration

Implement Azure Security for Developers

Authorization in Key vault

  • After authentication, authorization defines what you can do

  • Azure offers two authorization models - Access Policies and RBAC

Authentication and Authorization in Azure Key Vault

Implement Azure Security for Developers

Access policies (legacy)

  • Control data plane only (inside Key Vault)
  • No control over the management plane or who can manage the vault

Access Policies (Legacy)

Implement Azure Security for Developers

RBAC: Role-Based Access Control (recommended)

  • Controls access to
    • Management Plane: Vault itself
    • Data Plane: Keys, Secrets, Certificates
  • Supports PIM, MFA, Conditional Access

Azure RBAC (Recommended)

Implement Azure Security for Developers

Soft delete

Status quo:

  • Deleted items can cause a major disruption

Soft Delete Enabled:

  • Deleted items enter a recoverable state
  • Protects against accidental or malicious deletion

Soft Delete

Implement Azure Security for Developers

Where soft delete applies?

  • Vault

Azure Key Vault

  • Keys

    Keys

    • Secrets

    Secrets

  • Certificates

Certificates

Implement Azure Security for Developers

Soft delete configuration

  • Retain duration - 7-90 days (default: 90)
  • Enabled by default for new vaults
  • Cannot be turned off once configured

Soft Delete

Implement Azure Security for Developers

Purge protection

  • Purge = permanent deletion with no recovery
  • Blocks purging during retention
  • Even admins can't purge

Purge Protection

Implement Azure Security for Developers

Where purge protection applies?

  • Vault

Azure Key Vault

  • Keys

    Keys

  • Secrets

    Secrets

  • Certificates

Certificates

Implement Azure Security for Developers

Purge protection configuration

  • Configuration
    • Retain duration - 7-90 days (default: 90)
    • Requires Soft Delete to be enabled
    • Cannot be turned off once configured

Purge Protection

Implement Azure Security for Developers

Best practices

  • Design for Isolation

    • Use separate vaults

    Isolation

  • Control Access

    • Access only for trusted users and apps

    Control Access

  • Enable Resilience
    • Turn on backups after updates or deletions
    • Enable Soft Delete and Purge Protection
  • Monitor Activity

    • Enable diagnostic logging and alerts

    Monitor

Implement Azure Security for Developers

Let's practice!

Implement Azure Security for Developers

Preparing Video For Download...