You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Mike Oliver <ol...@matrix-media.com> on 2003/11/19 17:33:10 UTC
Client NPE on acl command
Running the latest Slide Client against a local slide instance, I got
the following:
[LOCALHOST] /AJCS/files/Matrix/ $ acl
Error: unknown type of principal
element: <D:ace>
<D:principal>
<D:owner />
</D:principal>
<D:grant>
<D:privilege>
<D:read-acl />
</D:privilege>
</D:grant>
<D:inherited>
<D:href>/AJCS/files</D:href>
</D:inherited>
</D:ace>
ACL for /AJCS/files/Matrix/:
------------------------------------------------------------
granted to /AJCS/roles/user (not protected) (inherited from
'/AJCS/files')
DAV:write
Fatal Error: null
java.lang.NullPointerException
at org.apache.webdav.cmd.Client.showAces(Client.java:1827)
at org.apache.webdav.cmd.Client.acl(Client.java:1068)
at org.apache.webdav.cmd.ClientParser.acl(ClientParser.java:1764)
at org.apache.webdav.cmd.ClientParser.command(ClientParser.java:409)
at
org.apache.webdav.cmd.ClientParser.commands(ClientParser.java:210)
at org.apache.webdav.cmd.Client.run(Client.java:149)
at org.apache.webdav.cmd.Slide.main(Slide.java:124)
Please, email to slide-user@jakarta.apache.org
So, since it asked me to, here it is.
Ollie
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Client NPE on acl command
Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
Oops,
it should read:
Index: src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
retrieving revision 1.57
diff -u -r1.57 PropertyHelper.java
--- src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java 5 Nov 2003 14:24:35 -0000 1.57
+++ src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java 19 Nov 2003 18:14:22 -0000
@@ -1793,8 +1793,9 @@
principalElm.addContent(unauthenticatedElm);
}
else if (subjectUri == SubjectNode.OWNER_URI) {
- Element ownerElm = new Element(E_OWNER, DNSP);
- principalElm.addContent(ownerElm);
+ Element propertyElm = new Element(E_PROPERTY, DNSP);
+ propertyElm.addContent(new Element(P_OWNER, DNSP));
+ principalElm.addContent(propertyElm);
}
else if (subjectUri == SubjectNode.SELF_URI) {
Element selfElm = new Element(E_SELF, DNSP);
> I think I have found the offending lines in the server code.
> Peter, could you please verify the following patch:
>
> Index: src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
> ===================================================================
> RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
> retrieving revision 1.57
> diff -u -r1.57 PropertyHelper.java
> --- src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java 5 Nov 2003 14:24:35 -0000 1.57
> +++ src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java 19 Nov 2003 18:14:22 -0000
> @@ -1793,8 +1793,9 @@
> principalElm.addContent(unauthenticatedElm);
> }
> else if (subjectUri == SubjectNode.OWNER_URI) {
> - Element ownerElm = new Element(E_OWNER, DNSP);
> - principalElm.addContent(ownerElm);
> + Element propertyElm = new Element(E_PROPERTY, DNSP);
> + propertyElm.addContent(new Element(P_OWNER, DNSP));
> + principalElm.addContent(principalElm);
> }
> else if (subjectUri == SubjectNode.SELF_URI) {
> Element selfElm = new Element(E_SELF, DNSP);
>
> Nevertheless, it is not clear to me, why there is such an ACE after a
> fresh installation. Have the default permissions changed?
>
> Regards,
> Ingo
>
> > Ingo,
> >
> > No I didn't try to set anything and it was a new instance altogether and
> > I was connected as 'root' and just did the 'acl' command on a collection
> > I had just created with mkcol command.
> >
> > Ollie
> >
> > Ingo Brunberg wrote:
> >
> > >Hi Ollie,
> > >
> > >first, thank you for following the advice.
> > >
> > >As you propably know, Slide recently tried to become compatible with
> > >the latest ACL draft. For the client part, I have commited a small
> > >patch that (admittedly I haven't tested much) allows users to set the
> > >principal of an ACE to a property. Have you made use of this feature?
> > >
> > >On the other hand, your output seems to indicate a bug on the server
> > >side. The principal should look like:
> > >
> > ><D:principal><D:property><D:owner/></D:property></D:principal>
> > >
> > >instead of
> > >
> > ><D:principal>>D:owner/></D:principal>.
> > >
> > >I will propably have a closer look at it tomorrow, unless someone is
> > >faster.
> > >
> > >Regards,
> > >Ingo
> > >
> > >
> > >
> > >>Running the latest Slide Client against a local slide instance, I got
> > >>the following:
> > >>
> > >>[LOCALHOST] /AJCS/files/Matrix/ $ acl
> > >>
> > >>Error: unknown type of principal
> > >>element: <D:ace>
> > >> <D:principal>
> > >> <D:owner />
> > >> </D:principal>
> > >> <D:grant>
> > >> <D:privilege>
> > >> <D:read-acl />
> > >> </D:privilege>
> > >> </D:grant>
> > >> <D:inherited>
> > >> <D:href>/AJCS/files</D:href>
> > >> </D:inherited>
> > >> </D:ace>
> > >>ACL for /AJCS/files/Matrix/:
> > >>------------------------------------------------------------
> > >>granted to /AJCS/roles/user (not protected) (inherited from
> > >>'/AJCS/files')
> > >> DAV:write
> > >>Fatal Error: null
> > >>java.lang.NullPointerException
> > >> at org.apache.webdav.cmd.Client.showAces(Client.java:1827)
> > >> at org.apache.webdav.cmd.Client.acl(Client.java:1068)
> > >> at org.apache.webdav.cmd.ClientParser.acl(ClientParser.java:1764)
> > >> at org.apache.webdav.cmd.ClientParser.command(ClientParser.java:409)
> > >> at
> > >>org.apache.webdav.cmd.ClientParser.commands(ClientParser.java:210)
> > >> at org.apache.webdav.cmd.Client.run(Client.java:149)
> > >> at org.apache.webdav.cmd.Slide.main(Slide.java:124)
> > >>Please, email to slide-user@jakarta.apache.org
> > >>
> > >>So, since it asked me to, here it is.
> > >>
> > >>Ollie
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Newbie: Servlet using Webdav
Posted by De <de...@alineo.com>.
Hello Sliders,
I try to be more accurate.
How can I retrieve the information (user and password) to pass it to get
a WebdavResource?
Thanks in advance for your help.
De wrote:
> Hello,
>
> What I'd like to do, is to create a Web client (JSPs and Servlets) for
> Webdav.
> So I authenticate via the servlet container of my client.
> Then how can I pass the information (user and password) to get a
> WebdavResource?
>
>
> De
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Newbie: Servlet using Webdav
Posted by De <de...@alineo.com>.
Thanks Martin for your help.
De
Martin Holz wrote:
>Hi,
>
>De <de...@alineo.com> writes:
>
>
>
>>What I'd like to do, is to create a Web client (JSPs and Servlets) for Webdav.
>>So I authenticate via the servlet container of my client.
>>Then how can I pass the information (user and password) to get a WebdavResource?
>>
>>
>
>don't know the best way. Jaas seems to address the problem of forwarding
>credentials. I am using a different approach. I am doing basic authentication
>on my own, using a servlet filter. The servlet filter attaches the password
>to the request in a attribute, so it is accessible in the servlet. There must be
>a better way. Of course you should not use basic authentication for anything
>serious unlessyou encrypt the connection with SSL.
>
>Martin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Newbie: Servlet using Webdav
Posted by Martin Holz <ho...@fiz-chemie.de>.
Hi,
De <de...@alineo.com> writes:
> What I'd like to do, is to create a Web client (JSPs and Servlets) for Webdav.
> So I authenticate via the servlet container of my client.
> Then how can I pass the information (user and password) to get a WebdavResource?
don't know the best way. Jaas seems to address the problem of forwarding
credentials. I am using a different approach. I am doing basic authentication
on my own, using a servlet filter. The servlet filter attaches the password
to the request in a attribute, so it is accessible in the servlet. There must be
a better way. Of course you should not use basic authentication for anything
serious unlessyou encrypt the connection with SSL.
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Newbie: Servlet using Webdav
Posted by De <de...@alineo.com>.
Hello,
What I'd like to do, is to create a Web client (JSPs and Servlets) for Webdav.
So I authenticate via the servlet container of my client.
Then how can I pass the information (user and password) to get a WebdavResource?
De
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Client NPE on acl command
Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
I think I have found the offending lines in the server code.
Peter, could you please verify the following patch:
Index: src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
retrieving revision 1.57
diff -u -r1.57 PropertyHelper.java
--- src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java 5 Nov 2003 14:24:35 -0000 1.57
+++ src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java 19 Nov 2003 18:14:22 -0000
@@ -1793,8 +1793,9 @@
principalElm.addContent(unauthenticatedElm);
}
else if (subjectUri == SubjectNode.OWNER_URI) {
- Element ownerElm = new Element(E_OWNER, DNSP);
- principalElm.addContent(ownerElm);
+ Element propertyElm = new Element(E_PROPERTY, DNSP);
+ propertyElm.addContent(new Element(P_OWNER, DNSP));
+ principalElm.addContent(principalElm);
}
else if (subjectUri == SubjectNode.SELF_URI) {
Element selfElm = new Element(E_SELF, DNSP);
Nevertheless, it is not clear to me, why there is such an ACE after a
fresh installation. Have the default permissions changed?
Regards,
Ingo
> Ingo,
>
> No I didn't try to set anything and it was a new instance altogether and
> I was connected as 'root' and just did the 'acl' command on a collection
> I had just created with mkcol command.
>
> Ollie
>
> Ingo Brunberg wrote:
>
> >Hi Ollie,
> >
> >first, thank you for following the advice.
> >
> >As you propably know, Slide recently tried to become compatible with
> >the latest ACL draft. For the client part, I have commited a small
> >patch that (admittedly I haven't tested much) allows users to set the
> >principal of an ACE to a property. Have you made use of this feature?
> >
> >On the other hand, your output seems to indicate a bug on the server
> >side. The principal should look like:
> >
> ><D:principal><D:property><D:owner/></D:property></D:principal>
> >
> >instead of
> >
> ><D:principal>>D:owner/></D:principal>.
> >
> >I will propably have a closer look at it tomorrow, unless someone is
> >faster.
> >
> >Regards,
> >Ingo
> >
> >
> >
> >>Running the latest Slide Client against a local slide instance, I got
> >>the following:
> >>
> >>[LOCALHOST] /AJCS/files/Matrix/ $ acl
> >>
> >>Error: unknown type of principal
> >>element: <D:ace>
> >> <D:principal>
> >> <D:owner />
> >> </D:principal>
> >> <D:grant>
> >> <D:privilege>
> >> <D:read-acl />
> >> </D:privilege>
> >> </D:grant>
> >> <D:inherited>
> >> <D:href>/AJCS/files</D:href>
> >> </D:inherited>
> >> </D:ace>
> >>ACL for /AJCS/files/Matrix/:
> >>------------------------------------------------------------
> >>granted to /AJCS/roles/user (not protected) (inherited from
> >>'/AJCS/files')
> >> DAV:write
> >>Fatal Error: null
> >>java.lang.NullPointerException
> >> at org.apache.webdav.cmd.Client.showAces(Client.java:1827)
> >> at org.apache.webdav.cmd.Client.acl(Client.java:1068)
> >> at org.apache.webdav.cmd.ClientParser.acl(ClientParser.java:1764)
> >> at org.apache.webdav.cmd.ClientParser.command(ClientParser.java:409)
> >> at
> >>org.apache.webdav.cmd.ClientParser.commands(ClientParser.java:210)
> >> at org.apache.webdav.cmd.Client.run(Client.java:149)
> >> at org.apache.webdav.cmd.Slide.main(Slide.java:124)
> >>Please, email to slide-user@jakarta.apache.org
> >>
> >>So, since it asked me to, here it is.
> >>
> >>Ollie
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Client NPE on acl command
Posted by Mike Oliver <ol...@matrix-media.com>.
Ingo,
No I didn't try to set anything and it was a new instance altogether and
I was connected as 'root' and just did the 'acl' command on a collection
I had just created with mkcol command.
Ollie
Ingo Brunberg wrote:
>Hi Ollie,
>
>first, thank you for following the advice.
>
>As you propably know, Slide recently tried to become compatible with
>the latest ACL draft. For the client part, I have commited a small
>patch that (admittedly I haven't tested much) allows users to set the
>principal of an ACE to a property. Have you made use of this feature?
>
>On the other hand, your output seems to indicate a bug on the server
>side. The principal should look like:
>
><D:principal><D:property><D:owner/></D:property></D:principal>
>
>instead of
>
><D:principal>>D:owner/></D:principal>.
>
>I will propably have a closer look at it tomorrow, unless someone is
>faster.
>
>Regards,
>Ingo
>
>
>
>>Running the latest Slide Client against a local slide instance, I got
>>the following:
>>
>>[LOCALHOST] /AJCS/files/Matrix/ $ acl
>>
>>Error: unknown type of principal
>>element: <D:ace>
>> <D:principal>
>> <D:owner />
>> </D:principal>
>> <D:grant>
>> <D:privilege>
>> <D:read-acl />
>> </D:privilege>
>> </D:grant>
>> <D:inherited>
>> <D:href>/AJCS/files</D:href>
>> </D:inherited>
>> </D:ace>
>>ACL for /AJCS/files/Matrix/:
>>------------------------------------------------------------
>>granted to /AJCS/roles/user (not protected) (inherited from
>>'/AJCS/files')
>> DAV:write
>>Fatal Error: null
>>java.lang.NullPointerException
>> at org.apache.webdav.cmd.Client.showAces(Client.java:1827)
>> at org.apache.webdav.cmd.Client.acl(Client.java:1068)
>> at org.apache.webdav.cmd.ClientParser.acl(ClientParser.java:1764)
>> at org.apache.webdav.cmd.ClientParser.command(ClientParser.java:409)
>> at
>>org.apache.webdav.cmd.ClientParser.commands(ClientParser.java:210)
>> at org.apache.webdav.cmd.Client.run(Client.java:149)
>> at org.apache.webdav.cmd.Slide.main(Slide.java:124)
>>Please, email to slide-user@jakarta.apache.org
>>
>>So, since it asked me to, here it is.
>>
>>Ollie
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
Re: Client NPE on acl command
Posted by Ingo Brunberg <ib...@fiz-chemie.de>.
Hi Ollie,
first, thank you for following the advice.
As you propably know, Slide recently tried to become compatible with
the latest ACL draft. For the client part, I have commited a small
patch that (admittedly I haven't tested much) allows users to set the
principal of an ACE to a property. Have you made use of this feature?
On the other hand, your output seems to indicate a bug on the server
side. The principal should look like:
<D:principal><D:property><D:owner/></D:property></D:principal>
instead of
<D:principal>>D:owner/></D:principal>.
I will propably have a closer look at it tomorrow, unless someone is
faster.
Regards,
Ingo
> Running the latest Slide Client against a local slide instance, I got
> the following:
>
> [LOCALHOST] /AJCS/files/Matrix/ $ acl
>
> Error: unknown type of principal
> element: <D:ace>
> <D:principal>
> <D:owner />
> </D:principal>
> <D:grant>
> <D:privilege>
> <D:read-acl />
> </D:privilege>
> </D:grant>
> <D:inherited>
> <D:href>/AJCS/files</D:href>
> </D:inherited>
> </D:ace>
> ACL for /AJCS/files/Matrix/:
> ------------------------------------------------------------
> granted to /AJCS/roles/user (not protected) (inherited from
> '/AJCS/files')
> DAV:write
> Fatal Error: null
> java.lang.NullPointerException
> at org.apache.webdav.cmd.Client.showAces(Client.java:1827)
> at org.apache.webdav.cmd.Client.acl(Client.java:1068)
> at org.apache.webdav.cmd.ClientParser.acl(ClientParser.java:1764)
> at org.apache.webdav.cmd.ClientParser.command(ClientParser.java:409)
> at
> org.apache.webdav.cmd.ClientParser.commands(ClientParser.java:210)
> at org.apache.webdav.cmd.Client.run(Client.java:149)
> at org.apache.webdav.cmd.Slide.main(Slide.java:124)
> Please, email to slide-user@jakarta.apache.org
>
> So, since it asked me to, here it is.
>
> Ollie
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org