Forward allowlisted query params for remote providers #146
Reference in New Issue
Block a user
Delete Branch "benvin/remote-query-forwarder"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Remote proxying drops the query string, so paginated JSON APIs (e.g. Galaxy
versions/?limit=&offset=) cannot be served. Forwarding the raw query would let arbitrary params mint unbounded cache entries and bypass path-anchored blocklists.provider.QueryForwarder, mapping each forwarded param for a path to a validator that canonicalises or rejects its valuepath?...query variantsQueryForwarderunchangedpathbeforeengine.Fetch, soClassifier.ClassifyrunsBlocklist/Patterns/ImmutablePatterns/MutablePatternsregexes againstpath?limit=10.$-anchored patterns stop matching: a blocklist like\.exe$is bypassed with?limit=1, and aPatternsallowlist denies paginated requests → classify and apply patterns on the bare path, key cache/upstream on the canonical path+query.limit=10,010,+10,1e1and every distinctoffset=Nbecome separate cache keys, each causing an upstream fetch, an S3 object and a DB row, with no auth on remote reads → let the forwarder own value validation (e.g.ForwardedQueryreturns name→validator, digits-only for limit/offset) and drop non-conforming values.Evict("a/versions/")no longer dropsa/versions/?limit=10variants → document thata/versions/*is needed, or evict thepath?*variants too.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.