- URIs are subject to authorization decisions
- URIs offer a hierarchical authorization scheme
- additionally, the limited list of allowed actions (verbs) leads way to a simple definition of ACLs (Access Control List), more or less the same as for file systems (read,write etc etc)
One thing to consider is the old question of attribute based security decisions. A real world example is a blog where the author first checks the comments before publishing them. The attribute would be whether the comment already has been reviewed or not.
There are 2 possibilities to do do the authorization check in a declarative manner:
- either the ACL is attached directly to the resource
- or the resources (posts to be reviewed) are stored in another place of the URL hierarchy, e.g. '/comments/review' instead of '/comments'. The ACL would be attached to the directory instead of the resource itself (directory being a resource in its on right)
ACL(resource):
- reviewer:read/write/delete (this allows to move)
- author: read/write
Keine Kommentare:
Kommentar veröffentlichen