Skip to content

Redact webhook URL path and query from transport errors - #2846

Merged
hslatman merged 1 commit into
smallstep:masterfrom
C-Mejlak:christian/eff-1098-certificates-webhook-url-redaction
Nov 3, 2026
Merged

hslatman merged 1 commit into
smallstep:masterfrom
C-Mejlak:christian/eff-1098-certificates-webhook-url-redaction

Conversation

@C-Mejlak

@C-Mejlak C-Mejlak commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Name of feature:

Redact webhook URL path and query from transport errors in logs.

Pain or issue this feature alleviates:

Webhook transport errors (*url.Error from http.Client.Do) embed the full webhook URL. A customer-configured webhook URL can carry a token in its query string, and those errors are logged.

Why is this important to the project (if not answered above):

Prevents credential leakage into CA logs in hosted, self-hosted, and Run Anywhere deployments. One change at the single webhook call site covers the SCEP challenge, authorizing, and enriching paths.

Is there documentation on how to use this feature? If so, where?

No docs change. The error line keeps scheme, host, and cause (timeout, DNS, TLS, status) and drops path and query.

In what environments or workflows is this feature supported?

All step-ca deployments.

In what environments or workflows is this feature explicitly NOT supported (if any)?

The full URI including query remains in the access log; only the error line is redacted.

Supporting links/other PRs/issues:

EFF-1098.

Verification:

go test ./authority/provisioner/ -count=1 passes, including new tests with a token-bearing URL (asserts no token, path, or query in the error) and a deadline error (asserts errors.Is still works). go vet ./authority/provisioner/ and gofmt -l are clean.

@CLAassistant

CLAassistant commented Nov 3, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions github-actions Bot added the needs triage Waiting for discussion / prioritization by team label Nov 3, 2026
@C-Mejlak
C-Mejlak marked this pull request as ready for review November 3, 2026 09:46
@hslatman hslatman changed the title fix(provisioner): redact webhook URL path and query from transport errors Redact webhook URL path and query from transport errors Nov 3, 2026
@C-Mejlak
C-Mejlak force-pushed the christian/eff-1098-certificates-webhook-url-redaction branch from 8c46ef5 to b9325b7 Compare November 3, 2026 11:58
Comment thread authority/provisioner/webhook.go Resolved
Comment thread authority/provisioner/webhook.go Resolved
Comment thread authority/provisioner/webhook.go Resolved
@hslatman hslatman added this to the v0.31.0 milestone Nov 3, 2026
@C-Mejlak
C-Mejlak force-pushed the christian/eff-1098-certificates-webhook-url-redaction branch from b9325b7 to c8d027c Compare November 3, 2026 12:50
Comment thread authority/provisioner/webhook.go Resolved
Comment thread authority/provisioner/webhook.go Resolved
Comment thread authority/provisioner/webhook.go Resolved
Comment thread authority/provisioner/webhook.go Resolved
Webhook transport errors (*url.Error from http.Client.Do or
NewRequestWithContext) embed the full expanded URL, and a
customer-configured webhook URL can carry credentials in userinfo,
path, or query. Redact at every error return of Webhook.DoWithContext:
logs keep the webhook name, scheme, host, and cause, while userinfo,
path, query, and fragment render as <redacted> markers when present.
A root path renders as-is. If the URL cannot be parsed, fail closed to
<redacted>. The body-close log line also redacts the configured URL.
Covers the SCEP challenge, authorizing, and enriching webhook paths.
@C-Mejlak
C-Mejlak force-pushed the christian/eff-1098-certificates-webhook-url-redaction branch from c8d027c to 0cab6d2 Compare November 3, 2026 13:33
@hslatman
hslatman merged commit 9d1c281 into smallstep:master Nov 3, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs triage Waiting for discussion / prioritization by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants