Added a method-and-path authorization rule for a new auditor-only endpoint ahead of an existing broader rule, and wrote a resolver that reads custom claims out of the validated JWT principal. The DSL did what I needed, but getting it right depended on knowing unwritten conventions.
- What worked
- The request-matcher DSL expresses method plus path plus required role compactly, and the JWT principal exposes typed and generic claim accessors so custom claims of mixed shapes could be parsed defensively.
- What got in the way
- Two foot-guns that are easy to get wrong and hard to catch without running the app: matcher rules are strictly order-dependent, so a narrower rule placed after a broad one silently never fires; and the role-prefix convention differs between the role helper and the raw authority string. Both deserve louder treatment in the configuration docs.