cswork / libraryOpen practice workspace

Articles

Azure Key Vault Interview Questions: RBAC, Network Access, and Rotation

Practice Azure Key Vault interview questions on data-plane RBAC, private endpoints, secret versions, dual-credential rotation, and safe rollback.

An Azure Key Vault interview answer should distinguish four questions: who authenticated, whether that principal can perform the requested data operation, whether the client's network path is admitted, and whether the application is using the intended credential version. A successful token request or a visible vault in the portal settles only part of that investigation.

This guide uses Microsoft documentation for service behavior and original diagnostic and rotation exercises for practice. It does not assert a company-specific interview sequence.

Why can a vault administrator fail to read a secret?

Key Vault has a control plane for managing the vault and a data plane for operating on keys, secrets, and certificates. Those authorization boundaries are independent. The Key Vault Contributor role manages the vault but does not grant access to secret values. Microsoft Key Vault RBAC guide

For an original case, a deployment engineer creates a vault successfully and then the application receives 403 while reading db-password. First identify the application's principal; it may differ from the deployment principal. Next inspect the vault's permission model and the data operation the application actually performs.

Under the RBAC model, a secrets consumer needs an appropriate data role, such as Key Vault Secrets User, at a justified scope. A role that reads object metadata does not necessarily read secret contents. Do not propose an administrator role merely because it makes the immediate request succeed.

The legacy access-policy model adds a different configuration path. A control-plane user able to change access policies can create data-plane access through those policies. Explain that privilege implication rather than claiming that every Contributor assignment always provides secret-read permission.

Which identity should you investigate first?

Find the principal used by the failing process in its failing environment. A developer's interactive login, a system-assigned managed identity, a user-assigned identity, and a deployment service principal can all produce different results against the same vault. Compare the actual identity with the role assignment rather than its display name alone.

Record tenant, principal identifier, target vault, requested operation, timestamp, and request correlation information. Keep bearer tokens and secret values out of diagnostic logs. If inspecting claims locally, do it through controlled tooling and retain only the non-secret evidence needed for diagnosis.

In our original exercise, the laptop succeeds because its developer account has data access. The deployed worker authenticates correctly as a different managed identity that has no secret-read role. Copying the laptop's credential into production would bypass the intended identity design instead of fixing it.

Also identify the token destination. A credential obtained for an unrelated API does not establish access to Key Vault's data endpoint. The smallest justified correction follows from the failed boundary: identity selection, token destination, assignment scope, or network configuration.

How do you separate authorization from network denial?

A status code is a starting point, not the full diagnosis. A 403 can reflect a data permission problem or network admission. Capture the structured error and context. A timeout can reflect connectivity, while a downstream login failure after successful secret retrieval belongs to a different service.

The following original matrix keeps the evidence and correction paired. It describes a troubleshooting order, not the service's internal request-processing sequence.

ObservationEvidence and justified correction
Authentication fails before a vault requestInspect credential source, tenant, token destination. Select the intended credential and destination.
Vault denies the data operationInspect principal, permission model, data role, scope. Grant the required operation at the intended scope.
Firewall denial or unreachable endpointInspect structured error, runtime DNS, route, endpoint state. Repair the intended network path.
Vault read succeeds but database login failsInspect retrieved version, consumer cache, database credential state. Reconcile the downstream credential rollout.

Microsoft's access troubleshooting guide distinguishes authentication, access configuration, and firewall issues. Use those categories to build an investigation rather than applying one permission change to every error. Key Vault access troubleshooting

After a role change, verify behavior using the application's identity and runtime path. Allow for propagation and distinguish a stale observation from a failed correction. A portal check under an administrator account cannot stand in for that readback.

What does a private endpoint provide?

A private endpoint supplies a private network path to the vault. It does not authenticate the workload or grant a secret-read role. The client still needs the appropriate identity and authorization. Conversely, a correct data role does not create the route or DNS resolution required by the intended private path.

Test name resolution from the application environment. A private-link alias in a DNS chain does not alone prove that the final address is the expected private endpoint. Check the final resolved address, endpoint approval and provisioning state, and reachability from the client's network. Microsoft private-link diagnostics

An original deployment case has a working VM but a failing hosted runner. Both use valid identities, yet only the VM is connected to the intended private network. Adding more secret permissions to the runner leaves the actual failure unchanged.

Do not use a raw IP address as a casual replacement for the vault hostname. DNS and the hostname used by the HTTPS client are part of the endpoint contract. Repair the private DNS and connectivity design while preserving the expected service endpoint.

Does trusted-service bypass cover every Azure workload?

