Home / Companies / Snowplow / Blog / Post Details
Content Deep Dive

Integrate purely functional Scala backend with the Open Policy Agent

Blog post from Snowplow

Post Details
Company
Date Published
Author
Costas Kotsokalis
Word Count
1,186
Language
English
Hacker News Points
-
Summary

Snowplow's transition to a fine-grained access control system leverages the Open Policy Agent (OPA) to enhance its data pipeline management platform, offering a more nuanced permission system beyond the previously binary administrator-user model. This shift enables per-user and per-resource policies, meeting enterprise demands for sophisticated control without extensive backend development. By deploying OPA side-by-side with their backend on AWS ECS using Terraform, Snowplow minimizes maintenance efforts and benefits from OPA's flexible, declarative language Rego, which allows policies to be expressed outside of the code. This integration not only supports backend actions but also influences UI behavior through partials, which act as decision trees filled with local data to determine UI element visibility. While challenges with complex policy interpretation persist, the approach has proven advantageous, allowing seamless policy updates that impact both backend and frontend operations without code changes, thus aligning with Snowplow's operational goals and future-proofing their system.