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

WebAC ACL Interface #4

Merged
merged 1 commit into from Aug 28, 2015
Merged

WebAC ACL Interface #4

merged 1 commit into from Aug 28, 2015

Conversation

whikloj
Copy link
Member

@whikloj whikloj commented Aug 25, 2015

No description provided.

* @author whikloj
* @since 2015-08-25
*/
public interface AbstractFedoraWebAcl {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why "Abstract"FedoraWebAcl? Any reason not to drop the "Abstract" prefix?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an interface. It is in the Fedora codebase. Why does it have either Abstract or Fedora as part of its name?

@peichman-umd
Copy link
Contributor

Would this interface be able to support a method that takes a resource and/or an agent (as URIs) and returns the authorization(s) that mention that resource and/or agent? Alternatively, a method that returned the list of authorizations in the ACL, and the client class could iterate over that list to find the authorizations that were relevant to its interests? If either of these are desired, I would suggest an additional interface/class to represent a single authorization ("authorization" being the WebAC terminology for a single rule relating an agent(Class) to an accessTo(Class) resource with an access mode.

@awoods
Copy link
Member

awoods commented Aug 25, 2015

@peichman-umd, Although per the WebAC "spec", agents are represented as URIs. My understanding was that most installations would only be able to support Strings.

How are you defining "authorizations"? I thought this interface represented a single "authorization", i.e. all principals that have these modes on these resources (and resource classes).

@peichman-umd
Copy link
Contributor

@awoods, The way I read the WebAC "spec", an ACL is a graph containing one or more acl:Authorization resources, which all seem to be represented as blank nodes with acl:accessTo, acl:agent, acl:mode, etc. properties. Thus I was assuming that an ACL class would represent that graph.

Maybe this is a case of terminological confusion? If so, I would suggest renaming this interface to something like WebACAuthorization.

@peichman-umd
Copy link
Contributor

@awoods, For the issue of representing agents as strings or URIs, would the new acct: URI scheme (RFC 7565) help at all? It is specifically designed to make no commitment about how the URIs are resolved, it is just for naming accounts on a particular system. The only issue might be what to put in the host section of the URI.

@awoods
Copy link
Member

awoods commented Aug 25, 2015

From: https://wiki.duraspace.org/display/FF/2015-07-22+-+WebAccessControl+Authorization+Delegate+Planning+Meeting
"Probably not using URIs for agents at least at first"

@ajs6f
Copy link
Contributor

ajs6f commented Aug 25, 2015

Those acl:Authorizations don't have to be blank nodes, right? They could be something more sane, like hash-URI nodes.

@whikloj
Copy link
Member Author

whikloj commented Aug 25, 2015

My grasp of some of the W3C lingo is weak. But based on this
"Note that there are properties of an Authorization which allow you to specify who gets access either by giving a relation to a specific user or a different relation to a class of user. The same technique is used for expressing to which resource or class of resources access is being granted."

My assumption is that one Authorization contains:

  • 1 or more triples with a predicate from the set [acl:agent, acl:agentClass]
  • 1 or more triples with a predicate from the set [acl:accessTo, acl:accessToClass]
  • 1 triple with the predicate acl:mode

@awoods
Copy link
Member

awoods commented Aug 25, 2015

@whikloj, I had a similar representation in mind. I think we need to take a moment and decide on a clear, clean, consistent perspective on how Authorizations are represented in the repository.

@peichman-umd
Copy link
Contributor

@ajs6f Yes, the Authorizations could definitely be hash-URI nodes.
@whikloj Yes, that fits with my reading of Authorization as well.

@whikloj
Copy link
Member Author

whikloj commented Aug 25, 2015

Ok, I can change the name to WebACAuthorization.

As for your first question @peichman-umd.

As the acl:mode will be the same for all users and resources referenced by this ACL.
The only check is whether the agent exists in the ACL. Not sure this is the right place for that check.

@awoods
Copy link
Member

awoods commented Aug 25, 2015

Is there a reason to even create hash resources? In other words, does an ACL resource need to contain a sub-graph of Authorizations, versus simply having all of the triples @whikloj described attached to the ACL resource itself?

@whikloj
Copy link
Member Author

whikloj commented Aug 26, 2015

@awoods, I don't think so. Based on my understanding we would have simple triples on the Acl resource where the Acl resource would always be the subject.

@peichman-umd
Copy link
Contributor

@whikloj: The way I have been reading the W3C spec is that the ACL is never actually the subject of any triples. There is an acl:acl property on a protected resource that identifies the location of its ACL, but that is just a URI to be retrieved.

@awoods
Copy link
Member

awoods commented Aug 26, 2015

@peichman-umd, are you saying that your understanding is that "protected resources" have a property that points to their ACL?

@peichman-umd
Copy link
Contributor

@awoods That was my understanding of this section of the spec: http://www.w3.org/wiki/WebAccessControl#Modifying_Access_Control_information

@whikloj
Copy link
Member Author

whikloj commented Aug 26, 2015

@peichman-umd, yes I see what you mean.
But then I can't understand how we handle the accessToClass functions. If the acl is not the subject of the triple that provides acl:accessToClass to rdf:type, what is?

@peichman-umd
Copy link
Contributor

@whikloj, I think it is the Authorization. Note that the ontology does not actually define a class for the ACLs, which suggests that they are not intended to be RDF resources themselves. Instead, I think the ACL is supposed to be used as just a URL where a graph of authorizations can be retrieved.

@ajs6f
Copy link
Contributor

ajs6f commented Aug 26, 2015

I have no understanding of nor opinion about this issue, but just from the diction and tone of this conversation, perhaps this is a question best put to whomever is writing or maintaining WebAC?

@peichman-umd
Copy link
Contributor

Also, from the WAC and LDP section:

So even though the acl file is neither an LDPR nor an LDPC it should be editable using the same methods.

@ajs6f
Copy link
Contributor

ajs6f commented Aug 26, 2015

This seems a bit confusing: maybe check with the (ex-)LDP WG for some clarification? @azaroth42?

* Set/Modify the acl:agents of this ACL.
* @param users a Set of agents
*/
void setUsers(Set<String> users);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use acl:Agent terminology? If so, are userIds different than groupIds?

* Set/Modify the rdf:types to apply this ACL to.
* @param objectClasses set of RDF objects
*/
void setObjectClasses(Set<RDF> objectClasses);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@peichman-umd
Copy link
Contributor

👍

1 similar comment
@acoburn
Copy link
Contributor

acoburn commented Aug 27, 2015

👍

@whikloj
Copy link
Member Author

whikloj commented Aug 27, 2015

I agree, what fine work. Someone press the button.

@awoods
Copy link
Member

awoods commented Aug 27, 2015

Someone should squash the commits before pressing the button.

@whikloj
Copy link
Member Author

whikloj commented Aug 27, 2015

I'll give it a try, never done that before.

@awoods
Copy link
Member

awoods commented Aug 27, 2015

i.e.

git checkout --track origin pull/4
git log
git rebase -i

"pick" first, "s" others
update comment

git push origin pull/4:master

Assuming you already did a "git pull" with the following ".git/config" update:

[remote "origin"]
        url = https://github.com/fcrepo4-labs/fcrepo-module-auth-webac.git
        fetch = +refs/heads/*:refs/remotes/origin/*
        fetch = +refs/pull/*/head:refs/remotes/origin/pull/*

@whikloj
Copy link
Member Author

whikloj commented Aug 27, 2015

I hope that works.

@awoods
Copy link
Member

awoods commented Aug 27, 2015

I does not look like it. Now I see 7 commits instead of one squashed commit. Was that intentional, @whikloj?

@whikloj
Copy link
Member Author

whikloj commented Aug 28, 2015

Sorry, I should have asked. I just removed some of the commits. I'll squash it all.

Change permissions to modes

Change interface name

Make method names closer to spec

Removing setters

acl:agents cover both users and groups

Object classes are URIs

Re-add agentClasses
rename methods
change Set<URI> to Set<String> for getAccessToURIs()

Update javadoc
awoods pushed a commit that referenced this pull request Aug 28, 2015
@awoods awoods merged commit 7b4f093 into master Aug 28, 2015
@awoods awoods deleted the jareds-acl-branch branch August 28, 2015 02:26
peichman-umd added a commit to peichman-umd/fcrepo-module-auth-webac that referenced this pull request Nov 7, 2023
LIBFCREPO-1061. Reuse the cachedAclHandle if the session is still live.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants