Skip to content

feat: add route-to-scope map with report-only rollout mode - #6

Merged
paullatzelsperger merged 2 commits into
mainfrom
feat/route_scope_mapping
Jul 10, 2026
Merged

feat: add route-to-scope map with report-only rollout mode#6
paullatzelsperger merged 2 commits into
mainfrom
feat/route_scope_mapping

Conversation

@paullatzelsperger

@paullatzelsperger paullatzelsperger commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a static YAML route→scope map (ROUTES_FILE) enforcing OAuth2 scope requirements per HTTP method and path, evaluated against the X-Forwarded-Method/X-Forwarded-Uri headers Traefik sends (see routes.example.yaml)
  • Path rules use segment globs (* = one segment, trailing ** = any remainder), first match wins, with a configurable default: allow|deny
  • anyOf scope requirements are satisfied via scope implication following the EDC grammar <api>:[<resource>:]<action>: admin ⊇ write ⊇ read, and api-level/wildcard scopes cover resource-level requirements
  • ENFORCE_ROUTES=false (default) runs report-only: route-map violations are logged but only the legacy ?scope= check decides — allowing a safe rollout before flipping enforcement on
  • Legacy verbatim ?scope= checks are unchanged and documented as deprecated
  • Reworks the publish workflow: per-platform native builds (amd64 + arm64) pushed by digest, followed by a manifest-merge job; metadata-action tagging and pinned action SHAs

🤖 Generated with Claude Code

paullatzelsperger and others added 2 commits July 10, 2026 08:37
Split the Docker publish into per-platform build jobs (amd64 on
ubuntu-latest, arm64 on a native arm runner) that push by digest, then a
merge job that assembles the multi-arch manifest. Adds metadata-action
based tagging, pinned action SHAs, and per-ref concurrency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adds a static YAML route map (ROUTES_FILE) that enforces OAuth2 scope
requirements per method and path, evaluated against the
X-Forwarded-Method/X-Forwarded-Uri headers Traefik sends:

- segment-glob path patterns (* = one segment, trailing ** = remainder)
  with first-match-wins evaluation and a configurable default decision
- scope implication following the EDC grammar
  <api>:[<resource>:]<action>, with admin > write > read and api-level/
  wildcard scopes covering resource-level requirements
- ENFORCE_ROUTES=false (default) runs report-only: violations are
  logged but only the legacy ?scope= check decides, enabling a safe
  rollout before flipping enforcement on

Legacy verbatim ?scope= checks are unchanged and documented as
deprecated in the README.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@paullatzelsperger
paullatzelsperger merged commit 43ca21c into main Jul 10, 2026
3 checks passed
@paullatzelsperger
paullatzelsperger deleted the feat/route_scope_mapping branch July 10, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants