Skip to content

Azure Service Bus Key Rotation GuideΒΆ

This guide outlines the manual process of rotating the keys for Azure Service Bus used in our infrastructure.
πŸ”’ Note: There is currently no automation or script available for this task β€” it must be done manually.


πŸ” Key Rotation StepsΒΆ

Follow these steps carefully to rotate the Azure Service Bus keys without service disruption:

  1. Check Current Key Usage

    • In the global Key Vault, identify which key is currently being used:
      Primary Key or Secondary Key.
  2. Regenerate the Unused Key

    • Go to the Azure Portal.
    • Navigate to the relevant Azure Service Bus namespace.
    • Regenerate the key that is not currently in use (either Primary or Secondary).
  3. Update Key Vault Secrets

    • Replace the corresponding key values in Azure Key Vault.
  4. Restart All Application Pods

    • Restrt pod from one service to test if it can connect to service bus
    • Restart all pods to ensure they pick up the updated credentials from Key Vault.

⚠️ Important Notes¢

  • ❌ Do not regenerate the key currently in use.
  • βœ… Always confirm the active key before regenerating the other.
  • πŸ›  This is a manual operation and requires careful handling.