RE: [Action] Best practices for authentication

2002-02-14 Thread Pascal Davoust

Yes, I know that pipelines are executed in the order I set them in the
sitemap. Actually, the login/logout targets are in a pipeline before the
protected pipeline. It seems to work correctly, I don't see any real
problem... Performance, maybe? But I don't think so...

Wow, that's all new to me, I'm usually commited to have them fixed, not
finding them :o)
Ok, I'll grab the CVS version when I have a bit of time, I'm doing it with
the other way right now to have my experiment go on.

Thanks again,

Pascal.

-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 2:05 AM
To: [EMAIL PROTECTED]
Subject: RE: [Action] Best practices for authentication


> From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
>
> Mmh, I probably missed something here... I tried what you proposed,
but I
> get a compilation error. Here's what I did at first, which works
correctly:
>
> 
>   
> 
> 
>   value="file://config/session-params.xml"/>
>   
>
>   
> 
>   
> 
>
> (login is in another pipeline... does it matter?)

(no, but order might be of importance: pipelines are executed one by
one)


> And then I tried to reverse the pattern, like this:

Congratulations, you found a bug :)
Remove :

> 
>   
>   
>
> 
>   
> 
>   
> 
>
> And I get an error, which is :
> Error compiling sitemap_xmap: Line 901, column 6: Undefined variable:
param

And it will compile.


> I had a look to the source code, it's obviously missing the variable
> declaration. Did I forget something here?
>
> By the way, I found that the "context://..." specifier as a parameter
value
> for the action descriptor doesn't work

Don't remember action sources... It just might be they do not use
resolver to get descriptor.


> (did I correctly understand that this
> sub-protocol is related to the sitemap?),

Any (sub) protocol can be used throughout the system if using resolver.

PS: Grab CVS version of sitemap.xsl - it has the bug fixed.

Regards,
Vadim

> whereas "file://" does the
> trick (I want to specify a path relative to the sitemap its written
into).
>
> Thanks,
>
>   Pascal.


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: [Action] Best practices for authentication

2002-02-13 Thread Vadim Gritsenko

> From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
> 
> Mmh, I probably missed something here... I tried what you proposed,
but I
> get a compilation error. Here's what I did at first, which works
correctly:
> 
> 
>   
> 
> 
>   value="file://config/session-params.xml"/>
>   
> 
>   
> 
>   
> 
> 
> (login is in another pipeline... does it matter?)

(no, but order might be of importance: pipelines are executed one by
one)

 
> And then I tried to reverse the pattern, like this:

Congratulations, you found a bug :)
Remove :

> 
>   
>   
> 
> 
>   
> 
>   
> 
> 
> And I get an error, which is :
> Error compiling sitemap_xmap: Line 901, column 6: Undefined variable:
param

And it will compile.

 
> I had a look to the source code, it's obviously missing the variable
> declaration. Did I forget something here?
> 
> By the way, I found that the "context://..." specifier as a parameter
value
> for the action descriptor doesn't work

Don't remember action sources... It just might be they do not use
resolver to get descriptor.


> (did I correctly understand that this
> sub-protocol is related to the sitemap?),

Any (sub) protocol can be used throughout the system if using resolver.

PS: Grab CVS version of sitemap.xsl - it has the bug fixed.

Regards,
Vadim

> whereas "file://" does the
> trick (I want to specify a path relative to the sitemap its written
into).
> 
> Thanks,
> 
>   Pascal.


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: [Action] Best practices for authentication

2002-02-13 Thread Pascal Davoust

Mmh, I probably missed something here... I tried what you proposed, but I
get a compilation error. Here's what I did at first, which works correctly:


  


  
  

  

  


(login is in another pipeline... does it matter?)

And then I tried to reverse the pattern, like this:


  
  




  

  


And I get an error, which is :
Error compiling sitemap_xmap: Line 901, column 6: Undefined variable: param

I had a look to the source code, it's obviously missing the variable
declaration. Did I forget something here?

By the way, I found that the "context://..." specifier as a parameter value
for the action descriptor doesn't work (did I correctly understand that this
sub-protocol is related to the sitemap?), whereas "file://" does the
trick (I want to specify a path relative to the sitemap its written into).

Thanks,

Pascal.

-Original Message-
From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 10:13 PM
To: [EMAIL PROTECTED]
Subject: RE: [Action] Best practices for authentication


