You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sanket Pattekar <sa...@gmail.com> on 2007/05/09 11:24:10 UTC
Authenticating pipelines called from a cron job
Hi,
I am using a cron job that fires daily, which call the pipeline as follows
<component class="org.apache.cocoon.components.cron.CocoonPipelineCronJob"
logger="core" role="org.apache.cocoon.components.cron.CronJob/pipeline-daily">
<pipeline>some-external-pipeline</pipeline>
</component>
The above cron job uses an extaernal pipeline, it can also be accessed
by the external user. I want to prevent the same, and some
authentication, so that this pipeline is only executed when called
from a cron job and not explicitly.
Is there any I can check the same.
Sanket
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Authenticating pipelines called from a cron job
Posted by Christofer Dutz <ma...@c-ware.de>.
Hi Sanket,
do I understand you correct. You want your cronjob to execute an
external pipeline on the same cocoon instance the cron job is runing and
want to prevent external users from accessing the same pipeline
manually? Why not use an internal pipeline instead? You could create an
internal pipeline and har code authentication in this pipeline
<map:pipeline internal-only="true">
<map:match pattern="some-cron-pipeline">
<map:act type="auth-login">
<map:parameter name="handler" value="authhandler"/>
<map:parameter name="parameter_username"
value="{request-param:username}"/>
<map:parameter name="parameter_password"
value="{request-param:password}"/>
<map:parameter name="session-timeout" value="540"/>
<map:act type="auth-protect">
<map:parameter name="handler"
value="authhandler"/>
<map:generate/>
<map:transform/>
<map:serialize/>
</map:act>
</map:act>
</map:match>
Havent tested this thogh ...my CronJobs don't need authentication since
they are internal pipelines and I allways know who I am ;)
Chris
Sanket Pattekar schrieb:
> Hi,
>
> I am using a cron job that fires daily, which call the pipeline as
> follows
>
> <component
> class="org.apache.cocoon.components.cron.CocoonPipelineCronJob"
> logger="core"
> role="org.apache.cocoon.components.cron.CronJob/pipeline-daily">
> <pipeline>some-external-pipeline</pipeline>
> </component>
>
> The above cron job uses an extaernal pipeline, it can also be accessed
> by the external user. I want to prevent the same, and some
> authentication, so that this pipeline is only executed when called
> from a cron job and not explicitly.
>
> Is there any I can check the same.
>
> Sanket
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org