You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by Remy Maucherat <re...@apache.org> on 2001/07/21 07:52:24 UTC
WebDAV interoperability report
Hi,
I've been attending a WebDAV interoperability event today. There was a lot
of people, and it was very interesting.
The Slide server did very well (at least after I removed an apparently
broken assertion in NodeRevisionDescriptors). There were issues with :
- The Propfind method request parsing does not properly handle namespaces.
It will be rewritten (partially) using DOM 2 to fix the problem.
- There were a few issues dealing with status codes with overwrite and COP /
MOVE (apparently we don't return 412 - or I missed something).
- There's potentially a few problems with the soon-to-be-rewritten security
algorithm. It doesn't lower security since it has a tendency to return false
in complex cases ;-)
- I wasn't able to test shared locks (but I do hope they work ok).
The Slide WebDAV client did well too.
- Overall, there were lots of HTTP interoperability issues between clients
and servers. When the Slide client was able to talk to the server, it did
well in the subsequent WebDAV tests.
- Some servers had trouble handling a chunked PUT. Well established servers
didn't have the problem.
- There is a bug where the lock token won't get submitted in the If header
when doing something like a MOVE (when unlocking, the token is submitted,
though).
- Dirk did an outstanding job completing and fixing the DAV Access Control
Protocol support :-) It works very well, and I was able to test it against
the only ACP compliant server present (except we didn't finish updating to
the 06 draft, there was an issue with protected ACEs being submitted in an
ACL request, which apparently shouldn't be the case in 06 - it was in 05).
Apparently, there will be a new interop meeting shortly (probably online),
so hopefully we'll get really good results next time.
Remy
Re: WebDAV interoperability report
Posted by Remy Maucherat <re...@apache.org>.
> > > - public security functions should use SlideToken not SubjectNode
> > Why's that ?
> > That allows someone to manipulate permissions on behalf of an arbitary
node
> > of the namespace.
> > For example, you can have a root setting read access somewhere for all
users
> > (/users node for example, which isn't a valid pricipal in the
SlideToken -
> > nobody can log in as /users).
>
> public boolean hasPermission(ObjectNode object, SubjectNode subject,
ActionNode
> action)
> => do you have the right to check the permission for that object ?
> (read-permissions)
> public Enumeration enumeratePermissions(SlideToken token, ObjectNode
object)
> => this one checks if you have the read-permissions right
>
> I thought of something like:
> public boolean hasPermission(SlideToken token, ObjectNode object,
ActionNode
> action)
If we add it, it should be identical to void checkCredentials(SlideToken
token, ObjectNode object, ActionNode action) throws ServiceAccessException,
AccessDeniedException;
except that it wouldn't throw AccessDeniedException.
The hasPermission call has been added relatively recently, to avoid the
overhead of throwing exceptions all the time.
> This one is more difficult:
> public boolean hasPermission(SlideToken token,ObjectNode object,
SubjectNode
> subject, ActionNode action)
> if you mean: does the object have a privilege rule that grants "action" to
> "subject"
> thats ok, but thats actually just a convenience method for
enumeratePermissions
> But if you want a complete check, that is very difficult.
> - if I can't read the permissions may I check if somebody else has access
> - may/can I read the roles from another user?
> ...
Using hasPermissions a lot of times is indeed relatively similar to reading
the permissions, so that could be a security problem. Same for reading the
roles.
Maybe we could check only if the subject tested is not himself (that is, if
subject != node associated to the principal in slide token).
That would make this call more consistent to what DAV ACP does.
Using hasRole could also be restricted by a check to the read permissions
action.
Is that what you want to do ?
> > > - put the hasRole code inside SlideToken or CredentialsToken
> > I don't agree. You may want that method call : public boolean
> > hasRole(ObjectNode object, String role) to check if some arbitrary node
has
> > some role.
>
> That's a very confusing one, does an arbitrary ObjectNode have roles?
The "nobody" role.
> I would remove that method and move the next one into the SlideToken
> public boolean hasRole(SlideToken token, String role)
> But I understand that you might want to keep it.
>
> > > - Use a kind of Principal in stead of SubjectNode inside a
NodePermission
> > I believe a node is "a kind of principal" already.
>
> Just wanted to delegate from SecurityImpl to NodePermission to
> HrefPrincipal,OwnerPrincipal, PropertyPrincipal, ...
> But the check is also possible with if-statements in hasPermission (like
it is
> now)
The algorithm is indeed messy because of all these checks. We could move
that to NodePermission, which would indeed be better, but it would require
modifying the stores since we would need to store the permission type
somewhere (Juergen probably has something against that).
> > > - rename the subjectUri "nobody" to "all"
> > I named it "nobody" because the statement :
> > - "everybody has role nobody" is true
> > - "everybody has role all" is false (since otherwise, everybody would
have
> > root also)
>
> It's just weird to see: "grant read to all" become "grant read to nobody"
> but it's just an internal codename...
I know that "nobody" is just as bad. We can change it to "all" if you think
it would help. Maybe "default" or "base" would be better ? Or adopt the DAV
ACP name, like "unauthenticated".
Remy
Re: WebDAV interoperability report
Posted by Dirk Verbeeck <di...@pandora.be>.
> > - public security functions should use SlideToken not SubjectNode
> Why's that ?
> That allows someone to manipulate permissions on behalf of an arbitary node
> of the namespace.
> For example, you can have a root setting read access somewhere for all users
> (/users node for example, which isn't a valid pricipal in the SlideToken -
> nobody can log in as /users).
public boolean hasPermission(ObjectNode object, SubjectNode subject, ActionNode
action)
=> do you have the right to check the permission for that object ?
(read-permissions)
public Enumeration enumeratePermissions(SlideToken token, ObjectNode object)
=> this one checks if you have the read-permissions right
I thought of something like:
public boolean hasPermission(SlideToken token, ObjectNode object, ActionNode
action)
This one is more difficult:
public boolean hasPermission(SlideToken token,ObjectNode object, SubjectNode
subject, ActionNode action)
if you mean: does the object have a privilege rule that grants "action" to
"subject"
thats ok, but thats actually just a convenience method for enumeratePermissions
But if you want a complete check, that is very difficult.
- if I can't read the permissions may I check if somebody else has access
- may/can I read the roles from another user?
...
> > - put the hasRole code inside SlideToken or CredentialsToken
> I don't agree. You may want that method call : public boolean
> hasRole(ObjectNode object, String role) to check if some arbitrary node has
> some role.
That's a very confusing one, does an arbitrary ObjectNode have roles?
I would remove that method and move the next one into the SlideToken
public boolean hasRole(SlideToken token, String role)
But I understand that you might want to keep it.
> > - Use a kind of Principal in stead of SubjectNode inside a NodePermission
> I believe a node is "a kind of principal" already.
Just wanted to delegate from SecurityImpl to NodePermission to
HrefPrincipal,OwnerPrincipal, PropertyPrincipal, ...
But the check is also possible with if-statements in hasPermission (like it is
now)
> > - rename the subjectUri "nobody" to "all"
> I named it "nobody" because the statement :
> - "everybody has role nobody" is true
> - "everybody has role all" is false (since otherwise, everybody would have
> root also)
It's just weird to see: "grant read to all" become "grant read to nobody"
but it's just an internal codename...
> > I will send more details later but if somebody has some extra requirements
> > (not covered by the WebDAV spec), now is your chance to speak up.
> Warning : a rant about API changes in general follows ;-)
snip rant...
> So here's my counter proposal :
> - We can consider significant API changes for Slide 2.0 (I would advocate
> that Slide's version number represents the version number of the CMS core),
> although if we could only make small limited changes, it would be much
> better
Fine with me.
> - I don't see a situation where you can't get things done with the current
> API, so I'm -1 for any breakage in the 1.x releases (but adding new methods
> could be considered if it adds some real value)
I think there are too many public methods already, keeping compatibility will be
hard.
> - I would be +1 to create a new repository (jakarta-slide-2.0) where we can
> commit interfaces (and abstract classes) and spend some work designing the
> new updated API (no implementation allowed in that repository for some time)
Not needed, only committing interfaces would be silly, I want/need something
that works.
Dirk
Re: WebDAV interoperability report
Posted by Remy Maucherat <re...@apache.org>.
> > - Dirk did an outstanding job completing and fixing the DAV Access
Control
> > Protocol support :-) It works very well, and I was able to test it
against
> > the only ACP compliant server present (except we didn't finish updating
to
> > the 06 draft, there was an issue with protected ACEs being submitted in
an
> > ACL request, which apparently shouldn't be the case in 06 - it was in
05).
>
> :-)
>
> I already updated the ACL to skip the protected and innherited ACEs.
>
> To continue, I need the new "soon-to-be-rewritten" security system.
There may be a misunderstanding here. I only plan to rewrite the
implementation. The Security interface will remain unchanged.
> I have been looking at the code and will be submitting a proposal shortly.
>
> Some points that I think should change:
> - public security functions should use SlideToken not SubjectNode
Why's that ?
That allows someone to manipulate permissions on behalf of an arbitary node
of the namespace.
For example, you can have a root setting read access somewhere for all users
(/users node for example, which isn't a valid pricipal in the SlideToken -
nobody can log in as /users).
> - remove *Role (or is there a reason to keep them?)
Yes, they're convenient utility functions.
> - put the hasRole code inside SlideToken or CredentialsToken
I don't agree. You may want that method call : public boolean
hasRole(ObjectNode object, String role) to check if some arbitrary node has
some role.
> - Use a kind of Principal in stead of SubjectNode inside a NodePermission
I believe a node is "a kind of principal" already.
> - rename the subjectUri "nobody" to "all"
I named it "nobody" because the statement :
- "everybody has role nobody" is true
- "everybody has role all" is false (since otherwise, everybody would have
root also)
> I will send more details later but if somebody has some extra requirements
> (not covered by the WebDAV spec), now is your chance to speak up.
Warning : a rant about API changes in general follows ;-)
The roles related calls are the most recently introduced, so they are the
ones that could maybe be moved around, but I see no really huge benefit in
doing so. The thing is, the API may be less than perfect, but I do believe
that people don't care at all if the API is perfect, but they do care about
API changes. So unless the API is totally broken (ie, there's no way you can
get the job done), don't change it. Even when going from one major release
to the next, a good plan is to avoid big changes in the API.
I can give an example about the Avalon project. Once upon a time, there was
Avalon 2.2. It was getting the job done. You could write a block, run it.
The API was a bit confusing, but it was ok since I cut and paste what I
needed from an example, and after a short while I got used to it (so it
wasn't confusing to me anymore). Enter Peter and Avalon 3.0 (which was never
released) and 4.0. Three API rewrites later (driving me nuts and making me
drop all Avalon support in the process), the API now looks a lot more
elegant. But it does the same thing as before. Actually, the whole thing
behaves really the same way as before (or I was too stupid to find out the
improvements, or at least improvements that mattered to me).
So here :
- some (if not all) of the user base ran away
- the user base got very little benefits in return (except the API is now
super clean, but the users still probably cut & paste from examples to use
it)
On a side note, I still feel bad about the HTTP client API change ;-)
So here's my counter proposal :
- We can consider significant API changes for Slide 2.0 (I would advocate
that Slide's version number represents the version number of the CMS core),
although if we could only make small limited changes, it would be much
better
- I don't see a situation where you can't get things done with the current
API, so I'm -1 for any breakage in the 1.x releases (but adding new methods
could be considered if it adds some real value)
- I would be +1 to create a new repository (jakarta-slide-2.0) where we can
commit interfaces (and abstract classes) and spend some work designing the
new updated API (no implementation allowed in that repository for some time)
Remy
Re: WebDAV interoperability report
Posted by Dirk Verbeeck <di...@pandora.be>.
> - Dirk did an outstanding job completing and fixing the DAV Access Control
> Protocol support :-) It works very well, and I was able to test it against
> the only ACP compliant server present (except we didn't finish updating to
> the 06 draft, there was an issue with protected ACEs being submitted in an
> ACL request, which apparently shouldn't be the case in 06 - it was in 05).
:-)
I already updated the ACL to skip the protected and innherited ACEs.
To continue, I need the new "soon-to-be-rewritten" security system.
I have been looking at the code and will be submitting a proposal shortly.
Some points that I think should change:
- public security functions should use SlideToken not SubjectNode
- remove *Role (or is there a reason to keep them?)
- put the hasRole code inside SlideToken or CredentialsToken
- Use a kind of Principal in stead of SubjectNode inside a NodePermission
- rename the subjectUri "nobody" to "all"
I will send more details later but if somebody has some extra requirements
(not covered by the WebDAV spec), now is your chance to speak up.
Dirk