Skip to main content
Aurikle

AI and systems

How to rotate secrets and settings for custom software

When custom software is already in production, rotating a secret or a setting starts from an inventory that does not hold the secret value, and states the overlap, who approves the cutover, and how to confirm the old value has been retired. The audit log says who signed in, exported, approved, or changed a setting. Scope change says who may accept a change to the spec. The runbook says who answers the page. This note says how the secret or the setting itself is replaced.

On this page

Matching serviceCustom software, websites, and applications

Keep rotation apart from the audit log, scope change, and the runbook

The operations audit log is the line left by a sign-in, an export, an approval, or a change of settings, and it says who may read it and how long it is kept. Scope change says whether the spec changes and who may accept that change. The runbook says who answers on this shift and where the logs sit. Rotation answers a different question: for an API key, a database password, or a setting that changes production behaviour, which identifier is in use, from which day the new value is accepted, and from which day the old value is not. The four can point at the same cutover number. See How to keep an audit log of actions in custom software, How to control scope changes in custom software, and How to write an operations runbook for custom software.

The API contract names the scheme and the key name. It does not paste the secret. See How to write an API contract for custom software. Delivery still sits under Custom software, websites, and applications. The cover of the rotation record states the application version and where the inventory is kept. If the spec must change, that returns to the change record. The outcome is not rewritten on the rotation row.

The inventory names the item and the owner, and it does not store the secret

NIST SP 800-57 Part 2 Rev. 1, was published in May 2019. The authors are Elaine Barker and William C. Barker. The text says it is available free of charge and may be used by nongovernmental organizations on a voluntary basis. It says a key-management policy covers inventory management of keys or certificates, including routine supersession at the end of a cryptoperiod or validity period, and emergency revocation of a compromised key together with establishment of a replacement. It also says a key-management specification shall identify where human and automated inventory management and audit logging are required.

Each row of the company's inventory has an identifier, a kind (API key, database password, or a setting that changes production behaviour), the system it belongs to, the owner, and the current state. The secret value, the password text, and any secret inside a setting are not written on the row. An item with no identifier does not enter the inventory and cannot start a rotation. If the kind is a setting and not a secret, the new value may stay on the change record. A secret value still does not.

The company writes the period of use, and does not copy the suggested table

NIST SP 800-57 Part 1 Rev. 5, was published in May 2020. The author is Elaine Barker. It runs to 170 pages, is available free of charge, and may be used by nongovernmental organizations on a voluntary basis. It defines a cryptoperiod as the time span during which a specific key is authorized for use by legitimate entities, or during which the keys for a given system remain in effect. If a key is compromised, that cryptoperiod shall no longer be considered valid. Compromise is the unauthorized disclosure, modification, substitution, or use of sensitive key information.

The publication suggests cryptoperiods by key type, and it says that short cryptoperiods generally enhance security, while more frequent changes can increase exposure where manual distribution is prone to error. Those suggestions stay in that publication's table. They are not copied onto this inventory. For each identifier the company writes its own period of use, or the event that triggers a change, and who set it on which day. A blank is not filled with an estimated day on which rotation happens by itself.

During the overlap, the new value is accepted and the old value may still be processed

The same part splits a symmetric key into an originator-usage period, when the key may still apply protection, and a recipient-usage period, when protected information may still be processed. Protection shall not be applied after the first period ends. The second period may run longer, so that information already protected can still be processed. In the deactivated state the key is not used to apply protection, though in some cases it may still process information that is already protected. In the destroyed state the key no longer exists, and the fact that it existed may still be recorded in metadata or an audit log.

If an API key or a database password needs both values for a time, the company writes the overlap as a start day and an end day. After the start, the new value may be accepted. Until the end, the old value may still be accepted. On the end day the old value is deactivated and is not accepted for a new call or a new connection. An overlap with no start and end is not a dual-value period, and the old value is not left acceptable. If history protected by the old password must still be read, the last day for that reading is written separately. It is not treated as the same day the new connections stop accepting the old value, unless the company writes that they are the same day.

The person who approves the cutover is named on the row

The electronic catalog NIST SP 800-53 Rev. 5.2.0, has metadata last-modified 2026-10-22 and version 5.2.0. IA-5 says to manage system authenticators, including procedures for lost, compromised, or damaged authenticators and for revoking them; to change default authenticators before first use; to change or refresh authenticators on an organization-defined time period by authenticator type, or when organization-defined events occur; and to protect authenticator content from unauthorized disclosure and modification. The discussion treats passwords and cryptographic devices as authenticators.

The person who may approve this cutover is named on the identifier's row, with the date of agreement. Neither the catalog nor the two parts above name that person. Without the name, the overlap does not start, and the old value is not retired early. A password shared by a group or a role is changed when membership changes, under IA-5. If a membership change is not written as an event, someone's departure is not treated as a completed rotation. A default password is changed before first use. The fact of the change is on the inventory. The default value is not.

After the old value is deactivated, confirm that it is rejected

After the overlap ends, the cutover row records one check: a call or a connection to production that should be rejected with the old value, with the time, the identifier, and whether the result was rejection or acceptance. If it is still accepted, the old value is not deactivated. The end day is rewritten, with who changed it. The person who runs the check may differ from the approver. The two fields stay separate.

The check does not paste the old value, the new value, or a secret in the response. It records the identifier and either "rejected" or "still accepted". If the person on duty must be told, that uses the place the runbook already names. The shift list is not rewritten on this row. If compromise is suspected, Part 1 says the cryptoperiod is no longer valid. Applying protection with that value stops without waiting for the end of the overlap, and the row records when the suspicion was noted and who decided.

The audit line records the identifier and the action, not the secret

If the operations log records this rotation, it uses the fields in the audit note: type, time, place, source, outcome, and identity. The outcome is approval, deactivation, or a rejected check. The secret does not enter the audit line or the notice. Part 1 says that after a key is destroyed, the fact that it existed may be recorded in an audit log. What is recorded is existence and state, not the secret text. See How to keep an audit log of actions in custom software.

If a setting is not a secret, the change record may keep a description of the new value. A secret sitting in the same settings file is still not copied out. If a read of the rotation row is itself recorded, that is another line, and it does not add the secret.

The rotation is finished when the inventory, the overlap, the approval, and the check are written

If the identifier, the owner, the overlap or the period of use, or the approver is blank, this item does not start. Until the check is written as rejected, the old value has not left. A secret sitting in chat is not an inventory row, and it is not a completed change.

Three checks show the rotation is finished: the inventory has an identifier and an owner and no secret value; the overlap and the approver have dates; and the check after the end says the old value was rejected. A blank item leaves the old value acceptable until those three are written.

Related notes

Book a consultationCustom software, websites, and applications