Secrets Management and Key Vault Interview Questions
261 multiple-choice tech interview questions on Secrets Management and Key Vault: secrets vs keys vs certificates, Azure Key Vault, AWS Secrets Manager and KMS, rotation, envelope encryption, avoiding leaks. Written for technical phone screens and interview prep, organized by subtopic, with a short explanation for every answer. Learn the 240 key terms with the flashcards first, then test yourself.
Take the practice test · Flashcards · All study tools
What it covers
- 12.1 Secrets fundamentals
- 12.2 Azure Key Vault essentials
- 12.3 Using Key Vault from apps and services
- 12.4 Cryptography and key management
- 12.5 AWS and Google Cloud secret services
- 12.6 HashiCorp Vault and dynamic secrets
- 12.7 Kubernetes and GitOps secrets
- 12.8 Secret leaks: detection and response
- 12.9 Rotation, access and certificates
Key terms
12.1 Secrets fundamentals
- Secret
- A value that grants access, such as a password, API key or token
- Secret zero
- The initial credential needed to reach a secret store
- Secret vs config
- Sensitive values versus ordinary settings
- Secret sprawl
- Uncontrolled spread of secret copies
- Secrets manager
- Central service for storing and controlling secrets
- Dynamic secrets
- Credentials generated per request with a short lease
- .env files
- Local files holding environment variables
- Secrets in arguments
- Passing secrets on the command line
- Per-app credentials
- Separate secrets for each workload
- Per-environment secrets
- Separate secrets for each environment
- Non-human identities
- Credentials used by services, bots and agents
- Secret classification
- Ranking secrets by impact if leaked
- Break-glass account
- Emergency access account
- Password vs secrets manager
- Tools for human versus machine secrets
- Secret sharing
- Passing secrets between people
- Hard-coded credentials
- Secrets embedded in source code
- SecureString
- .NET type once meant to protect strings in memory
- Default credentials
- Factory-set usernames and passwords
- Secret access audit
- Logging who read each secret
- Secret inventory
- List of secrets, owners and consumers
- Shell history
- Saved record of typed commands
- OS credential stores
- Platform services for local secret storage
- Secret references
- Pointers to secrets instead of values
- Telemetry scrubbing
- Removing secrets from traces and logs
- Secret expiry
- A date after which a secret is invalid
12.2 Azure Key Vault essentials
- Azure Key Vault
- Azure service for secrets, keys and certificates
- Key Vault reference
- An app setting that App Service resolves from Key Vault
- Purge protection
- Key Vault setting that blocks permanent deletion during retention
- Key Vault tiers
- Standard (software keys) and Premium (HSM keys)
- Soft-delete retention
- How long deleted items can be recovered
- Mandatory soft delete
- Soft delete enforced on all vaults
- Vault name reservation
- Names held by soft-deleted vaults
- Key Vault Secrets Officer
- Role for managing secrets in a vault
- Key Vault Reader
- Metadata-only access to a vault
- Access policy escalation
- Contributors editing access policies
- Object-level RBAC
- Role assignments on single vault objects
- Secret versions
- Each update creates a version
- Secret size limit
- Max secret value size
- Key Vault throttling
- Service limits on vault operations
- ForbiddenByFirewall
- Key Vault error when network rules block a caller
- Key Vault diagnostics
- Audit logs of vault operations
- Key Vault events
- Event Grid notifications for vault objects
- Key Vault policies
- Azure Policy rules for vault settings
- Vault per app
- Separating vaults by app and environment
- Key Vault backup
- Encrypted export of an object
- Key Vault resiliency
- Built-in replication and failover behavior
- az keyvault secret set
- CLI command to store a secret
- Vault URI
- DNS name used to reach a vault
- Disabled version
- A secret version that can't be read
- Recover secret
- Undoing a soft delete
12.3 Using Key Vault from apps and services
- AddAzureKeyVault
- Key Vault configuration provider for .NET
- Secret name mapping
- `--` in names becomes `:` in config
- DefaultAzureCredential
- Chained credential for Azure SDKs
- Specific credentials
- Using one credential type in production
- SecretClient
- Azure SDK client for Key Vault secrets
- Python Key Vault SDK
- Packages for reading vault secrets
- Reload interval
- Periodic refresh of Key Vault config
- Versionless reference
- Pointing at a secret's latest version
- Reference refresh
- When versionless references update
- keyVaultReferenceIdentity
- Identity used for resolving references
- Reference syntax
- Ways to write Key Vault references
- Container Apps secrets
- App secrets backed by Key Vault references
- App Configuration references
- Pointers to Key Vault secrets in App Configuration
- Local development
- Developer access to dev secrets
- Fail fast
- Stopping when required secrets are missing
- Passwordless SQL
- Entra-based database auth via managed identity
- Certificate private key
- Exposed through the matching secret
- Spring Cloud Azure
- Spring integration for Azure services
- Vault URI setting
- Environment config naming the vault
- Dapr secrets
- Building block for reading secret stores
- Secure inputs/outputs
- Hiding action data in Logic Apps runs
- ADF Key Vault link
- Linked services pulling secrets from Key Vault
- SDK retries
- Built-in retry policy in Azure SDKs
- Inline app settings
- Secret values stored directly in config
- Reference status
- Portal view of reference resolution
- VNet integration
- Letting App Service reach private resources
12.4 Cryptography and key management
- Envelope encryption
- Encrypting data with a DEK that is itself encrypted by a KEK
- KMS
- Key management service for creating and controlling encryption keys
- Dynamic secret
- A short-lived credential generated on demand
- Symmetric vs asymmetric
- One shared key versus a key pair
- Hybrid encryption
- Public-key wrap of a symmetric data key
- Wrapped DEK
- Data key encrypted by a KEK and stored with data
- Key operations
- Crypto operations done inside Key Vault
- Key types
- RSA, EC and HSM variants in Key Vault
- Key rotation policy
- Automatic key version creation
- Key versions
- Older key versions kept for decryption
- Automatic key version update
- Services following the latest key version
- Crypto Service Encryption User
- Role for services using customer keys
- CMK dependency
- Data unreadable without its customer key
- Azure Disk Encryption retirement
- ADE ending in favor of encryption at host
- Secure key release
- Policy-gated key export to attested TEEs
- Key sizes
- Minimum lengths for secure keys
- Post-quantum cryptography
- Algorithms resistant to quantum attacks
- Elliptic curve signing
- ECDSA keys like P-256
- Key separation of duties
- Distinct admin and user roles for keys
- RSA-OAEP
- Modern padding for RSA encryption
- Remote signing
- Signing inside the vault or HSM
- Authenticated encryption
- Encryption that also verifies integrity
- Key hierarchy
- Layered keys from root to data keys
- HKDF
- HMAC-based key derivation function
- Cryptoperiod
- Approved usage lifetime of a key
- Security domain
- Encrypted blob needed to restore a Managed HSM
- Data key caching
- Reusing a data key for a short time
- Managed HSM local RBAC
- Data-plane roles within the HSM
12.5 AWS and Google Cloud secret services
- Secrets Lambda extension
- Local cache for Secrets Manager and Parameter Store
- Staging labels
- Version labels used during rotation
- Rotation steps
- Phases of a rotation Lambda
- Alternating users
- Rotating between two database users
- BlockPublicPolicy
- Guard against overly open secret policies
- Replica secrets
- Copies of a secret in other regions
- Cross-account secrets
- Sharing secrets between accounts
- Recovery window
- Time a deleted secret can be restored
- Secret size
- Max Secrets Manager value size
- Parameter hierarchy
- Path-based parameter names
- Advanced parameters
- Higher-limit Parameter Store tier
- Parameter Store references
- Reading Secrets Manager through SSM
- ECS secrets
- Injecting secrets into containers at start
- Rotation-aware caching
- Refreshing cached secrets after rotation
- Secret access trail
- CloudTrail records of secret reads
- Secret versions (GCP)
- Numbered versions with aliases
- secretAccessor
- Role to access secret payloads
- Cloud Run secrets
- Exposing secrets to Cloud Run containers
- Replication policy
- Where secret payloads are stored
- Rotation notifications
- Scheduled messages prompting rotation
- Regional secrets
- Secrets stored and served in one region
- Autokey
- Automated CMEK key provisioning
- KMS protection levels
- Where Cloud KMS keys are held
- Secret expiration
- Automatic deletion time for a secret
- Disable vs destroy
- Reversible versus permanent version removal
- ABAC for secrets
- Tag-based access conditions
- GetRandomPassword
- API for generating random passwords
12.6 HashiCorp Vault and dynamic secrets
- OpenBao
- Community fork of HashiCorp Vault
- Seal and unseal
- Vault's locked state until its root key is rebuilt
- Auto-unseal
- Unsealing via a trusted KMS or HSM
- Secrets engine
- Component mounted at a path to handle secrets
- KV v2
- Versioned key/value secrets engine
- vault kv put
- CLI command to write KV secrets
- Database secrets engine
- Dynamic database credentials
- Lease
- Time-bound validity of a secret
- Prefix revocation
- Revoking all leases under a path
- Transit engine
- Encrypt and decrypt via API without exposing keys
- Transit rewrap
- Re-encrypting ciphertext with the newest key
- PKI engine
- Vault as a certificate authority
- AWS secrets engine
- Dynamic AWS IAM credentials
- Auth methods
- Mechanisms clients use to log in to Vault
- AppRole
- Machine auth with role ID and secret ID
- Response wrapping
- Single-use token holding a secret
- Vault policy
- HCL rules of path capabilities
- Root token
- Token with full Vault access
- Audit devices
- Logs of all Vault requests
- Vault Agent
- Client daemon for auto-auth and templating
- Integrated storage
- Raft-based storage built into Vault
- Vault namespaces
- Multi-tenant isolation within Vault
- Identity entities
- A single identity with aliases per auth method
- KV destroy vs delete
- Permanent versus soft removal in KV v2
- Vault JWT auth
- Logging in with an OIDC token from CI
- Token accessor
- Handle for managing a token
- Batch tokens
- Lightweight, non-persisted Vault tokens
- Vault alternatives
- Hosted secrets managers
12.7 Kubernetes and GitOps secrets
- Secret types
- Built-in Kubernetes Secret kinds
- kubectl create secret
- Imperative Secret creation
- stringData
- Plain-text input field for Secrets
- Secret update propagation
- How changes reach pods
- subPath limitation
- subPath mounts stay at the original value
- etcd encryption at rest
- Encrypting API resources in etcd
- Secret RBAC
- Permissions on Secret objects
- Pod creation risk
- Mounting Secrets through new pods
- Immutable Secrets
- Secrets that can't be edited after creation
- imagePullSecrets
- Registry credentials for pulling images
- Bound service account tokens
- Projected, expiring tokens for pods
- Secrets Store CSI Driver
- Volume driver for external secret stores
- Key Vault CSI provider
- AKS add-on for Key Vault secrets
- CSI rotation
- Polling external stores for new values
- External Secrets Operator
- Controller syncing outside secrets into Secrets
- ClusterSecretStore
- Cluster-wide store definition
- Sealed Secrets
- Public-key encrypted Secrets for Git
- Sealing scope
- What a sealed secret is bound to
- SOPS
- Tool for encrypting values in config files
- SOPS backends
- Key sources for SOPS encryption
- Helm secrets
- Handling passwords with Helm charts
- Argo CD secrets guidance
- Prefer in-cluster secret operators
- Vault on Kubernetes
- Injector sidecar or VSO operator
- etcd backups
- Snapshots of cluster state
- Viewing Secrets
- How kubectl exposes Secret data
- Secret volumes
- In-memory storage for mounted Secrets
- Namespace scope
- Secrets visible only in their namespace
- Compose secrets
- File-based secrets for Compose services
12.8 Secret leaks: detection and response
- Secret rotation
- Replacing a secret with a new value on a schedule or after exposure
- Push protection
- Blocking commits that contain detected secrets
- Pre-commit scanning
- Checking staged changes for secrets locally
- Secret verification
- Checking whether a found secret still works
- Partner program
- Providers alerted about their leaked tokens
- Compromised key quarantine
- AWS-managed policy limiting leaked keys
- History rewrite
- Removing data from Git history
- Image layer leaks
- Secrets persisting in earlier layers
- Leak sources
- Places outside code where secrets spread
- Custom patterns
- User-defined secret detection rules
- Token prefixes
- Recognizable starts for credential formats
- AI secret detection
- Machine learning for unstructured secrets
- Post-leak review
- Checking logs for use of a leaked secret
- Time to exploit
- Speed attackers use leaked keys
- Debug endpoint leaks
- Diagnostic routes exposing config
- Secret Protection for Azure DevOps
- GitHub's secret scanning in Azure Repos
- GitHub Secret Protection
- Paid secret scanning for private repos
- Delegated bypass
- Approval flow for push protection bypasses
- Scan scope
- Places secret scanning covers
- False positives
- Non-secrets flagged by scanners
- Notebook leaks
- Secrets in saved notebook outputs
- Leak studies
- Research on secret sprawl in public code
- git log -S
- Pickaxe search through history
- Leaked TLS key
- Compromised certificate private key
- Exposure is permanent
- Leaked data can't be recalled
- Webhook URLs
- URLs that embed credentials
- Rotate anyway
- Rotating secrets even behind other controls
12.9 Rotation, access and certificates
- Automated rotation
- Scripts or services that rotate secrets
- Event-driven rotation
- Rotation triggered by vault events
- Client secret lifetime
- Max validity of Entra app secrets
- App management policies
- Tenant rules for app credentials
- Group-based access
- Granting vault roles via groups
- Certificate credentials
- App auth with a key pair instead of a secret
- Certificate auto-renewal
- Key Vault renewing via an integrated CA
- CSR merge
- Completing a certificate from an outside CA
- Secret retirement
- Phasing out an old credential
- Out-of-cycle rotation
- Rotating at once after risk events
- cert-manager
- Kubernetes controller for certificates
- App Service managed certificates
- Free auto-renewing certs
- Certificate sync
- App Service refresh of Key Vault certs
- Certificate pinning
- Hard-coding expected certs or keys in clients
- Rotation drills
- Practicing secret rotation
- RDS IAM auth tokens
- Short-lived database login tokens
- SSH certificates
- CA-signed, expiring SSH credentials
- Offboarding rotation
- Rotating secrets known by leavers
- Signature timestamping
- Trusted time on code signatures
- Wildcard certificates
- Certs covering all subdomains
- Key reuse on renewal
- Whether renewals keep the old private key
- Certificate contacts
- Vault-level emails for certificate notices
- PFX vs PEM
- Certificate file formats
- Break-glass rotation
- Resetting emergency credentials after use
- Expired client secret
- Sign-in failure from an expired app secret
- Unrotatable keys
- Static keys from limited providers
Sample practice questions
Which of these is a secret that should never be stored in source control?
- The URL of a public, documented API endpoint
- The name of a feature flag used in the app
- The application's current version number
- A connection string with a password in it
Answer: D. A connection string with a password in it Anything that grants access, such as passwords, API keys, tokens and private keys, is a secret.
What three kinds of objects does Azure Key Vault manage?
- Users, groups and roles
- Secrets, keys and certificates
- Blobs, tables and queues
- VMs, disks and networks
Answer: B. Secrets, keys and certificates Secrets are arbitrary values; keys are cryptographic keys used inside the vault; certificates combine keys with X.509 metadata and renewal.
An App Service app uses `@Microsoft.KeyVault(SecretUri=...)` in an app setting. What does this do?
- It copies the secret's value into source control for the app
- App Service fetches it from Key Vault with the app's managed identity
- It encrypts the setting's value with a password the app supplies
- It disables the app setting until an admin approves it
Answer: B. App Service fetches it from Key Vault with the app's managed identity Key Vault references work in App Service, Functions and Container Apps.
What is envelope encryption?
- Data is encrypted with a DEK, and the DEK with a KEK in a vault
- Encrypting the envelopes of email messages before they're sent
- Encrypting the same data twice in a row with the very same key
- Compressing the data first and then encrypting the smaller result
Answer: A. Data is encrypted with a DEK, and the DEK with a KEK in a vault Only the small DEK goes to the KMS, so large data can be encrypted locally and keys rotated cheaply.
Which AWS service stores secrets such as database credentials and can rotate them automatically using a Lambda function?
- AWS Systems Manager Run Command
- Amazon S3
- AWS Certificate Manager
- AWS Secrets Manager
Answer: D. AWS Secrets Manager Systems Manager Parameter Store (SecureString) is a lower-cost option without built-in rotation.
What is HashiCorp Vault known for besides storing static secrets?
- Hosting Kubernetes clusters for production workloads
- Building container images from source code
- Dynamic, short-lived secrets, like expiring DB credentials
- Running CI pipelines on self-hosted agents
Answer: C. Dynamic, short-lived secrets, like expiring DB credentials Dynamic secrets limit the damage if a credential leaks. OpenBao is an open-source fork of Vault.
How do Kubernetes workloads commonly read secrets from Azure Key Vault or AWS Secrets Manager?
- Via the Secrets Store CSI Driver or External Secrets, with workload identity
- By mounting the vault's administrator password into every pod in the cluster
- By copying the secrets into the container image when it's built
- They can't; Kubernetes is unable to use any external secret vaults
Answer: A. Via the Secrets Store CSI Driver or External Secrets, with workload identity Secrets are mounted as files or synced to Kubernetes Secrets.
A developer accidentally commits an API key to a public GitHub repository and deletes it in the next commit. What should happen?
- Revoke and rotate it now; it's still in history and may be scraped
- Nothing more; deleting it in the next commit removes it completely
- Make the repository private and keep using the same key as before
- Force-push to remove the commit and then keep using the same key
Answer: A. Revoke and rotate it now; it's still in history and may be scraped Bots scan public repositories for secrets within minutes. Rotation is the only safe fix; history rewriting is optional cleanup.
What is the safest way to give a contractor temporary access to a production database?
- Share the application's own admin password with the contractor
- A named, time-limited or just-in-time account, audited and removed after
- Email the contractor the connection string, password included
- Create a dedicated account for them that never expires
Answer: B. A named, time-limited or just-in-time account, audited and removed after Shared credentials make it impossible to know who did what and are rarely rotated.
Why are environment variables alone not a complete secrets solution?
- Environment variables can only hold numbers, never string values
- Applications aren't able to read environment variables at runtime
- They leak via logs and dumps, with no rotation, auditing or access control
- They're encrypted by default, but decrypting them is far too slow
Answer: C. They leak via logs and dumps, with no rotation, auditing or access control A vault provides access control, auditing, versioning and rotation; environment variables can still carry references or short-lived values.
More Cloud and DevOps
- Cloud Fundamentals: IaaS, PaaS, SaaS and Shared Responsibility
- Azure Core Services
- AWS Core Services
- Google Cloud Basics
- Serverless: Azure Functions and AWS Lambda
- Containers and Docker
- Kubernetes
- Infrastructure as Code: Terraform and Bicep
- CI/CD Pipelines: GitHub Actions and Azure DevOps
- Networking: DNS, TCP/IP, Load Balancers and VPNs
- Cloud Identity and Access: Entra ID, IAM and RBAC
- Monitoring and Alerting: Application Insights and CloudWatch
- Cloud Cost Management