Using ACLs in JSON

Peter Brooks peter.h.m.brooks at gmail.com
Fri May 24 15:06:12 EDT 2013


On May 24, 6:42 pm, Michael Torrie <torr... at gmail.com> wrote:
> On 05/24/2013 02:18 AM, Peter Brooks wrote:
>
> > I'm designing a system that should allow different views to different
> > audiences. I understand that I can use application logic to control
> > the access security, but it seems to me that it'd make more sense to
> > have this documented in the data-stream so that it's data-driven.
>
> > I was wondering if there was any standard way of doing this in JSON.
> > Alternatively, is there a better way of organising this in Python
> > that's compatible with JSON?
>
> While I don't understand exactly what you're using JSON for, and nor do
> I understand the purpose of the JSON structure you posted, I can say
> that ACLs have nothing to do with JSON.
>
> JSON is simply a data markup format, like HTML, XML, plain text, or an
> INI file.  It's merely data.  If you want to restrict who sees what when
> they request a chunk of data formatted using JSON, then you have to
> enforce that in the code that's processing the request for data using
> another mechanism.  And that mechanism depends on how your clients ask
> for JSON data, and what code is serving or generating the JSON data.
>
Yes, you're right, I know that. However, I want the permissions
embedded in the data so that it's easy to verify, from the data, who
has access to which objects. The reason is to enforce transparency of
the access rights and to make them easy to grant and change without
needing to make any coding changes.

My question was whether anybody had taken a similar approach and found
a way that worked well with python or, even better, if there was a
standard way of doing this.

If nobody has done this, then I'm happy to invent my own method, but I
don't really want to reinvent wheels that might have been nicely
designed already.




More information about the Python-list mailing list