frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

We rewrote OpenFGA in pure Postgres

https://getrover.substack.com/p/how-we-rewrote-openfga-in-pure-postgres
41•wbadart•9h ago

Comments

ygouzerh•8h ago
Interesting read! It kind of a became a rule nowadays to never store logic in the database nowadays, but it's always refreshing to see when it could work. Please give us an update in few months of how it is going on the long run!
esafak•7h ago
I have similar concerns, like how to reconcile authz with search. Search wants to be its own thing, and so does authz. Pray tell how I'm supposed to get a paginated list of authorized results? You have to filter or have the search service call the authz service. Life is easier when the main database can handle everything.

We should develop and translate this extension to other databases.

babelfish•6h ago
Authorized search isn't difficult. Store authorized readers (people, groups, etc) on each result to pre-filter results, then post-filter results with an additional authorization check in case the authorization store was updated but the search results store was not. Context: I've built an authorized search solution before.
fleahunter•5h ago
Interesting point about authorized search. I’ve been in situations where the search and auth layers felt like they were constantly at odds. It’s like, how do you balance up-to-date permissions with an efficient retrieval system? I remember building a project where we kept a mapping table of users to permissions for quick lookups, but man, it got messy with data updates.

It’s cool that you’ve done this before. Did you face any performance bottlenecks when you’re post-filtering the results? I wonder if splitting it out into separate services would help keep things tidy or just add to the complexity.

This also makes me think about how often auth requirements change in agile environments. Like, do we even realize how quickly we need to adapt our models? Seems like a good moment to examine the tooling we use, especially if we could create an extension for other databases. The more I think about it, the more I see a push for this kind of flexibility in many applications.

jschorr•5h ago
> I remember building a project where we kept a mapping table of users to permissions for quick lookups, but man, it got messy with data updates.

Yep, as I mentioned above, its not an easy problem but once it is solved for you, it becomes "just" watching the events and performing the JOINs.

> especially if we could create an extension for other databases

See my video I linked above about the Postgres FDW: It does exactly this for SpiceDB and works seamlessly as-if there is a denormalized permissions table sitting in your Postgres, while still supporting the full array of complex authorization rules found in ReBAC.

babelfish•5h ago
Joey is the man and the domain expert on this for sure :-)
jschorr•4h ago
Happy to answer any other questions :D
ants_everywhere•5h ago
> I remember building a project where we kept a mapping table of users to permissions for quick lookups, but man, it got messy with data updates.

Do you mean literally users to permissions?

Usually users map into groups, groups are subgroups of each other, and permissions are granted to groups.

So you can only see the financial data if you're in financial-report-preparers. Can Bob see the report? That depends on if he's an indirect or direct member of financial-report-preparers.

This is different from RBAC where Bob might have an admin or manager role directly. If he has admin access it's because he's a member of a certain group of employees that's a subgroup of another group of employees who all have admin access etc. similarly for groups of end users.

It would be a combinatorial explosion to try to enumerate the permissions of a given user. If people are having lot of syncing problems they may not have granular enough groups.

Groups make it safe. Groups are best.

jschorr•6h ago
Reconciling externalized authz with search is actually quite a challenging problem. For standard externalized authz, the recommendation is some form of pre-filtering or post-filtering [1], for which we actually built LookupResources (pre-filtering) and CheckBulkPermission (post-filtering) into SpiceDB.

However, as you mentioned, life is easier when the main database can handle everything, so we actually built a solution in that space called Materialize [2], which heavily denormalizes the authorization data and allows for joining within application databases such as Postgres. My colleague Evan actually put together a really cool video about using it with Gitea [3].

Recognizing that even with Materialize, however, the need to consume events can be a bit annoying, I've been doing some work to allow Postgres itself to do native JOINs against SpiceDB (and other operations). I demo it briefly in our recent announcements video [4] and I think it effectively solves this problem within Postgres, while still allowing for all the benefits (scale, performance, redundancy, distribution) of externalized authz.

[1]: https://authzed.com/docs/spicedb/modeling/protecting-a-list-...

[2]: https://authzed.com/products/authzed-materialize

[3]: https://www.youtube.com/live/u3i1SEd9Ll8?si=mCz5mZterxthoEwj

[4]: https://www.youtube.com/live/uz_gxz3whS0?si=g4NUZAIltYVyFzYj...

Disclaimer: I'm cofounder and CTO at AuthZed and we build SpiceDB and Materialize

vrama628•4h ago
Have you looked into Local Authorization? https://www.osohq.com/docs/develop/facts/local-authorization it lets you apply authz filters to paginated search over a database, even if some of the data the authz depends on isn't stored in the database
bsder•6h ago
I originally read that as OpenFPGA (note the extra P) and wondered what kind of eldritch abomination they had created ...
nocman•5h ago
Oh, good, I'm not the only one then.
forks•6h ago
> The big problem that we kept running into was keeping everything in sync all the time. Every time we add a new user, organization, repository, etc. in our database, we also had to add the corresponding tuples in OpenFGA.

This is a fundamental problem with all Zanzibar-inspired authorization systems[0] that require centralizing ~all authorization data and led us @ Oso to build a more flexible system[1] that grants more control over what authorization-relevant data you centralize vs. decide keep locally.