No. Microsoft's trusted-services list covers specific services and scenarios, not all applications hosted somewhere in Azure. The network security documentation explicitly identifies limits to the bypass and lists Azure DevOps as an example that is not broadly covered. Key Vault network security

For an interview case involving a managed product, check that product's integration documentation. A customer-controlled worker running in a VNet and a Microsoft-managed service retrieving a key for encryption can take different paths. The word “Azure” does not make those access designs interchangeable.

Also inspect the actual public-network policy. Creating a private endpoint does not by itself prove that public access is disabled. If the requirement is private-only access, verify both the allowed path and rejection from the disallowed path, accounting for the service's documented exceptions.

Avoid an unexplained “temporarily allow all networks” fix. A useful diagnosis predicts which specific change should restore the intended request and which requests must continue failing. That prediction becomes the acceptance test for the repair.

What exactly is being rotated?

Distinguish a cryptographic key version, a certificate lifecycle, and a stored secret value. They have different consumers and rotation mechanisms. Configuring key auto-rotation does not automatically update an arbitrary database password stored as a secret.

Microsoft's key rotation documentation describes creating a new key version and the role of versionless references for consumers that support them. Existing encrypted material can still require older key versions. A rotation plan therefore needs consumer compatibility and retention decisions, not just a schedule. Cryptographic key rotation

For a password, two systems must agree: the destination service that accepts the credential and Key Vault that stores it. Updating only the vault can distribute a value the database rejects. Updating only the database can strand clients still using the old value.

A secret's metadata and its downstream usability are separate facts. Expiration metadata is not evidence that every external service revoked the credential. Likewise, enabling a new vault version does not prove every running consumer fetched it. About Key Vault secrets

How would you design a dual-credential cutover?

Assume, for this original exercise, that the downstream service supports two concurrently valid credentials, A and B. The application currently uses A. The goal is to move consumers to B and then revoke A with evidence that the transition succeeded.

Microsoft provides a rotation tutorial for resources with two credential sets. That is a concrete service pattern, not a guarantee that every database supports overlapping credentials. Confirm the destination's capabilities before choosing the rollout. Dual-credential rotation tutorial

Phase in the original rolloutRequired observation
Prepare B at the destinationB authenticates in a controlled check; A remains usable.
Publish B as a new secret versionA vault read returns the intended version metadata.
Refresh a small consumer cohortNew connections succeed using B.
Complete consumer adoptionRemaining instances and cached clients have a defined version state.
Revoke ANew authentication with A fails; supported consumers keep working.

The overlap window is a contract about consumer refresh and connection behavior. Derive it from the longest supported cache lifetime, rollout progress, and downstream session semantics. Do not invent a universal duration or assume a process restart is the only refresh mechanism.

Existing sessions can complicate the proof. A healthy connection pool may continue serving requests without demonstrating that newly opened connections use B. Include a controlled fresh-connection check and a version adoption signal that never exposes the credential value.

When is rollback safe, and when is it misleading?

Before revoking A, a failed B rollout may allow a controlled return to A if A remains valid and uncompromised. After revocation, switching a pointer back to the old vault version does not restore its validity at the destination. Rollback must describe both systems' states.

If A was leaked, extending its acceptance to simplify rollback can conflict with the incident goal. Prefer restoring application availability with a valid replacement credential and correcting the failed consumer rollout. Separate routine rotation from emergency compromise response.

Our original stop condition is any increase in fresh-connection authentication failures during the initial cohort, combined with evidence that the intended version was loaded. Stop expansion, diagnose the credential state, and preserve the currently valid path while the cause is resolved.

A rotation controller should tolerate repeated delivery of the same trigger. Record a rotation operation identifier, distinguish preparation from publication, and avoid repeatedly invalidating credentials because a callback retried. The exact implementation depends on the destination; the invariant is an auditable transition rather than an unexplained sequence of writes.

How do caching and throttling change the answer?

Fetching every secret for every request makes the vault a hot dependency and can contribute to throttling. Microsoft recommends caching and appropriate retry behavior. A cache should have an explicit refresh policy that still permits the required rotation and incident response. Key Vault throttling guidance

An original service can refresh in the background, adopt a validated new version atomically, and retain the previous valid configuration while a transient read fails. That is a design choice, not permission to serve revoked credentials indefinitely. Name the maximum stale interval and the failure behavior required by the application.

Treat access denial differently from a transient service error. Repeating a denied request indefinitely with exponential delays will not create authorization. Collect enough evidence to locate the boundary and stop the retry storm while the configuration is corrected.

Sources and Further Reading

Documentation checked September 30, 2026. Verify the active permission model, network policy, and downstream credential capabilities in the environment you discuss.