Skip to content

Rotating upstream credentials

Replace the credentials maruhi stores at their issuers — AWS IAM access keys, Cloudflare API tokens, PostgreSQL and MySQL passwords with one command, any other issuer with a script of your own, everything else with a runbook — keep the old credential working until the new value is deployed, then invalidate it. What to rotate after someone leaves, how to check on a schedule, how a CI cron rotates with a member's countersignature, and when a credential never needs rotating at all.

Encryption cannot un-read a value. When a member is removed, a device is revoked, or a scope is narrowed, maruhi rotates the environment’s key so the person receives nothing new — but every value they could already read is still valid at its issuer (the AWS account, the database, the API that minted the token). Rotation means replacing those credentials at the issuer and pushing the new values. maruhi tells you which ones, and for common issuers it does the replacement for you.

Rotation is always signed by a member from their own machine: the CLI decrypts the current credential and the issuer’s admin credential in memory, calls the issuer, and pushes the new value signed as that member — or a CI job does the issuer half under a workload lease and stores the result as a sealed proposal the member accepts. The maruhi server never holds a plaintext, a signing key, or an issuer credential, and nothing runs on a schedule inside it. Nothing is displayed either; the report names key ids, roles, and token ids, never a secret.

Task Command
See what should be rotated and how maruhi rotation list
Replace a credential at its issuer and push the new value maruhi var rotate <name>
Invalidate the previous credential once the new one is live maruhi var rotate <name> --finalize
Rotate any other credential with a script of your own the exec connector below
Rotate a credential by hand the runbook below, then maruhi push <name>
Fail a CI job while something is due maruhi rotation list --fail-on-due
Rotate from a CI cron, with a member’s countersignature maruhi ci rotate <name>, then maruhi rotation accept <id>
Accept the risk for a value you cannot push (deleted) maruhi rotation dismiss <variableId> --env …
Declare how long a value should live, and be reminded maruhi schema set <name> --max-age <days>

The dual-credential grace period

maruhi var rotate never breaks what is running. Every connector creates a second credential and leaves the current one valid: a second IAM access key, a second Cloudflare token with the same policies, a password on the other of two database roles, or MySQL’s secondary password. The new value is pushed as a new version and synced to the deploy targets whose sync config asks for it. Consumers pick it up at their own pace. When everything runs on the new value, --finalize invalidates the previous credential at the issuer.

maruhi var rotate DATABASE_URL --env prod
# Rotated DATABASE_URL in environment prod with the postgres connector (DATABASE_URL version=8, epoch=3)
#   role app_b now in use
# Previous credential: role app_a keeps its previous password until you finalize
# Deploy the new value (1 variable pushed), then run `maruhi var rotate DATABASE_URL --finalize` to invalidate the previous credential

# … deploy, confirm …

maruhi var rotate DATABASE_URL --env prod --finalize
# Finalized the rotation of DATABASE_URL in environment prod (postgres): the credential of version 7 is invalidated; version 8 stays current
#   role app_a: password replaced by a random one nobody holds

--finalize reads the previous version from the variable’s history — verified as an ancestor of the current value, like a rollback — and invalidates exactly the credential it held. There is no state file: the version history is the rotation state. If someone pushed in between, --previous <version> names the version to finalize. The previous credential is read back from the version history as a verified ancestor of the current value, never from the server’s own account of the history. For an AWS rule, the key to deactivate is decided against the issuer: a key other than the current one is deactivated only when an earlier version of the key id variable held its id and it authenticates with that version’s secret at STS, so a key created by hand is never touched. Finalizing asks for confirmation, or takes --yes in a script; so does the one shape without a grace period (a single PostgreSQL role changing its own password in place).

A rotation pushed after the environment’s key rotation clears the rotation flag for that variable (a value encrypted under a key the person never held). maruhi rotation list shows what is still open.

Set up maruhi.rotate.json