0: https://www.osohq.com/post/authorization-for-the-rest-of-us

1: https://www.osohq.com/docs/develop/facts/local-authorization

disclosure: founding engineer at Oso

Evaluating the Infinity Cache in AMD Strix Halo

https://chipsandcheese.com/p/evaluating-the-infinity-cache-in
30•zdw•1h ago•9 comments

rlsw – Raylib software OpenGL renderer in less than 5k LOC

https://github.com/raysan5/raylib/blob/master/src/external/rlsw.h
149•fschuett•9h ago•32 comments

If you'd built a "tool" that stupid, why would you advertise the fact?

https://svpow.com/2025/10/13/if-youd-built-a-tool-that-stupid-why-would-you-advertise-the-fact/
11•surprisetalk•1w ago•0 comments

Show HN: AutoLearn Skills for self-improving agents

https://www.autolearn.dev
13•toobulkeh•3h ago•8 comments

Power over Ethernet (PoE) basics and beyond

https://www.edn.com/poe-basics-and-beyond-what-every-engineer-should-know/
136•voxadam•5d ago•89 comments

LLMs can get "brain rot"

https://llm-brain-rot.github.io/
341•tamnd•15h ago•195 comments

Replacing a $3000/mo Heroku bill with a $55/mo server

https://disco.cloud/blog/how-idealistorg-replaced-a-3000mo-heroku-bill-with-a-55-server/
532•jryio•9h ago•374 comments

Show HN: Modshim – A new alternative to monkey-patching in Python

https://github.com/joouha/modshim
38•joouha•5d ago•8 comments

OpenBSD 7.8

https://cdn.openbsd.org/pub/OpenBSD/7.8/ANNOUNCEMENT
122•paulnpace•3h ago•28 comments

Ask HN: Our AWS account got compromised after their outage

249•kinj28•14h ago•63 comments

Wikipedia says traffic is falling due to AI search summaries and social video

https://techcrunch.com/2025/10/18/wikipedia-says-traffic-is-falling-due-to-ai-search-summaries-an...
351•gmays•1d ago•308 comments

The Hidden Engineering of Niagara Falls

https://practical.engineering/blog/2025/10/21/the-hidden-engineering-of-niagara-falls
90•chmaynard•7h ago•2 comments

Neural audio codecs: how to get audio into LLMs

https://kyutai.org/next/codec-explainer
348•karimf•17h ago•103 comments

NASA chief suggests SpaceX may be booted from moon mission

https://www.cnn.com/2025/10/20/science/nasa-spacex-moon-landing-contract-sean-duffy
273•voxleone•17h ago•774 comments

Mathematicians have found a hidden 'reset button' for undoing rotation

https://www.newscientist.com/article/2499647-mathematicians-have-found-a-hidden-reset-button-for-...
122•mikhael•5d ago•81 comments

ChatGPT Atlas

https://chatgpt.com/atlas
623•easton•12h ago•587 comments

Getting DeepSeek-OCR working on an Nvidia Spark via brute force with Claude Code

https://simonwillison.net/2025/Oct/20/deepseek-ocr-claude-code/
149•simonw•1d ago•31 comments

60k kids have avoided peanut allergies due to 2015 advice, study finds

https://www.cbsnews.com/news/peanut-allergies-60000-kids-avoided-2015-advice/
327•zdw•1d ago•293 comments

Build your own database

https://www.nan.fyi/database
444•nansdotio•13h ago•66 comments

Erowid - Documenting the Complex Relationship Between Humans and Psychoactives

https://www.erowid.org
47•slow_typist•9h ago•2 comments

Researchers complete first human trial on viability of enteral ventilation

https://newatlas.com/disease/butt-breathing-ignobel-prize/
36•mustaphah•11h ago•43 comments

Drawing Text Isn't Simple: Benchmarking Console vs. Graphical Rendering

https://cv.co.hu/csabi/drawing-text-performance-graphical-vs-console.html
6•todsacerdoti•1w ago•8 comments

Minds, brains, and programs (1980) [pdf]

https://home.csulb.edu/~cwallis/382/readings/482/searle.minds.brains.programs.bbs.1980.pdf
65•measurablefunc•1w ago•24 comments

What do we do if SETI is successful?

https://www.universetoday.com/articles/what-do-we-do-if-seti-is-successful
136•leephillips•1d ago•231 comments

Understanding conflict resolution and avoidance in PostgreSQL: a complete guide

https://www.pgedge.com/blog/living-on-the-edge
31•birdculture•1w ago•6 comments

The death of thread per core

https://buttondown.com/jaffray/archive/the-death-of-thread-per-core/
99•ibobev•1d ago•39 comments

Doomsday scoreboard

https://doomsday.march1studios.com/
196•diymaker•9h ago•95 comments

Show HN: Katakate – Dozens of VMs per node for safe code exec

https://github.com/Katakate/k7
101•gbxk•14h ago•36 comments

KDE Connect: Enabling communication between all your devices

https://community.kde.org/KDEConnect
408•snthd•1w ago•166 comments

Foreign hackers breached a US nuclear weapons plant via SharePoint flaws

https://www.csoonline.com/article/4074962/foreign-hackers-breached-a-us-nuclear-weapons-plant-via...
353•zdw•14h ago•249 comments