API tokens with write scopes so third parties can build frontends #209
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Third parties should be able to build their own frontends and clients against PodRadar. Session cookies are the wrong vehicle for that:
SameSite=Laxkeeps them off cross-site requests, browsers block third-party cookies, and every origin would have to be registered inPODRADAR_CORS_ALLOWED_ORIGINS.API tokens (
Authorization: Bearer pdr_…) have no CSRF exposure, so they can be served to any origin. Today that chain is read-only and limited to a small whitelist of endpoints, built forpodradar-mcp.Proposal
readandwrite), chosen when the token is created; existing tokens stay read-only./api/**surface behind the token chain, with write endpoints requiring thewritescope. Decide explicitly which endpoints stay session-only (account/password, token management, admin).Authorizationallowed, no credentials. The cookie-based CORS allow-list stays as it is.Open questions
Follows from the same-origin change in the PR for
fix/csrf-same-origin.