Rutagon removes the last long-lived cloud key from your pipeline, for an engineering team that still deploys to AWS with a static access key. The last long-lived key removed from CI means the pipeline assumes a role, the key is deleted rather than rotated, and a new key cannot be created to replace it.
The last long-lived key removed from CI
Rotation is the trap this engagement refuses. A new access key on a schedule is still a long-lived secret. It still lands in a CI variable, a laptop, and a log. The last key is the one you have been meaning to delete after the next rotation. We delete it. The pipeline's next deploy uses a role, the way AWS describes federation through an OIDC provider in the IAM OIDC documentation. If the deploy cannot assume that role, we do not put the key back to save the afternoon.
The boundary is CI. Runtime credentials on a server, a vendor key that is not in the pipeline, and a break-glass role for people are visible so we do not pretend they are done, and they are not this job unless they are the same key. One key, the one the pipeline uses, is the success condition. A program to eliminate every secret in the company is a different size. We will say so rather than absorb it.
Rutagon does this work from Alaska. The inventory is short because "last" means we can name it. Access key id, the IAM user or the CI variable that holds it, the repositories that inject it, and the deploy that proves the role. A key you cannot name is not the last key. It is an unknown, and we do not delete our way through unknowns.
Delete, do not rotate
The order is the delivery. We list the key and every place it is injected. We add the role with a trust pinned to the repository and the branch that should deploy. We run one real deploy with the key removed from that pipeline only. We delete the key in IAM. We search once more for the key id. Then we block the IAM user from minting a replacement, or we remove the user if nothing else needs it.
key_id: the access key still in CI
injected_at: variables and repos, listed
replacement: a role, subject pinned, no wildcard audience
proof: one deploy from the default branch with the variable gone
deletion: the key removed in IAM, not set inactive forever
block: no new access key on that user Inactive is not deleted. An inactive key is a switch someone turns on during an incident. Deletion is the point. If a second pipeline still injects the same key, the proof deploy is not the last step. The key stays until every injection we listed is on the role, or the remaining injection is written down as a dated exception with an owner. An exception without a date is the key surviving under a new name.
Replacing AWS access keys with OIDC is the pattern. GitHub Actions federation at scale is the version of that pattern when the provider is GitHub and you have more than one repository. This engagement is the last key, including the deletion and the block. A trust policy alone, with the key still present "in case," is not the delivery. Security automation is the lane.
We have run the same end state on our own infrastructure and on a production SaaS platform. The pipeline assumed a role. The task role was a different role. No static key sat in the environment for the deploy. The lesson worth copying is the deletion. Teams that federate and keep the key "for local" still have the key.
What "last" does not include
A developer access key on a laptop is related and it is not automatically in scope. If that key is the same IAM user as CI, it is in scope, because deleting the CI key while the laptop key remains means the user still has a long-lived credential. If it is a different user, we list it and we do not expand the engagement to every human unless you ask. Human access should be a role through your identity provider. Cutting every human over is a larger job than the last CI key.
Third-party tools that only accept an access key get a named exception or a different design. We do not invent federation a vendor does not support. We also do not store their required key in the same CI variable the deploy used and call the pipeline clean. The vendor key, if it must exist, lives in a place the deploy role does not need, with an owner. Mixing them is how the "last" key is actually two keys and one of them remains.
The trust policy is pinned. A subject of * is a standing grant to every repository that can talk to that provider. We will not merge it to get the proof deploy green. If the CI product cannot emit a useful subject, we change the product or we stop. The stop is cheaper than a wildcard that becomes the next finding.
Logs are part of the proof. The deploy's CloudTrail event should show the role, not the IAM user that owned the key. We keep that event id in the note we hand you. A screenshot of a green pipeline is not proof of which credential ran. The event is.
After the key is gone
The block matters more than the celebration. An SCP or a permission boundary that denies iam:CreateAccessKey for the deploy path keeps the next incident from minting a replacement. We apply the narrowest deny that matches the users who could recreate this key. We do not attach a blanket deny to the whole organization inside an engagement that was about one pipeline. A blanket you did not expect will break a vendor on Friday and the key will come back as a hero.
Handover is the role, the proof deploy, the deleted key id, the search that found no remaining injection, and the control that blocks a new key. Your team should be able to explain that list without us. If the only person who knows which variable used to hold the key is the person who built it, we write it down before we leave. Memory is not an inventory.
We do not stay on as the team that rotates anything, because there should be nothing to rotate on this path. If you want a pass over the rest of the account's keys, that is the next engagement, and it starts from an inventory rather than from this one deletion. The last key in CI is done when that key is gone and the pipeline still ships.
Frequently Asked Questions
### Why not rotate the key every few weeks instead? Rotation issues another long-lived secret and distributes it. The pipeline does not need a secret if it can assume a role. We delete the key after a deploy succeeds on the role. We do not leave a rotation behind as a safety net.
### What if the proof deploy fails? We fix the trust, the subject, or the permissions on the role. We do not restore the key while we think. A dated exception is available if a production freeze makes deletion impossible this week. An undated "put it back" is not.
### Does this remove keys from developer laptops? Only when the laptop key belongs to the same user as the CI key. Other human keys are listed and left for a separate cutover. Deleting CI's key while a second key on that user remains does not count as done.
### Can we keep the key inactive, just in case? No. Inactive is a switch. The delivery is deletion, plus a control that stops a new key on that user. A break-glass path, if you need one, is a role with an approval and an end, not the old key set to inactive.
Book a technical call. 907-841-8407. contact@rutagon.com.