You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Sasan Dashtinezhad <sa...@cs.umd.edu> on 2004/01/23 20:56:57 UTC

Serving specific files with some authentication

Hi guys,

My question is more site-development related.

What I plan to do is to distribute tasks to clients which will connect 
to the Web server. Jobs are defined in files, residing on the server, 
and clients have to be somehow authenticated (nothing really serious, 
they just need to be privously registered in the site) My question is 
what is a good and easy to implement way to do this? The other 
constraint is that a program should be able to download a task too (no 
user interaction is allowed.)

I was thinking of having the files defining the jobs in a password 
protected directory and then making the programs send the username and 
password to the server. But I don't know how to do that. The other 
problemm is that I'm not really happy with this desing, and was thinking 
that there might be better ways to do it. Yet another problem is that 
how will the client download the file? I was hoping to redirect the 
client to the URL to the file. Is there a better way to do this...?

Has anybody done this before? Any suggestions or comments are welcome.

Sorry folks, but I'm just new to all of this...

Cheers,
--Sasan


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: Serving specific files with some authentication

Posted by Sasan Dashtinezhad <sa...@cs.umd.edu>.
Thanks a lot Tom for the cool information. I think I'm going to use all 
of the stuff you referred me to.

Regarding the language in which the client is written, it's not chosen 
yet! This is an academicd project, and we're just starting, and I'm 
experimenting with different stuff. The goal is to have a prototype 
ready as quickly as possible, and yet don't sacrifice too much. Right 
now, I'm thinking about implementing the client side in JAva, because we 
will eventually want to run the client on different platforms.

Cheers,
--Sasan

Tom Schindl wrote:

>On Fri, 2004-01-23 at 20:56, Sasan Dashtinezhad wrote:
>  
>
>>Hi guys,
>>
>>My question is more site-development related.
>>
>>What I plan to do is to distribute tasks to clients which will connect 
>>to the Web server. Jobs are defined in files, residing on the server, 
>>and clients have to be somehow authenticated (nothing really serious, 
>>they just need to be privously registered in the site) My question is 
>>what is a good and easy to implement way to do this? 
>>    
>>
>
>A small registration form using a database system(e.g. MySQL,
>SQLLite,...) should do the trick.
>
>For authentication take a look at
>http://search.cpan.org/~abh/Apache-DBI-0.94/AuthDBI.pm
>
>  
>
>>The other 
>>constraint is that a program should be able to download a task too (no 
>>user interaction is allowed.)
>>
>>I was thinking of having the files defining the jobs in a password 
>>protected directory and then making the programs send the username and 
>>password to the server. But I don't know how to do that. The other 
>>    
>>
>
>If you are using HTTP-authentification you could the use HTTP-libs the
>language you've chosen provides?
>
>What is the language you've written your client-app in?
>e.g. Java => http://jakarta.apache.org/commons/httpclient/
>e.g. Perl => http://search.cpan.org/~gaas/libwww-perl-5.76/
>...
>
>Tom
>
>  
>
>>problemm is that I'm not really happy with this desing, and was thinking 
>>that there might be better ways to do it. Yet another problem is that 
>>how will the client download the file? I was hoping to redirect the 
>>client to the URL to the file. Is there a better way to do this...?
>>
>>Has anybody done this before? Any suggestions or comments are welcome.
>>
>>Sorry folks, but I'm just new to all of this...
>>
>>Cheers,
>>--Sasan
>>    
>>


Re: Serving specific files with some authentication

Posted by Tom Schindl <to...@profile.co.at>.
On Fri, 2004-01-23 at 20:56, Sasan Dashtinezhad wrote:
> Hi guys,
> 
> My question is more site-development related.
> 
> What I plan to do is to distribute tasks to clients which will connect 
> to the Web server. Jobs are defined in files, residing on the server, 
> and clients have to be somehow authenticated (nothing really serious, 
> they just need to be privously registered in the site) My question is 
> what is a good and easy to implement way to do this? 

A small registration form using a database system(e.g. MySQL,
SQLLite,...) should do the trick.

For authentication take a look at
http://search.cpan.org/~abh/Apache-DBI-0.94/AuthDBI.pm

> The other 
> constraint is that a program should be able to download a task too (no 
> user interaction is allowed.)
> 
> I was thinking of having the files defining the jobs in a password 
> protected directory and then making the programs send the username and 
> password to the server. But I don't know how to do that. The other 

If you are using HTTP-authentification you could the use HTTP-libs the
language you've chosen provides?

What is the language you've written your client-app in?
e.g. Java => http://jakarta.apache.org/commons/httpclient/
e.g. Perl => http://search.cpan.org/~gaas/libwww-perl-5.76/
...

Tom

> problemm is that I'm not really happy with this desing, and was thinking 
> that there might be better ways to do it. Yet another problem is that 
> how will the client download the file? I was hoping to redirect the 
> client to the URL to the file. Is there a better way to do this...?
> 
> Has anybody done this before? Any suggestions or comments are welcome.
> 
> Sorry folks, but I'm just new to all of this...
> 
> Cheers,
> --Sasan
-- 
   \\\||///
  \\  - -  //
   (  @ @  )
-oOo--( )--oOo----------------------------------------------------------
                     ___  ___                                tom schindl
      o       __    /  / /           innovative medientechnik planung AG
     / /\/\/ / /   /__/ / __            mailto:tom.schindl@profile.co.at
    / / / / /_/   /  / /___/                        http://www.impire.de
           /                 voice:+43(512)34193431,fax:+43(512)34193420
   Eduard-Bodem-Gasse 6, A-6020 Innsbruck, Austria, Software Engineering
------------------------------------------------------------------------


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html