Skip to content
Tech Interview Prep
Technical interview guide

Secrets Management in the Cloud

Using cloud-native secrets services so credentials are never hardcoded, with automatic rotation.

Read
45 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: AWS Secrets Manager, Azure Key Vault, Google Cloud Secret Manager, and OWASP guidance current 2026-09-01.

Curated: · Written: · Reviewed:

25 questions

MCQ-12A secrets manager stores secret versions of up to 64 KB. Each stored record is a payload ciphertext plus a small second blob, and each read costs exactly one KMS call. Which arrangement produces that record layout and call pattern?
MCQ-17A payments team replicates one database credential from us-east-1 to eu-west-1 and ap-southeast-2. Each region holds its own copy, encrypted with a customer-managed KMS key in that region, and each region's IAM policies are managed separately. A penetration test finds that a CI runner in ap-southeast-2, whose role has no permission to read the secret in us-east-1, read the credential's plaintext from the ap-southeast-2 copy. Which explanation fits?
MCQ-8A backup job runs for 25 minutes on a shared Linux host with 30 non-root accounts and /proc mounted with the default hidepid=0. A wrapper script starts it as `backup --token 'tok_9f3a...'`. A monitoring agent running as the non-root user `mon` reads `/proc/*/cmdline` every 5 seconds and ships the contents to a SIEM; the token appears there within a minute. The team edits the wrapper script so the job is started as `TOKEN='tok_9f3a...' backup` instead. Nothing else changes. What happens to the token in the SIEM feed?
MCQ-20A Vault 1.15 cluster writes audit logs to a single file device on a dedicated 100 GB volume; Vault's integrated storage sits on a separate volume with free space. At 02:10 the audit volume reaches 100% full. From 02:10 to 02:50, every client request, reads included, fails with HTTP 500. The active node stays stable throughout, and freeing 5 GB at 02:50 restores normal service with no restart. Which mechanism explains the 500s?
MCQ-16A payments team keeps 60 signing keys in a managed secrets vault. Soft-delete is enabled with a 7-day retention window, and purge protection is on. On day 0 an attacker holding the vault's purge permission deletes all 60 keys and issues purge requests against them. The team's deletion alert fires on day 12, and monitoring changes are frozen this quarter. Which change would have left the keys recoverable when the alert fired?
MCQ-23A reporting service is being retired. Its Postgres password is stored in AWS Secrets Manager as `prod/reporting/db`. An engineer calls DeleteSecret on it; the secret now sits in its default 30-day recovery window. In the six hours after that delete, the Postgres log records three successful logins for role `reporting` from the reporting host's IP. What actually closes this credential's lifecycle?
MCQ-24A platform team rotates the database credential used by 40 service pods through a secrets manager. The rotation job exits 0 and the store shows a new version with a fresh timestamp. Which measurement actually demonstrates that the rotation succeeded?
MCQ-9A payments service reads its database password from Secrets Manager once at process start into a module-level variable and reuses it for the life of the process. Pods run for a median of 30 days and are replaced on a 14-day rolling deploy; normal rotation uses a 48-hour dual-credential window. At 09:00 an operator revokes the leaked password, Secrets Manager immediately issues a replacement under the same secret name, and the database rejects the old password from that moment. What happens to connections the running pods open after 09:00?
MCQ-14A payments service reads its Postgres password from Vault at pod start. At 14:02 that password appeared in a public gist. At 14:10 the team wrote a new password to Vault and rolled the deployment; all 60 pods now authenticate with the new password. At 14:25 Postgres logs show a successful authentication with the old password every ~90 seconds from 10.4.7.22, each followed by one SELECT on payments.card_tokens. 10.4.7.22 sits in the same NAT egress range as the service's own pods. Which single action stops those authentications?
MCQ-15A service-account token for an internal artifact registry was committed to a public repository on Monday at 11:00 and rotated on Thursday at 16:00, after a scanner alert fired on Thursday at 10:00. Registry logs show the token authenticated from the CI runner IP range on Monday at 11:20 and from a single residential IP on Wednesday at 02:00, which downloaded 14 private packages, including `auth-lib`. What does the evidence establish about the incident's scope?
MCQ-1A payments service on EKS reads a static Postgres password from a Kubernetes Secret shared by twelve deployments. The database is RDS, and the cluster's service account is already federated to an IAM role holding rds-db:connect. The team must stop storing a database password anywhere, without taking on a new component to operate. Which change does that?
MCQ-18A payments team's GitHub Actions deploy job assumes the AWS role `prod-secrets-reader` through OIDC and reads `prod/db-password` from Secrets Manager in `us-east-1`. The role's trust policy condition is `token.actions.githubusercontent.com:sub` = `repo:acme/payments:ref:refs/heads/main`. The job works on pushes to `main`. The team adds a `pull_request` trigger so the same job runs for staging, and the staging run fails at `AssumeRoleWithWebIdentity` with `AccessDenied`. What is the cause?
MCQ-7A GCP project holds 20 secrets. Five services each run as a dedicated service account, and each service account is granted `roles/secretmanager.secretAccessor` on the two secrets that service reads. All five service accounts are also members of the Google Group `platform-runtimes@example.com`, which was granted `roles/secretmanager.secretAccessor` at the project level during an earlier migration and never removed. A pod running as `svc-billing` is compromised and the attacker extracts its token. How many of the project's 20 secrets can the attacker read?
MCQ-6A team runs one HashiCorp Vault cluster with the KV v2 engine mounted at `secret/`. Two AppRoles exist: the CI runner's, bound to `ci-policy` (`read` on `secret/data/ci/*`), and the production checkout service's, bound to `prod-policy` (`read` on `secret/data/prod/*`). The CI runners execute untrusted pull-request builds. To let the release pipeline fetch production credentials without a second AppRole, an engineer stored `deploy-token`, a Vault token with `prod-policy` attached, at `secret/data/ci/deploy-token`. Last week a compromised CI job read that path and used the token to pull the production database credentials. Which change closes the CI job's path to production secrets?
MCQ-19A Kubernetes payments service loads its DB password from a Secret via envFrom.secretRef and holds long-lived pool connections. Security now rotates the password hourly in the Secret object, and the new value must be in use within 5 minutes of the write, with no pod restarts: a restart drops in-flight payment connections. Which change meets both constraints?
MCQ-2A payments platform keeps a secret inventory that records, per secret: target, consumers, owner, last rotation timestamp, and delivery mode. At 10:00 a rotation job rewrites SERVICE_TOKEN (delivery: boot-env, injected into each pod's environment at start; consumers: 12 checkout-api pods) and DB_CREDS (delivery: lease-fetch, requested from the secret store per connection with a 1-hour TTL; consumers: 4 settlement-worker pods). The store revokes the previous value of both secrets at 10:00. By 10:05 all 12 checkout-api pods get 401 on every outbound call, while settlement-worker logs no errors. Which action restores checkout-api with the least disruption?
MCQ-3checkout-api reads its Stripe secret key from config/production.yaml, which the Dockerfile COPYs into the image at build time; the deployment mounts nothing over that path and sets no variable the app reads. - 09:14 - commit 9f3c1d2 adds the key to config/production.yaml on main. - 09:22 - CI build #812 pushes image checkout-api:1.8.3, tagged with 9f3c1d2, to the internal registry. - 09:31 - commit b2f0e11 deletes that line; main is force-pushed so no ref reaches 9f3c1d2, the repo's 4 forks are deleted, and build #812's test artifact is purged. - 10:05 - the key is rolled in Stripe; the new value becomes secret-manager version 7. - 10:07 - the deploy restarts pods on checkout-api:1.8.3 and sets STRIPE_SECRET_KEY to version 7. The oldest running pod started at 10:07. Every charge then fails with 401 invalid API key. Which single fact explains the failures?
MCQ-10A payments service runs 60 pods. Each pod reads its database password from Vault at startup and re-reads it every 15 minutes; a rolling deploy takes 12 minutes and pods live about 6 hours on average. The team writes a new password version to Vault and wants to revoke the old one as soon as it is safe, without waiting longer than necessary. Which wait should they use?
MCQ-11A payments service runs 300 pods. Each pod reads its database credential from the secret store once at startup and caches it for the life of the process; pods are replaced on a rolling schedule, so a typical pod lives about 8 hours. The rotation job writes the new credential and revokes the old one in the same step. Within a minute of each rotation, roughly 40% of pods start failing authentication until they are replaced. The secret store allows 100 reads per second, and the service opens about 50,000 connections per second. What should the rotation job do?
MCQ-13A payments service reads its database credential once at process start and caches it for the life of the process: it never re-reads. It fetches the secret by ARN with no version stage, so each fetch returns whatever version is current at that moment. Instances are recycled on a rolling basis, so at any moment process ages are spread uniformly from 0 to 6 days. The credential is rotated every 6 days, and the secret manager disables the previous version exactly 2 days after each rotation. At the instant the grace window closes after a rotation, roughly what fraction of the running fleet holds a credential that no longer authenticates?
MCQ-25Checkout runs 40 pods, and each pod reads its Postgres credential from Vault at startup. The credential is a 1-hour dynamic lease that Vault invalidates at the database on expiry, and policy caps credential age at 60 minutes: it must be unusable no later than 60 minutes after issue, whether or not anyone revokes it earlier. Last month a network partition left all three Vault nodes unreachable for 25 minutes. Pods that restarted in that window exited with code 1, stayed in CrashLoopBackOff, and checkout ran at 70% capacity, though every pod that kept running held a credential still inside its cap. Which change keeps the age cap and stops a container restart during such an outage from taking the pod out of service?
MCQ-5A payments team puts its secret manager behind a private endpoint so that only clients in VPC 10.0.0.0/16 can reach the API, and it closes the public endpoint. Two weeks later, a compromised EC2 instance inside that VPC, running with an instance role that still carries the old `secrets:*` policy, reads 4,000 database credentials over six hours. Every request in the private-endpoint logs originates from inside the VPC. Which conclusion does the incident support?
MCQ-4A payments service runs 200 pods across three clusters, each service under its own Kubernetes service account. Every pod reads its database password from a secret manager at startup, authenticating with a static AppRole secret ID baked into the container image. Rotating that ID means rebuilding and redeploying all 200 pods. Security now requires that no credential stored at rest stays valid for more than an hour, that a pod can read only its own service's secrets, and that rotation needs no redeploy. The clusters run an OIDC issuer the secret manager can be configured to trust. Which change meets all three requirements?
MCQ-21A Vault alert fires on secret/data/db/prod: 240 successful reads in 8 minutes against a 30-day baseline of about 5 reads a day. Every entry resolves to the entity alias of the payments-api service account. 236 reads come from 10.4.2.31, the payments-api pod IP on the cluster's 10.4.0.0/16 pod network, over a token accessor the pod has held since 09:11. The other 4 come from 203.0.113.77 over a second accessor first seen at 14:02. Nothing about the workload was deployed or restarted. Which conclusion does the evidence support?
MCQ-22A Vault cluster holds 1,600 secrets in a KV v2 mount named kv/. The file audit device has run on every node with no gap for the last 200 days. A query matching each secret name N against reads of kv/data/N returns 214 secrets with no read request in that window. 88 of the 214 sit under kv/dr/ and are granted only to the failover role; the annual DR exercise reads them, last ran 255 days ago, and is next scheduled in 110 days. The other 126 sit under kv/svc/; their owner tags name services shut down eight months ago, those services' AppRoles were revoked at shutdown, and no remaining role's policy grants read on a kv/svc/ path. Retirement policy: a secret may be destroyed after 180 read-free days behind complete telemetry once its consumers are accounted for. Which action fits this data?