TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Distributed Authorization

150 点作者 AnhTho_FR大约 1 年前

10 条评论

simonw大约 1 年前
There&#x27;s an interesting section here about one of my favourite challenges in authorization: how to efficiently return a list of things that the current user has permission to access, without running a &quot;can_access()&quot; permission check on every single one of them (which is bad if you have thousands of items and you want to paginate them).<p>Their solution is to let you configure rules that get turned into SQL fragments that you can run against your own database: <a href="https:&#x2F;&#x2F;www.osohq.com&#x2F;docs&#x2F;guides&#x2F;integrate&#x2F;filter-lists#list-filtering-with-decentralized-data" rel="nofollow">https:&#x2F;&#x2F;www.osohq.com&#x2F;docs&#x2F;guides&#x2F;integrate&#x2F;filter-lists#lis...</a> - example Rails app here: <a href="https:&#x2F;&#x2F;github.com&#x2F;osohq&#x2F;rails_list_filtering_sample_app">https:&#x2F;&#x2F;github.com&#x2F;osohq&#x2F;rails_list_filtering_sample_app</a><p>A team I worked with in the past came to the same conclusion - turning authorization rules into WHERE clauses is a very efficient way to solve this problem, if you can figure out a clean way to do it.
评论 #40054080 未加载
评论 #40054123 未加载
评论 #40055077 未加载
评论 #40056996 未加载
评论 #40053508 未加载
评论 #40060458 未加载
评论 #40054068 未加载
评论 #40165251 未加载
评论 #40056588 未加载
withinboredom大约 1 年前
I tend to build the &quot;ownership&quot; model whenever I can. It works extremely well and has a few simple rules:<p>1. a user can own an entity&#x2F;row&#x2F;unit&#x2F;whatever. They have full control over this unit.<p>2. a user can share ownership with another user&#x2F;role.<p>3. a user can share various &quot;rights&quot; over any units they own -- CRUD, for example -- for any user&#x2F;role.<p>4. a user can only interact with any unit they have a right to.<p>This can be implemented through a simple db table (or inline in the data itself) and doesn&#x27;t depend on much. Once you build the middleware, you don&#x27;t even need to think about the authorization layer.
评论 #40054594 未加载
评论 #40054197 未加载
评论 #40054134 未加载
ogazitt大约 1 年前
Congrats on the launch!<p>[Disclosure: I&#x27;m one of the co-founders of Aserto, the creators of Topaz].<p>The problem of data filtering is indeed a huge part of building an effective authorization system. Partial evaluation is one way of doing it, although with systems like OPA [0] it requires a lot of heavy lifting (parsing the returned AST and converting it into a WHERE clause). Looking forward to seeing how turnkey that can be with Oso.<p>With that said, there are applications where you really want the data close to the authorization engine. With a ReBAC model, you can easily find the objects that a user has access to, or the users that have access to an object, by walking the relationship graph. That&#x27;s the approach we&#x27;ve taken with Topaz [1].<p>Funny timing - a few days ago we published a blog post on that very topic! [2]<p>[0] <a href="https:&#x2F;&#x2F;openpolicyagent.org" rel="nofollow">https:&#x2F;&#x2F;openpolicyagent.org</a><p>[1] <a href="https:&#x2F;&#x2F;topaz.sh" rel="nofollow">https:&#x2F;&#x2F;topaz.sh</a><p>[2] <a href="https:&#x2F;&#x2F;www.aserto.com&#x2F;blog&#x2F;how-rebac-helps-solve-data-filtering" rel="nofollow">https:&#x2F;&#x2F;www.aserto.com&#x2F;blog&#x2F;how-rebac-helps-solve-data-filte...</a>
samjs大约 1 年前
Hey all!<p>I&#x27;m Sam, cofounder + CTO at Oso.<p>Thank you all for the great discussions going on here. If folks are interested in either learning more about the product or working on these kinds of problems, you can email me directly at sam [at] osohq.com.
augunrik大约 1 年前
Kinda sounds like OPA (Open Policy Agent) [1], but a different implementation.<p>[1] <a href="https:&#x2F;&#x2F;www.openpolicyagent.org&#x2F;docs&#x2F;latest&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.openpolicyagent.org&#x2F;docs&#x2F;latest&#x2F;</a>
valenterry大约 1 年前
&gt; Suppose you decide to add teams to gitcloud, so different teams in an organization can have different permissions. Will you be able to find all the functions and queries you need to modify in order to make teams work properly? Do you want to have to do that? &gt; This is why we introduced Polar, our declarative DSL for authorization. Polar allows you to separate your authorization logic from your application logic and express it in a language that is purpose built for authorization. A simple Polar policy looks something like this:<p>First, I appreciate that it is the Polar &quot;programming language&quot; and not yet another kind of stupid YAML DSL.<p>However: you seem to target developers. Why do you force me to leave my IDE and use your &quot;rules editor&quot;? Can I not write all those things in my IDE, with all the support it brings, and integrate this into my CICD flow? (yes, there is the .polar file, but why force me to jump through hoops?)<p>Then, why did you create a new <i>DSL</i> and not a merely a (de-)serializable <i>datastructure</i> (which will indeed look like a dsl)? One, that is powerful enough to represent the capabilities you need. Then, I could in fact use any language (library) of my choice and create the rules from this language, which just has to create the datastructure.<p>Or, backwards: why do you think authorization is so special that it deserves a custom language? Is it more special than performance-testing, logging, auditing, debugging, metrics and so on?<p>Apart from that, I really like the `yes, if` idea! Would be nice to hear a bit more about that (unfortunately, the article pretty much ends there). Such as: how to deal with actions that change things and can (or must) potentially be run before the authorization is completed and such.
评论 #40053933 未加载
评论 #40053852 未加载
ebolyen大约 1 年前
Slightly tangential, but is there any hope of seeing Polar return as a (maintained) open source system?<p>I absolutely love the concept of using a logic language for authorization, and I think Polar&#x27;s aesthetic qualities make it significantly more approachable for most people (over Prolog&#x2F;Datalog).<p>But even without the authorization problem, Polar is just... really nice looking. It would be awesome to be able to use it as its own language outright.
评论 #40058186 未加载
doh大约 1 年前
Quick note for the osohq team: The &quot;Read the docs&quot; button leads to 404
评论 #40053759 未加载
renszarv大约 1 年前
Is it self hosted? I can&#x27;t see any docker image
simonw大约 1 年前
This is a product launch. Full title: &quot;Authorization is still a nightmare for engineers: Launching Distributed Authorization&quot;
评论 #40054578 未加载