Authorization infrastructure for Milo's business operating system backed by OpenFGA - enabling fine-grained, relationship-based access control across business entities like customers, products, agreements, and organizational resources.
This project provides the authorization backbone for the Milo business operating system, which uses Kubernetes APIServer patterns to manage business entities for product-led B2B companies. The auth provider bridges Milo's business APIs with OpenFGA's relationship-based authorization engine to answer complex business questions like:
- "Can this sales rep view pricing for customers in this project?"
- "Can this account manager modify agreements for this organization?"
- "Which product features can this customer access based on their entitlements?"
- Business Resource Authorization - Protects Milo's resources using relationship-based policies
- Organizational Hierarchies - Supports complex business structures with permission inheritance across organizations and projects
- Dynamic Permission Models - Automatically builds authorization models as new resource types are registered in Milo
- Real-time Access Control - Provides webhook-based authorization that integrates seamlessly with Milo's Kubernetes-based APIs
- Business Resource Registration:
ProtectedResource
CRDs define what resources should be protected and what permissions are available (view, edit, delete, manage) - Authorization Model Sync: The system automatically builds OpenFGA type definitions based on registered resources
- Role Management:
Role
CRDs define roles (Sales Rep, Account Manager) with collections of permissions - Access Binding:
PolicyBinding
CRDs create relationships between subjects, roles, and target resources - Runtime Authorization: Webhook servers evaluate access requests by querying OpenFGA relationship graphs
- Inheritance Support: Resources inherit permissions through organizational hierarchies (Organization → Project → Customer)
# Open in VSCode, accept "Reopen in Container" prompt, then:
make dev-setup
git clone <repository>
cd auth-provider-openfga
make dev-setup # Requires Docker + Go + Make
make dev-setup # Complete environment setup
make dev-deploy # Deploy/redeploy application
make dev-status # Check environment status
make dev-logs # View application logs
make test # Run tests
Document | Purpose |
---|---|
Development Guide | Complete setup, workflow, and troubleshooting |
Architecture Guide | System design, components, and data flow |
API Reference | Custom resources and webhook specifications |
Contributing Guide | Code standards, PR process, and testing |
├── config/ # Kubernetes manifests and Kustomize overlays
│ ├── default/ # Base application configuration
│ ├── bootstrap/ # Infrastructure (cert-manager, OpenFGA)
│ ├── authz-webhook/ # Authorization webhook deployment
│ └── local-dev/ # Development environment
├── internal/ # Application logic
│ ├── controller/ # Kubernetes controllers
│ ├── webhook/ # Authorization webhook servers
│ └── openfga/ # OpenFGA integration layer
├── cmd/ # CLI entrypoints (manager, webhook)
├── test/ # E2E tests
└── docs/ # Detailed documentation
make dev-setup
- Set up environment- Make your changes
make test && make test-e2e
- Verify changes- Submit PR
For detailed guidelines, see Contributing Guide.