The rotation config lives in the repository, next to maruhi.sync.json. It names, for each variable, the connector and where the issuer’s admin credential is. It contains no secrets:

{
  "version": 1,
  "project": "<your project id>",
  "variables": {
    "DATABASE_URL": {
      "connector": "postgres",
      "roles": ["app_a", "app_b"],
      "inputs": { "adminUrl": { "environment": "ops", "name": "ADMIN_DATABASE_URL" } }
    },
    "AWS_SECRET_ACCESS_KEY": {
      "connector": "aws-iam-access-key",
      "accessKeyIdVariable": "AWS_ACCESS_KEY_ID",
      "inputs": {
        "accessKeyId": { "environment": "ops", "name": "AWS_ROTATOR_KEY_ID" },
        "secretAccessKey": { "environment": "ops", "name": "AWS_ROTATOR_SECRET" }
      }
    },
    "CLOUDFLARE_API_TOKEN": { "connector": "cloudflare-api-token" }
  }
}
  • inputs point at ordinary maruhi variables — in the same environment ("adminUrl": "ADMIN_DATABASE_URL") or in another one you can decrypt, such as an ops environment that only owners are scoped into. Keeping the admin credential there means a member who can rotate prod values cannot read it.
  • A rule with no inputs rotates the credential with itself: an IAM user that may manage its own keys, a Cloudflare token that carries API Tokens Write, a database role allowed to change its own password. Simplest to set up; the trade-off is that whoever holds the credential can also rotate it.
  • Unknown keys are refused, project is checked against the project you run in, and the issuer hosts are fixed by the connector — the config cannot redirect a credential anywhere.

maruhi var rotate reads maruhi.rotate.json from the working directory (--rotate-config <file> to point elsewhere). maruhi rotation list and the checklist after a removal read the same file to show the exact command for each covered variable.

Connectors

AWS IAM access keys

Rule: "connector": "aws-iam-access-key", "accessKeyIdVariable" naming the variable that holds the matching access key id. The rule is keyed by the secret; maruhi var rotate accepts either name. Optional "user" names the IAM user (otherwise it is derived from the current key with GetAccessKeyLastUsed).

  • Rotate: CreateAccessKey for the user. IAM allows two keys per user — a leftover key that is already inactive is deleted first; two active keys refuse the rotation (finalize the previous one first). Both variables are pushed, the key id then the secret. New keys take a few seconds to become usable at AWS.
  • Finalize: UpdateAccessKey … Inactive on the previous key. This is reversible from the AWS console if something still used it; the next rotation deletes an inactive key.
  • Admin credential (inputs.accessKeyId / secretAccessKey, optional sessionToken for STS credentials): iam:ListAccessKeys, iam:CreateAccessKey, iam:UpdateAccessKey, iam:DeleteAccessKey, and iam:GetAccessKeyLastUsed on the user. Without inputs, the user needs those permissions on itself.

Requests are signed with SigV4 by the CLI (WebCrypto HMAC; no AWS SDK is installed), toward iam.amazonaws.com only.

Cloudflare API tokens

Rule: "connector": "cloudflare-api-token", optional "accountId" for an account-owned token (user-owned by default; Cloudflare documents account-owned tokens under “Account-owned tokens” in its API fundamentals).

  • Rotate: verify the current token to learn its id, read its definition, and create a second token with the same name, policies, condition, and expiry. Rolling a token in place would invalidate the old value at once, so the connector never rolls.
  • Finalize: delete the previous token.
  • Admin credential (inputs.token): a token with API Tokens Write (user) or Account API Tokens Write (account-owned). Without inputs, the token being rotated needs that permission itself.

PostgreSQL

