A transit agency's API key was copied from a public repository and used to download rider location history. The key string has been deleted from that file. Which redesign follows?
Select an answer to reveal the explanation.
Short Explanation
Swapping a lock does little if you leave the new key under the same public mat. You put the transit secrets in a vault, scope them, and keep them out of the repository. A fresh key in the same public file, a backup that still holds the old key, or guest wireless at the stations misses the leak.
Full Explanation
The download succeeded because a usable key lived in a public file. Deleting that string removes one copy and leaves the next build with the same habit. The redesign puts scoped secrets in a vault, rotates them, and makes the repository a place that does not hold keys, while a replacement key in the same file, a backup that still has the old key, and guest wireless leave that design in place. Keep scoped, rotating secrets in a vault and stop the repository from holding API keys at all is the design that meets this requirement. Paste a fresh API key into the same public repository and watch the file more often is the wrong fit because a new key sitting in the same public file repeats the exposure that allowed the location download. Restore last night's repository backup that still contains the original API key is the wrong fit because restoring that backup puts the stolen key back onto the public path the attacker already used. Add guest wireless at the stations, a network that was not the source of the key is the wrong fit because station guest wireless did not store the key and did not serve the rider location history download. Exam caveat: Rotating the stolen key is still required so the copy the attacker already has stops working, and rotation without the vault leaves the next key in the file. Operational check: Scan a lab copy of the repository for key material and confirm the build fetches a scoped secret from the vault rather than from the file itself.