pk_jsp | 13 Sep 23:15

RE: Newbee: Understanding question WebDAV-Protocoll


Hi Miguel,

I was wandering into this list and read this thread in whole. 
A very brief introduction: I am using Webdav to programatically (Java) bulk
import text files from local drive into EMC eRoom Server. This line explains
all my environment. I am using Slide client library. 

Can you help me in this specific question: By default the lastModified time
of imported file is the current time when it is imported. Can I override
this behaviour and retain the original time from source location.

The 'WebdavFile' class has no such method. But 'WebdavResource' has a method
setGetLastModified but it is protected. I think if I extend it in my custom
class I can achieve this. 

Any comments on this.

--

-- 
View this message in context: http://www.nabble.com/Newbee%3A-Understanding-question-WebDAV-Protocoll-tf4102995.html#a12663741
Sent from the Jakarta Slide - User mailing list archive at Nabble.com.
Miguel Figueiredo | 14 Sep 11:04
Picon
Favicon

RE: Newbee: Understanding question WebDAV-Protocoll

Hello mate,

 If you need to do change the lastModified time of a resource, I would
consider that an hacker wish ;)
 No way you're going to be able to that, especially if you are using the
client API. You would need to change server behavior, and in a way that the
server would not follow webdav specification directives. The reason is
pretty straightforward: webdav specification states that resources have
"live" and "dead" properties, being the dead properties the ones we can
PROPPATCH, that is, we can create, update and remove them from the resource.
The live properties values, like lastModified, creationDate, contentLength,
contentType, are calculated in real time (maybe stored afterwards) with
server information. For that reason, they are protected, and can't be
changed by the user (I'll just copy paste and excerpt from rfc4918):
"
   Live Property - A property whose semantics and syntax are enforced by
   the server.  For example, the live property DAV:getcontentlength has
   its value, the length of the entity returned by a GET request,
   automatically calculated by the server.
"

 I believe that the protected method setGetLastModified purpose is to set
the date value on the local image of a remote resource. So overriding won't
help you on your intention.

 I don't know why you must change lastModified value, but if it is a
business decision, I would suggest you to create a new property for storing
the value that you want (ex: <insert your namespace here>:getLastModified).

Hope this helps,
(Continue reading)

Satish | 14 Sep 11:13

Authentication with Slide - Slide vs tomcat Realm

Hi

I need to authentication with Slide, there are two ways I can see

I am thinking of using Slide realm and configuring tomcat to use Slide user database for authentication.
Otherwise if I rely completely on tomcat realm, typical tomcat-users.xml file based, authetication, I
need to add user two places - Slide and tomcat-user, which is problem.

Can any body suggests on 
#1 how can I configure tomcat to use the Slide users for authentication?
#2 how can I actually autheticate request of tomcat programatically, is any API available?

What I am looking for is authenticating user with Slide.

Any suggestion is valuable for me.

Regards,
Satish

Disclaimer:
This e-mail may contain Privileged/Confidential information and is intended only for the individual(s)
named. Any review, retransmission, dissemination or other use of, or taking of any action in reliance
upon this information by persons or entities other than the intended recipient is prohibited. Please
notify the sender, if you have received this e-mail by mistake and delete it from your system. Information
in this message that does not relate to the official business of the company shall be understood as neither
given nor endorsed by it. E-mail transmission cannot be guaranteed to be secure or error-free. The sender
does not accept liability for any errors or omissions in the contents of this message which arise as a
result of e-mail transmission. If verification is required please request a hard-copy version. Visit us
at http://www.harbinger-systems.com/

(Continue reading)

Arne v.Irmer | 14 Sep 11:20
Picon
Picon

Re: Authentication with Slide - Slide vs tomcat Realm

Hi Satish,
look for JAAS-Authentication that is a standard API that works pretty
well with tomcat. A good introduction is found at
http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html

Yours
 Arne

Satish schrieb:
> Hi
>
> I need to authentication with Slide, there are two ways I can see
>
> I am thinking of using Slide realm and configuring tomcat to use Slide user database for authentication.
> Otherwise if I rely completely on tomcat realm, typical tomcat-users.xml file based, authetication, I
need to add user two places - Slide and tomcat-user, which is problem.
>
> Can any body suggests on 
> #1 how can I configure tomcat to use the Slide users for authentication?
> #2 how can I actually autheticate request of tomcat programatically, is any API available?
>
> What I am looking for is authenticating user with Slide.
>
> Any suggestion is valuable for me.
>
> Regards,
> Satish
>
> Disclaimer:
> This e-mail may contain Privileged/Confidential information and is intended only for the
(Continue reading)

Satish | 14 Sep 11:45

Re: Authentication with Slide - Slide vs tomcat Realm

Hey Arne

Thanks for quick reponse.

Do you mean here that I should take steps below to implemnt authetication,

- configure Slide realm, configure tomcat to use Slide users for
authentication
- configure JAAS for tomcat
- use JAAS API to authenticate the requests,
  so here JAAS will ask tomcat for authetication -> tomcat will check Slide
user database

Is is somthing gonna happen...?

Thanks.

Regards,
Satish

----- Original Message ----- 
From: "Arne v.Irmer" <Arne.vonIrmer <at> uni-dortmund.de>
To: "Slide Users Mailing List" <slide-user <at> jakarta.apache.org>
Sent: Friday, September 14, 2007 2:50 PM
Subject: Re: Authentication with Slide - Slide vs tomcat Realm

> Hi Satish,
> look for JAAS-Authentication that is a standard API that works pretty
> well with tomcat. A good introduction is found at
> http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas.html
(Continue reading)

Arne v.Irmer | 14 Sep 12:52
Picon
Picon

Re: Authentication with Slide - Slide vs tomcat Realm

Hi Satish,
things are easy, if you look at the used technics: Silde is a servlet in
tomcat and uses the authentication mechanism of tomcat. This includes
such nice things like the sso-Valve.
What you have to implement a user management that does both:
1. Creating/Deleting the user in silde by just creating/deleting a
collection with the user name in /user (default value). Tip: Look at the
powerful roles mechanism in slide.
2. Doing the JAAS-Authentication.
This is how we did it here.

Yours
 Arne

Satish schrieb:
> Hey Arne
>
> Thanks for quick reponse.
>
> Do you mean here that I should take steps below to implemnt authetication,
>
> - configure Slide realm, configure tomcat to use Slide users for
> authentication
> - configure JAAS for tomcat
> - use JAAS API to authenticate the requests,
>   so here JAAS will ask tomcat for authetication -> tomcat will check Slide
> user database
>
> Is is somthing gonna happen...?
>
(Continue reading)

Julian Reschke | 14 Sep 16:16
Picon
Picon

Re: Newbee: Understanding question WebDAV-Protocoll

Miguel Figueiredo wrote:
> Hello mate,
> 
>  If you need to do change the lastModified time of a resource, I would
> consider that an hacker wish ;)
>  No way you're going to be able to that, especially if you are using the
> client API. You would need to change server behavior, and in a way that the
> server would not follow webdav specification directives. The reason is
> pretty straightforward: webdav specification states that resources have
> "live" and "dead" properties, being the dead properties the ones we can
> PROPPATCH, that is, we can create, update and remove them from the resource.
> The live properties values, like lastModified, creationDate, contentLength,
> contentType, are calculated in real time (maybe stored afterwards) with
> server information. For that reason, they are protected, and can't be
> changed by the user (I'll just copy paste and excerpt from rfc4918):
> "
>    Live Property - A property whose semantics and syntax are enforced by
>    the server.  For example, the live property DAV:getcontentlength has
>    its value, the length of the entity returned by a GET request,
>    automatically calculated by the server.
> "
> ...

Well.

This means that a server is *allowed* to reject a request setting 
DAV:getlastmodified. But it doesn't have to.

Best regards, Julian
(Continue reading)

Satish | 15 Sep 17:07

Re: Authentication with Slide - Slide vs tomcat Realm

Hi Arne

Using your guidelines I tried configuring JAAS with Slide.

I did something like:

1) 
Configure tomcat web.xml to have 
      <Context path="/slide" debug="0" privileged="true" useNaming="true">
        <Realm className="org.apache.catalina.realm.JAASRealm"
          appName="slide_login"
          userClassNames="org.apache.slide.jaas.spi.SlidePrincipal"
          roleClassNames="org.apache.slide.jaas.spi.SlideRole"
          name="Slide DAV Server"
          useContextClassLoader="false" />
      </Context>