Rule: "connector": "postgres". The variable holds a connection URL (postgres://user:password@host/db?…); the connector keeps the URL and replaces its user and password.

  • Two roles ("roles": ["app_a", "app_b"]): the pattern Infisical, Doppler, Pulumi ESC, and AWS Secrets Manager use, because PostgreSQL has no second password. Rotation sets a fresh 32-character password on the role not in the URL and pushes the URL with that role; the other role keeps working. Finalize replaces the previous role’s password with a random one nobody holds. Create both roles once with the same grants:

    CREATE ROLE app_a LOGIN PASSWORD 'initial';
    CREATE ROLE app_b LOGIN PASSWORD 'initial';
    GRANT app TO app_a, app_b;   -- or grant the same privileges to both
  • One role (no roles): ALTER ROLE … PASSWORD on the URL’s own role. The old password stops working at once (no grace period), so the command asks for confirmation. Use it for development databases or when a restart is already planned.

  • Admin credential (inputs.adminUrl): a URL whose role may ALTER ROLE the application roles (CREATEROLE with ADMIN OPTION, or a superuser). Without inputs, the application role changes its own password.

After the statement, the CLI connects with the new URL and runs SELECT 1; a failure is a warning (the password is set at the server) so you can check before finalizing. Use sslmode=require in the URLs — the password travels inside the connection.

MySQL and MariaDB

Rule: "connector": "mysql", optional "host" for the account’s host part ('user'@'host', default %), optional "roles" for the two-account pattern.

  • One account (default): MySQL 8.0.14 and later keep two passwords per account. Rotation runs ALTER USER … IDENTIFIED BY … RETAIN CURRENT PASSWORD, so the current password keeps working as the secondary one; finalize runs ALTER USER … DISCARD OLD PASSWORD. This is the grace period without a second account.
  • Two accounts (roles): the same alternation as PostgreSQL.
  • Admin credential (inputs.adminUrl): an account with CREATE USER; without inputs, the account changes its own password (it needs APPLICATION_PASSWORD_ADMIN for the dual-password form).

Any other issuer: the exec connector

Rule: "connector": "exec", "rotate" naming a script of the repository, optional "finalize". maruhi does the maruhi half — the verified pull, the decryption, the signed push, the sync, the grace period, the version history — and your script does the issuer half. maruhi interprets nothing about the issuer, so the set of issuers is whatever you can script: a curl to a vendor API, a cloud SDK call, an ssh to a box that rotates a key. This is the client-side form of the custom rotation function AWS Secrets Manager and Doppler run in a Lambda — here it runs on the member’s machine, inside the same trust boundary as the member’s own code.

{
  "version": 1,
  "variables": {
    "STRIPE_SECRET_KEY": {
      "connector": "exec",
      "rotate": ["./scripts/rotate-stripe.sh"],
      "finalize": ["./scripts/finalize-stripe.sh"],
      "inputs": { "STRIPE_ADMIN_KEY": { "environment": "ops", "name": "STRIPE_ADMIN_KEY" } }
    }
  }
}

The rotate script runs with these in its environment, by memory injection only (the maruhi run shape, restricted to the rule’s variables):

Variable Value
the rule’s own name (STRIPE_SECRET_KEY) the current credential
MH_ROTATE_CURRENT the same, under a fixed name
each inputs key (STRIPE_ADMIN_KEY) the admin credential it points at, decrypted
MH_ROTATE_VARIABLE / MH_ROTATE_ENVIRONMENT the variable name and the environment id
MH_ROTATE_PHASE rotate

It prints the new credential on stdout (one trailing newline is dropped; nothing else is touched; a script that writes more than 1 MiB to stdout or to stderr is stopped — a credential is small, and so is commentary) and exits 0. The size and line count of what it printed are shown in the rotation’s report beside the current value’s (and, for a proposal, at the acceptance from the opened value — never stored with the proposal), and a line count that differs from the current value’s is warned about before the push, so a script that printed chatter instead of a value is seen before the value is pushed. Anything it says on stderr is kept for you only if it fails — scrubbed of every credential it was given — so a failing script reports its exit code and its last lines, never a secret. The scrubbing matches the credentials’ exact bytes only: an encoded, hashed or truncated form of a secret is not recognized, so keep stderr and facts free of anything derived from a credential (a key id is fine; a prefix of the key is not). maruhi pushes stdout as the new version, exactly like the built-in connectors.

The finalize script runs the same way, with MH_ROTATE_PHASE=finalize, the current credential under the variable’s name, and the previous one as MH_ROTATE_PREVIOUS (a rule with companions also gets each companion’s previous value as MH_ROTATE_PREVIOUS_<companion>, when the version before the current one is the one being finalized — so a key id to retire needs no lookup). It retires the previous credential at the issuer. Its stdout is not a value: up to ten lines of it are kept as the step’s facts (scrubbed of every credential it was given), so a script that prints “revoked key id …” leaves that in the report. A rule without a finalize script is treated as having no grace period: its rotate script is expected to retire the old credential itself, so maruhi var rotate asks for confirmation first (or takes --yes).

# scripts/rotate-stripe.sh — create a second restricted key with the same name
#!/bin/sh
set -eu
curl -fsS https://api.stripe.com/v1/... -u "$STRIPE_ADMIN_KEY:" ... | jq -r '.secret'

# scripts/finalize-stripe.sh — delete the key the previous version held
#!/bin/sh
set -eu
curl -fsS -X DELETE "https://api.stripe.com/v1/.../$(id_of "$MH_ROTATE_PREVIOUS")" -u "$STRIPE_ADMIN_KEY:"

Options:

  • "rotate" / "finalize" are the script’s argv (no shell; the first element is the executable). A bare string is the executable alone.
  • "cwd": the scripts’ working directory, relative to maruhi.rotate.json (default: its directory). Scripts travel with the repository.
  • "output": "json": the rotate script prints {"value": "…", "companions": {"STRIPE_KEY_ID": "…"}, "facts": ["…"]} instead of the bare value. "companions" in the rule map an environment variable name to the maruhi variable it carries (an issuer-side key id that is pushed next to the secret, the way the AWS connector pushes the access key id); every declared companion must be answered, and the current companions ride into the script’s environment under their names. facts are shown in the report and, for a proposal, stored on the server in clear — scrubbed of the credentials’ exact bytes only (see above).
  • inputs keys are free-form environment variable names; MH_ROTATE_*, execution-control names such as PATH or LD_PRELOAD, and the rule’s own variable name are refused.

What the connector does not do: run anything on the server or on a schedule (the script runs on the member’s machine, when the member runs maruhi var rotate), and interpret the script’s output beyond the one contract above. The trust model is the one you already have for the scripts in your repository: the script runs with the member’s own credentials and sees the credential it rotates.

After someone leaves

maruhi member remove, maruhi member change-role (a demotion or a narrower scope), and maruhi server revoke rotate the affected environments’ keys and then print the rotation checklist: every variable the removed party could read, confirmed fetches first, each with its next step.

Rotation checklist: 3 variables the party that lost access could read (encryption cannot revoke already-read values — rotate each upstream credential, AUDIT_SPEC §4.1):
  [read] prod DATABASE_URL: `maruhi var rotate DATABASE_URL --env prod` (postgres connector in maruhi.rotate.json)
  [readable] prod STRIPE_SECRET_KEY: rotate at the issuer, then `maruhi push STRIPE_SECRET_KEY --env prod` (runbooks: https://maruhi.app/docs/rotation)
  [readable] prod OLD_WEBHOOK_SECRET: deleted — rotate at the issuer, then `maruhi rotation dismiss v-2a9c --env prod` (a deleted variable cannot be pushed)
A fresh value pushed after the environment's rotation resolves a flag; `maruhi rotation list` shows what remains

[read] means the person fetched that value (an audit record exists); [readable] means they held the key and could have. maruhi rotation list shows the same rows with the same next step at any later time, so the checklist survives a closed terminal. The flags are server-derived; the names come from the verified statements on your machine.

For maruhi device revoke, which spans every project the device was on, run maruhi rotation list in each project.

Expiring values

A credential that was never leaked still ages: a key issued two years ago has been copied into more places than anyone remembers. Declare how long a value should live, and maruhi reminds you:

maruhi schema set STRIPE_SECRET_KEY --env prod --max-age 90
# Updated the schema of STRIPE_SECRET_KEY (type=string, required=true, max-age=90d, metaVersion=3)

The max age is a schema field like the type and the description: it is signed by the member who declared it, verified by every client, shown by maruhi schema (the MAX AGE column), exported by maruhi schema export (x-maruhi-maxAgeDays), and visible to agents through maruhi mcp. It travels with the variable, so a rotation does not have to re-declare it. none clears it.

maruhi rotation list adds an Expiring values section for every value past its max age or within 14 days of it, with the same next step as the checklist:

Expiring values: 1 value past the declared max age, 1 value due within 14 days (the max age is declared with `maruhi schema set --max-age`; the push time is server-declared)
  [expired] prod STRIPE_SECRET_KEY: max age 90d, pushed 2026-06-20, expired 14 days ago — next: rotate at the issuer, then `maruhi push STRIPE_SECRET_KEY --env prod` (runbooks: https://maruhi.app/docs/rotation)
  [due] prod DATABASE_URL: max age 30d, pushed 2026-09-10, due in 8 days — next: `maruhi var rotate DATABASE_URL --env prod` (postgres connector in maruhi.rotate.json)

The age counts from the latest push, whichever way the value was pushed: maruhi var rotate, maruhi push, or a rollback. The push time is the server’s record (the one maruhi var history shows), so this is a reminder, not a proof — the signed part is the declaration. After maruhi var rotate on a variable with a max age, the report names the date the next rotation is due.

maruhi run and maruhi pull print the reminder where it is most likely to be read — at the point of use:

Note: 1 value past the max age its schema declares: STRIPE_SECRET_KEY (max age 90d, pushed 2026-06-20, expired 14 days ago) — rotate it (`maruhi rotation list` shows the next step for each)

Only variables that declare a max age cost a history lookup (run concurrently, one round trip for all of them); an environment without any costs nothing. The note never changes what the command does. maruhi ci run prints no note: a lease carries no push times.

Checks on a schedule

maruhi runs nothing on a timer. A CI cron can, and maruhi rotation list has the two switches that make a check out of it:

# .github/workflows/rotation-check.yml
on:
  schedule: [{ cron: "0 9 * * 1" }]
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: maruhiapp/maruhi/actions/setup-maruhi@<tag>
        with: { version: <tag> }
      - run: >-
          maruhi rotation list --server https://my.maruhi.app --project $PROJECT_ID
          --fail-on-due --due-within 14 --fail-on-flags
        env:
          PROJECT_ID: ${{ vars.MARUHI_PROJECT_ID }}
          MARUHI_TOKEN: ${{ secrets.MARUHI_READ_TOKEN }}
          MARUHI_TOKEN_ORIGIN: https://my.maruhi.app
  • --fail-on-due exits with code 3 when a value is past its max age; --due-within <days> also counts values that come due within that window, so the job fails with lead time.
  • --fail-on-flags exits 3 while any rotation flag is active — a credential a departed party could read has neither been rotated nor dismissed.
  • --fail-on-pending exits 3 while a sealed proposal minted by a CI job (below) still awaits a member; with --due-within <days> the verdict also says how many expire within that window. It needs a member’s token (proposals are listed to members and above; a reader’s token makes the check exit 1).
  • Exit 3 is reserved for “something is due”; a check that could not run exits 1, so the cron tells the two apart. A history that could not be read under --fail-on-due, or a proposal list that could not be read under --fail-on-pending, is such a failure — unless something else is already known to be due, in which case the job exits 3 and names what could not be read on the same line (an unknown is never a passed check, and a known due value is never hidden behind an outage). The listing is printed in full before the verdict, with the exact command per row, so the failed job’s log is the checklist.
  • The age is the age of the value, not of its latest version: a re-encryption (the mandated one after a member leaves) and a rollback are new versions of an old value, and the clock does not reset for them.

A token with read permission on the project is enough for --fail-on-due and --fail-on-flags (maruhi login --show-token --token-ttl-days 365 provisions MARUHI_TOKEN for a runtime without lease support; the listing reads flags and metadata, never a value). The notification is whatever your CI does with a failed scheduled job — an e-mail, a Slack message, an issue — and that is deliberate: maruhi sends nothing anywhere.

Rotation from CI: sealed proposals

A cron can do more than nag. maruhi ci rotate <name> runs a rotation rule from a CI job that holds only a workload lease — no signing key, no keychain — and stores the result as a sealed proposal that a member finishes from their own machine:

# .github/workflows/rotate-stripe.yml
on:
  schedule: [{ cron: "0 9 1 * *" }] # monthly
# One rotation at a time: two overlapping runs would both create a credential
# at the issuer, and only one proposal per variable can be pending
concurrency: { group: maruhi-rotate-prod, cancel-in-progress: false }
jobs:
  rotate:
    runs-on: ubuntu-latest
    permissions: { id-token: write, contents: read }
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with: { persist-credentials: false }
      - uses: maruhiapp/maruhi/actions/setup-maruhi@<tag>
        with: { version: <tag> }
      - run: >-
          maruhi ci rotate STRIPE_SECRET_KEY
          --server "$MARUHI_SERVER" --project "$MARUHI_PROJECT" --env prod
          --anchor .maruhi/anchor.json --rotate-config maruhi.rotate.json

The job leases the environment (and the environment an admin input lives in), decrypts the current credential and the admin input in memory, and asks the server first whether a proposal for these variables would be stored (a member pushed since the lease, a proposal for the same variable is already pending, the project is at its pending cap or its hourly mint window) — a refusal there costs nothing, because the issuer has not been touched. The one refusal that can still come after the issuer accepted the rotation is a change of members or devices since the lease; the job then leases again and seals the proposal to the current recipients, once. Only then does it run the rule’s connector exactly as maruhi var rotate would — the exec script above, or a built-in connector. Then, because the job cannot sign a version, it encrypts the new value to the device keys of every member who could push it (members and above whose scope includes the environment — readers and the server key receive nothing) and stores the proposal on the server under the ephemeral key it leased with and a fresh OIDC token (a connector can outlive a short-lived one). The server keeps ciphertexts it cannot open, records who minted the proposal (the lease’s claims digest and the grant), and waits:

Sealed proposal 0f3e…9c21 stored for environment prod: STRIPE_SECRET_KEY (replacing version 7) — minted with the exec connector, sealed to 3 devices of 2 members, expires 2026-10-09
  ./scripts/rotate-stripe.sh: new credential produced
  value: 107 bytes, 1 line (the shape is shown here and at the acceptance only; it is not stored with the proposal)
Previous credential: the previous credential stays valid until you finalize (./scripts/finalize-stripe.sh runs with it)
A member finishes the rotation with `maruhi rotation accept 0f3e…9c21` …

A member picks it up — maruhi rotation list counts pending proposals, maruhi rotation proposals lists them with the connector’s facts and the workload that minted each:

maruhi rotation accept 0f3e9c21
# Accepting proposal 0f3e…9c21 pushes STRIPE_SECRET_KEY in environment prod as new versions signed by you. It was minted with the exec connector by the workload whose lease claims digest is 7c1d… (grant at chain seq 12)
#   ./scripts/rotate-stripe.sh: new credential produced
#   STRIPE_SECRET_KEY: 107 bytes, 1 line (opened on this device)
# Accept and push? [y/N]: y
# Accepted proposal 0f3e…9c21 in environment prod: STRIPE_SECRET_KEY version=8, epoch=3

accept opens the copy sealed to this device, checks that the proposal still replaces the version that is current (a value that moved since the job ran is refused — reject the proposal and let the job run again; that check is part of what the job sealed, so the server cannot re-label an old proposal), pushes the plaintext as an ordinary version signed by you, and closes the proposal. The previous credential stays valid at the issuer until you run maruhi var rotate <name> --finalize after the deploy, exactly as with a local rotation. maruhi rotation reject <id> drops a proposal and names the credential the job created so you can retire it by hand; a proposal nobody touches expires after seven days (--expires-in, at most 30).

What the job can and cannot do: it needs a rule with a grace period (a finalize step) — a rule whose rotation invalidates the current credential at once is refused before the issuer is touched, because a proposal may be rejected or expire while the current credential is still in use. It cannot push, rename, or delete anything, and the server never holds a plaintext or a signing key. A compromised job could propose a credential it also knows — which is why a human countersigns, sees which workload identity minted the proposal, and sees the facts before pushing; the audit log keeps rotation.proposed (the workload, by its lease claims digest), rotation.proposal_accepted / rotation.proposal_rejected (the member), and rotation.proposal_expired (nobody — the server, when it sweeps the row).

Runbooks for other issuers

For a credential without a connector, create a second credential at the issuer, push it, deploy, then revoke the old one. The order matters: revoking first causes an outage; pushing first and never revoking leaves the leak open.

  • Stripe: Developers → API keys → Roll key… with a delay (up to 24 hours) — Stripe’s own dual-credential window. Push the new key within the delay.
  • GitHub personal access tokens: generate a new token with the same scopes, push it, then delete the old one. For automation, prefer a GitHub App whose installation tokens live an hour and are minted on your machine.
  • OpenAI, Anthropic, Resend, SendGrid, Twilio and similar API keys: create a second key, push, deploy, delete the first. Most dashboards show the last-used time of the old key — wait until it goes quiet.
  • Vercel, Netlify, Cloudflare deploy tokens used by maruhi sync: create the new token, push it under the same variable name, then revoke the old one; the next maruhi sync apply uses the new one.
  • SSH keys, deploy keys, certificates: generate the new key pair, register the public half everywhere the old one is accepted, push the private half, deploy, remove the old public key.
  • Webhook signing secrets: most providers let you register a second secret or show the new one next to the old; verify against both during the window, then drop the old.
  • Shared passwords for third-party dashboards: change the password at the issuer and push it. There is no grace period for a password; do it when nobody is mid-session.

Then maruhi push <name> --env <env> for each, and maruhi rotation list to see the flag clear.

Credentials that never need rotating

The best answer to rotation is a credential that does not exist. For AWS, GCP, and Azure, let your CI and your deploy platform federate: GitHub Actions and Vercel issue OIDC tokens that AWS STS, GCP Workload Identity Federation, and Azure federated credentials exchange for short-lived credentials. maruhi then holds only non-secret configuration — a role ARN, a project number — and there is nothing to rotate after someone leaves. The same goes for the GitHub App tokens that maruhi proxy run mints: an hour-long token minted on your machine is not a credential anyone carries away.

Rotation is for the credentials that cannot be federated yet: database passwords, third-party API keys, tokens of platforms without OIDC. Keep that set small, and maruhi rotation list short.

What maruhi does not do

  • No rotation on a timer. Nothing runs on a schedule inside maruhi. A CI cron of your own can check what is due (--fail-on-due) or mint a sealed proposal (maruhi ci rotate), and the exec connector lets that cron’s maintainer script any issuer — but the signed push stays a member’s: a proposal becomes a version only when a member accepts it from their own machine.
  • No server-driven rotation. The server never holds an issuer’s admin credential, a plaintext, or a signing key.
  • No connector treadmill. The built-in set is small on purpose: AWS IAM keys, Cloudflare tokens, PostgreSQL, MySQL. The exec connector covers every other issuer with a script you review; the runbooks cover rotating by hand.
© 2026 maruhi contributors

Type to search…

↑↓ navigate↵ selectEsc close