Ok, it was too simple and too obvious for me! That's the way I like problems
to be solved. :)

Thanks!

Pascal.

-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:37 PM
To: [EMAIL PROTECTED]
Subject: RE: [Action] Best practices for authentication


> From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
>
> Hi all,
>
> I've been experimenting with Cocoon 2.0.1 (and before that with Cocoon
1,
> but didn't do much with it because of the lack of features more than
> available in C2 now, mainly actions).
> And now I'm wondering about the 'protected' sample in the distro.
>
> Basically, having a page protected by authentication involves an
action
> (DatabaseAuthenitcatorAction, in this case) to check that
authentication was
> successful before serving the resource (understand: page), or redirect
to
> login if authentication failed.
> The pattern for this is basically:
>
>   
> 
>   
> 
>   
>
> And if I correctly understand, it means that I've got to specify that
schema
> for *every* match I want to protect, right? Seems a bit of overhead to
me
> (may increase the maintenance cost for the sitemap)...
>
> Is there a "smarter" way of doing this? Quite frankly, that's the only
one I
> see (I came to that conclusion myself *before* seing the protected
> sample)... but you guys have zillion times more experience than me
with this
> topic! :)
>

Reverse this, action before match:

 
 
...
 

 
   

   
  ...
   

   
  ...
   

 
 
 

(this is supported since 2.0.1)


> By the way, C2 rocks! :)

Thanks!

Vadim



-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: [Action] Best practices for authentication

2002-02-13 Thread Pascal Davoust

Ok, it was too simple and too obvious for me! That's the way I like problems
to be solved. :)

Thanks!

Pascal.

-Original Message-
From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 8:37 PM
To: [EMAIL PROTECTED]
Subject: RE: [Action] Best practices for authentication


> From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
>
> Hi all,
>
> I've been experimenting with Cocoon 2.0.1 (and before that with Cocoon
1,
> but didn't do much with it because of the lack of features more than
> available in C2 now, mainly actions).
> And now I'm wondering about the 'protected' sample in the distro.
>
> Basically, having a page protected by authentication involves an
action
> (DatabaseAuthenitcatorAction, in this case) to check that
authentication was
> successful before serving the resource (understand: page), or redirect
to
> login if authentication failed.
> The pattern for this is basically:
>
>   
> 
>   
> 
>   
>
> And if I correctly understand, it means that I've got to specify that
schema
> for *every* match I want to protect, right? Seems a bit of overhead to
me
> (may increase the maintenance cost for the sitemap)...
>
> Is there a "smarter" way of doing this? Quite frankly, that's the only
one I
> see (I came to that conclusion myself *before* seing the protected
> sample)... but you guys have zillion times more experience than me
with this
> topic! :)
>

Reverse this, action before match:

 
 
...
 

 
   

   
  ...
   

   
  ...
   

 
 
 

(this is supported since 2.0.1)


> By the way, C2 rocks! :)

Thanks!

Vadim



-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: [Action] Best practices for authentication

2002-02-13 Thread Vadim Gritsenko

> From: Pascal Davoust [mailto:[EMAIL PROTECTED]]
> 
> Hi all,
> 
> I've been experimenting with Cocoon 2.0.1 (and before that with Cocoon
1,
> but didn't do much with it because of the lack of features more than
> available in C2 now, mainly actions).
> And now I'm wondering about the 'protected' sample in the distro.
> 
> Basically, having a page protected by authentication involves an
action
> (DatabaseAuthenitcatorAction, in this case) to check that
authentication was
> successful before serving the resource (understand: page), or redirect
to
> login if authentication failed.
> The pattern for this is basically:
> 
>   
> 
>   
> 
>   
> 
> And if I correctly understand, it means that I've got to specify that
schema
> for *every* match I want to protect, right? Seems a bit of overhead to
me
> (may increase the maintenance cost for the sitemap)...
>
> Is there a "smarter" way of doing this? Quite frankly, that's the only
one I
> see (I came to that conclusion myself *before* seing the protected
> sample)... but you guys have zillion times more experience than me
with this
> topic! :)
>

Reverse this, action before match:

 
 
...
 

 
   

   
  ...
   

   
  ...
   

 
 
 

(this is supported since 2.0.1)

 
> By the way, C2 rocks! :)

Thanks!

Vadim



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>