in Host.

2) Copied jaas.config file in conf folder of tomcat

3) Copied slide-jaas-2.1.jar in \\Tomcat 5.5\common\lib folder

4) Uncommented <security-constraint> from Slide web.xml 

5) Set environment variable CATALINA_OPTS=-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas
.config 

Retsrated tomcat server and then tried connecting Slide using Web DAV Explorer client provided by Slide,
but when I tried login, tomcat log says:

(Continue reading)

kiltesh patel | 15 Sep 18:45
Picon

Re: Authentication with Slide - Slide vs tomcat Realm

Hi Satish,

try this...

1. 5) Set environment variable CATALINA_OPTS=-Djava.security.auth.login
.config=$CATALINA_HOME/conf/jaas
.config

In place of = use == to set catalina_opts

2. Also, appName="slide_login" name should exactly match in config.jaas file

slide_login {....

3. You can also try using JAVA_OPTS instead of CATALINA_OPTS

4. Also, check your classpath if it finds jaas.config and
         userClassNames="org.apache.slide.jaas.spi.SlidePrincipal"
         roleClassNames="org.apache.slide.jaas.spi.SlideRole"
are in classpah.

Regards
Kiltesh

On 9/15/07, Satish <satish <at> harbinger-systems.com> wrote:
>
> Hi Arne
>
> Using your guidelines I tried configuring JAAS with Slide.
>
(Continue reading)

Satish | 16 Sep 10:01

Re: Authentication with Slide - Slide vs tomcat Realm

Hi 

There were problem in environment variables, I set all environment variables correctly and its seems to be
working :)

Now tomcat is understanding Slide user database, tomcat-users.xml not required anymore for authentication.

I was checking this using DAVExplorer but now I need to implement and use API for authentication, so

Is that JAAS package will help me in this, shall I need to use those API for authentication from my custom jsp client?
Do you have any idea how can I directly use same authentication way like DAVExplorer using?

Regards,
Satish

  ----- Original Message ----- 
  From: kiltesh patel 
  To: Slide Users Mailing List ; Satish 
  Sent: Saturday, September 15, 2007 10:15 PM
  Subject: Re: Authentication with Slide - Slide vs tomcat Realm

  Hi Satish,

  try this...

  1. 5) Set environment variable CATALINA_OPTS=-Djava.security.auth.login
  .config=$CATALINA_HOME/conf/jaas
  .config

  In place of = use == to set catalina_opts 
(Continue reading)


Gmane