TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Gatehouse – a composable, async-friendly authorization policy framework in Rust

76 pointsby hardbyteabout 2 months ago

7 comments

jzelinskieabout 2 months ago
This project looks like a very nice lightweight way to implement policy in a Rust application; I really like the ergonomics of the builder. Despite being very different systems, the core permissions check being the same signature as a call to SpiceDB[0] (e.g. the subject, action, resource, and context) shows the beauty of the authorization problem-domain regardless of the implementation.<p>I would like to add some color that a policy engine is not all you need to implement authorization for your applications. Without data, there&#x27;s nothing for a policy engine to execute a policy against and not all data is going to be conveniently in the request context to pass along. I&#x27;d like to see more policy engines take stances on how their users should get that data to their applications to improve the DX. Without doing so, you get the OPA[1] ecosystem where there are bunch of implementations filling the gap as an afterthought, which is great, but doesn&#x27;t give a first-class experience.<p>[0] <a href="https:&#x2F;&#x2F;spicedb.io" rel="nofollow">https:&#x2F;&#x2F;spicedb.io</a><p>[1] <a href="https:&#x2F;&#x2F;openpolicyagent.org" rel="nofollow">https:&#x2F;&#x2F;openpolicyagent.org</a>
评论 #43467126 未加载
Thaxllabout 2 months ago
Is it standard to have 2k+ loc in a lib.rs file? I&#x27;m looking at Rust code and it seems that everything goes in there. People usually don&#x27;t break that down?
评论 #43466658 未加载
评论 #43467968 未加载
mdanielabout 2 months ago
command-f &quot;license&quot; :-(<p>I do see &lt;<a href="https:&#x2F;&#x2F;github.com&#x2F;thepartly&#x2F;gatehouse&#x2F;blob&#x2F;v0.1.2&#x2F;Cargo.toml#L5" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;thepartly&#x2F;gatehouse&#x2F;blob&#x2F;v0.1.2&#x2F;Cargo.tom...</a>&gt; but my experience with package manager license declaration is that it is almost always &quot;yeah, yeah, default, whatever&quot; versus an explicit choice. They are also invisible to the GitHub license widget, which places the burden upon the user to go spelunking around in the code to know for sure
评论 #43467913 未加载
评论 #43467504 未加载
codetrotterabout 2 months ago
What is the advantage of having the policy checking be an async function? From a brief look (framework itself and one of the examples provided in the examples directory) it seems that you’d typically be doing all I&#x2F;O operations up front before invoking the policy checker, and that doing the policy check does not itself involve any I&#x2F;O.<p>I only looked over the code quickly so I’m probably overlooking something.<p>It would be neat to get the motivation for each of the functions that are async being async instead of just “normal” functions.
评论 #43466582 未加载
mparisabout 2 months ago
Very cool project. I’ve used the cedar crate for similar use cases in the past but it’s always bugged me that it requires writing the policies in yet another language.<p>Will definitely check this out.
评论 #43466649 未加载
评论 #43467949 未加载
esafakabout 2 months ago
What&#x27;s the persistence layer?
评论 #43466660 未加载
评论 #43467963 未加载
hardbyteabout 2 months ago
async-friendly Rust native library with decision traceability.