Basin Pipelines introduced the ability to update a sink’s credentials in place. Previously an expired or revoked token forced you to delete the sink and recreate it, which broke any pipelines that referenced the sink. The new UI flow and API endpoint let you replace the token or secret directly, and then refresh the affected pipelines so they resume automatically.
What Changed
Two UI actions are now available on a sink’s page under the Destination section: create a fresh API token or paste existing token credentials. The same capability is exposed via the API with a PATCH request to /accounts/{ACCOUNT_ID}/pipelines/v1/sinks/{SINK_ID}, where the JSON payload contains a config.credentials object. After the sink is updated, each pipeline that consumes the sink presents an Update pipeline button that triggers a restart if the pipeline had previously failed.
Why It Matters to Practitioners
- Reduced operational risk: Credential rotation no longer requires destroying and rebuilding a sink, which eliminates a window where pipelines are mis‑configured.
- Faster remediation: A failed pipeline caused by a token change can be fixed with a single click or API call, cutting mean‑time‑to‑recovery.
- Consistent audit trail: Updating credentials preserves the sink’s identifier, keeping historical logs and monitoring dashboards stable.
Implementation and Operational Guidance
Both the sink‑update and pipeline‑update calls require an API token that has the Basin Pipelines Edit permission. A typical credential rotation workflow might look like this:
curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pipelines/v1/sinks/$SINK_ID" \
--request PATCH \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--json '{
"config": {
"credentials": {
"access_key_id": "",
"secret_access_key": ""
}
}
}'
After the sink is patched, iterate over each pipeline that references the sink and issue a similar PATCH to /pipelines/v1/pipelines/{PIPELINE_ID}. The UI automatically surfaces the Update pipeline button for any pipeline that detects a changed sink.
Practitioners should treat the credential payload as a secret and store it in a secure vault. Because the API call transmits the secret in the request body, ensure TLS is enforced (the endpoint is HTTPS by default) and limit the token’s scope to the minimum required permissions.
Related CloudNinjas coverage: hands-on guides.
What This Means For Practitioners
Plan a regular rotation schedule that calls the sink‑update endpoint rather than recreating sinks. Automate the follow‑up pipeline‑update step to keep pipelines running without manual intervention. Monitor the pipeline status page for any “failed” state after a rotation, and use the built‑in update button to trigger a restart. Finally, verify that the API token used for these calls has only the Basin Pipelines Edit permission to reduce the blast radius of a compromised token.
