Authenticating with ALB and External ID Providers While Keeping Access Control Simple in Laravel Without Gate/Policy — Ryosuke Sasaki
summary
Describes using AWS ALB with an external OIDC JWT identity provider so the app receives verified user claims in HTTP headers, then implementing role-based access control in Laravel with Casbin instead of Laravel Gate/Policy. Explains middleware that verifies JWT signatures and issuer, extracts roles from the token, and enforces DB-backed Casbin rules; notes ALB cost and IDP setup complexity, recommends Terraform for ALB and s2-proxy for local development, and warns about tightening JWT and network restrictions.
AI-written summary · about
