Commit a546a77
committed
fix(messaging): allow only pull and acknowledge on the Hermes Pub/Sub route
The Google Chat preset for Hermes allowed POST to every Pub/Sub v1 path, and
the comment justified that width with a claim about glob matching that does
not hold. The L7 matcher is glob.match(pattern, ["/"], path), so `/` is the
only delimiter and `*` already spans the `:verb` suffix inside a segment.
The adapter issues exactly two Pub/Sub requests, `:pull` and `:acknowledge`,
so restrict the route to those. The gateway injects a bearer carrying the
pubsub scope here, and the previous rule also permitted publish and
subscription administration from inside the sandbox. Presets cannot template
the configured subscription, so the rules match the subscription path shape.
Drop the stale `:modifyAckDeadline` mention; the adapter never issues it.1 parent e55ca9b commit a546a77
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
0 commit comments