Doppler's secret rotation feature aims to automate the process of rotating third-party service tokens and database credentials to improve security posture. The feature is designed to be safe, atomic, and reliable, with requirements including encryption and storage of rotation state data, atomic operations, graceful error handling, and no public access to sensitive information. Doppler uses a unique two-secret strategy, where two valid credentials are maintained for each secret, one active and one inactive, which are updated or replaced with new ones at regular intervals. The feature also supports different types of rotation, including updater and issuer rotations, and stores rotation state as tokenized JSON strings. To ensure reliability, Doppler uses a two-phase commit system to update the credentials in a database, and automatically retries errors with exponential backoff.