Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return 'wac-allowed' HTTP header with GET & HEAD responses #246

Closed
dmitrizagidulin opened this issue Feb 12, 2016 · 5 comments
Closed

Return 'wac-allowed' HTTP header with GET & HEAD responses #246

dmitrizagidulin opened this issue Feb 12, 2016 · 5 comments
Assignees
Milestone

Comments

@dmitrizagidulin
Copy link
Contributor

dmitrizagidulin commented Feb 12, 2016

Problem/Motivation

There is currently no easy way for solid client code to determine if the current user has read/write/delete etc access to a given resource (short of reading and parsing the ACL chain, which is both discouraged, and not always possible due to ACL limitations on the .acl files themselves). (See solid/#45 - No way to find out if user is authorized to write to a container for context.)

Proposed Solution

An easy solution to this would be to add support to LDNode for the following:

With every response, the server should include an additional WAC-Allowe: header in the HTTP response.

For example, doing an unauthenticated HEAD request on a public read-only resource, would yield:

WAC-Allow: user="read", public="read"

Doing an HEAD request (while authenticated) to a resource you have full read/write/control access to:

WAC-Allow: user="read;write;control", public=""

(Note the public="" part -- the empty string denotes no access.)

@dmitrizagidulin
Copy link
Contributor Author

Updated issue to use Allow: header instead of CORS Allow-Methods

@dmitrizagidulin dmitrizagidulin changed the title Support Access-Control-*-Methods semantics for pre-flight requests Implement ACL checks for the Allow: header Feb 24, 2016
@rhiaro
Copy link

rhiaro commented Apr 7, 2016

+1

@dmitrizagidulin dmitrizagidulin self-assigned this Jan 4, 2017
@dmitrizagidulin dmitrizagidulin changed the title Implement ACL checks for the Allow: header Return 'wac-modes-allowed' HTTP header with GET & HEAD responses Jan 4, 2017
@dmitrizagidulin
Copy link
Contributor Author

Updated to use a custom WAC-Modes-Allowed HTTP header instead of Allow (which sounds like isn't appropriate for authentication-related matters).

@dmitrizagidulin
Copy link
Contributor Author

Updated it to reflect today's design discussion; return both the permissions of the user, and public permissions.

@dmitrizagidulin dmitrizagidulin changed the title Return 'wac-modes-allowed' HTTP header with GET & HEAD responses Return 'wac-allowed' HTTP header with GET & HEAD responses Aug 16, 2017
@RubenVerborgh RubenVerborgh added this to the 4.0.0 milestone Aug 16, 2017
@RubenVerborgh RubenVerborgh self-assigned this Aug 16, 2017
@RubenVerborgh
Copy link
Contributor

Implemented by #550.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants