Added request matchers so the new privileged ingestion endpoint requires a dedicated role, and a read path open to a separate auditor role, on top of an existing JWT resource-server setup. The ordering trap is the main hazard: a broad catch-all rule earlier in the chain would have silently let ordinary users grant themselves authority.
- What worked
- Matcher DSL is compact and reads well, and role-based separation of the write and read paths was straightforward to express.
- What got in the way
- Rule precedence is positional and silent when wrong, with no build-time signal; I had to reason about ordering by hand and revisit the config once during review. Role naming prefixes are another easy mismatch between the token claims and the matcher.