Repository navigation
Conversation
kamal-proxy logs every request's raw path, on the app hosts and on the load balancers, so the credentials Fizzy's routes filter with filter_path_parameters still land in both proxies' logs and in Loki. List the same routes in proxy.logging.filter_paths, and pass them to the load balancers' deploys.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The bundled Kamal version rejects the new configuration key, so the compatible dependency upgrade remains a merge blocker.
1 open issue
What changed in this PR
Extends credential-path redaction to kamal-proxy logs on SaaS app hosts and load balancers, complementing application-level filtering.
Changes:
- Adds credential-path patterns to app-host proxy logging.
- Passes matching, shell-escaped filters to staging, production, and beta load balancers.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
| File | Description |
|---|---|
| saas/script/configure-lb-staging.sh | Applies filters to staging load balancers. |
| saas/script/configure-lb-production.sh | Applies filters to production load balancers. |
| saas/script/configure-lb-beta.sh | Applies filters to the beta load balancer. |
| saas/config/deploy.yml | Configures app-host proxy path filtering. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

kamal-proxy logs every request's raw path. The credentials Fizzy's routes filter with
filter_path_parameters(#3210) still land in the proxy logs and in Loki, on the app hosts and again on the load balancers: join codes, QR code links, session transfers, access-token reveals, public board and collection keys, and email change tokens.What changes:
saas/config/deploy.ymlsetsproxy.logging.filter_paths.configure-lb-*scripts pass the same patterns as--log-filter-path, escaped for the remote shell that ssh hands the command to. I checked that abash -cparse yields the exact patterns.Matching: board keys are secure tokens, so they're one segment and the column paths after them stay readable. Everything else is filtered to the end of the path, since a signed id can hold a decoded
%2F.Check: I ran these patterns through basecamp/kamal-proxy#258's filter against app_kamal#116's path fixture. No token text survived.
Load balancers: they run
basecamp/kamal-proxy:lb, which needs rebuilding with #258 before the scripts are rerun.Blocked on upstream. Do not merge yet: basecamp/kamal-proxy#258 adds
--log-filter-path, and basecamp/kamal#1973 exposes it asproxy: logging: filter_paths:. Until a kamal release with #1973 is in this app's bundle, Kamal rejects the key (proxy/logging: unknown key: filter_paths). Until the hosts' kamal-proxy has #258, the proxy rejects the flag. The kamal bump lands in this PR once the release is out, inGemfile.lockandGemfile.saas.lock.Rollout:
5520bd8to00cc4ff#258 and kamal with Fix lightbox transitionend listener leak #1973.kamal proxy rebooton each host, onto the new kamal-proxy.Lines logged before step 4 keep their raw paths, so the Loki delete cutoff for proxy lines is the deploy that finishes step 4.