You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by ps...@comcen.com.au on 2001/05/16 13:01:33 UTC
Cleanest way to have multiple non-secure pages.. ?
Can someone kindly point towards the best method
of having multiple pages without the need to login first.
I know the doco says override SessionValidator. I just
want to verify that, that is the way it should be done.
Also, this projects tends to move quickly and maybe
there is a new way to do it..
It would be nice if there was an option in the configuration
that allowed you to set the pages which are not secure.
Thankyou,
Patrick Saunders.
ps. If you're P.O'd becuse its the 999th time its been asked, I have
looked in the FAQ, and I do RTM.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
VelocitySite example..
Posted by ps...@comcen.com.au.
Thanks Chris, thats fantastic!
I will give it a try tonight.
On a similar vein, I've still been unable to get the VelocitySite
example working. If I point to the HelloWorld.vm under the /templates
directory, I get prompted for a username/password.
Putting in turbine/turbine doesn't work, so I'm not sure if I've misconfigured
something or I need to 'something' to the database..
Thanks for your responses, they are appreciated,
Patrick.
Quoting Chris Campbell <ca...@zodiacnetworks.com>:
> Its very simple. I just set up a comma separated list like the following
> in
> TR.properties:
>
> action.sessionvalidator.templates.exclude=public/template1,public/template2
> action.sessionvalidator.actions.exclude=someaction1,someaction2
>
> enumerating all the resources that I want the session validator to
> ignore.
>
> Then in the session validator you call
>
> TurbineResources.getVector("action.sessionvalidator.templates.exclude",null)
>
> and get the template ( or action ) out of RunData
>
> And check to see if the vector contains the requested action ( or
> template
> or screen etc. ) and do the appropriate thing.
>
> Of course you only want to do this check if they are not logged in or
> else
> you'll be doing it with every request. You should also be aware that
> the
> LoginUser action is performed before the sessionvalidator inside
> Turbine.java as a special case - take a look. Doing this allows me to
> have
> the security of the TemplateSecureSessionValidator, but also be able to
> expose registration pages to the public... The manual may have some
> strange
> stuff in it, but the code is very flexible.
>
> Cheers,
> Chris
>
> ----- Original Message -----
> From: <ps...@comcen.com.au>
> To: <tu...@jakarta.apache.org>
> Sent: Wednesday, May 16, 2001 4:38 PM
> Subject: Re: Cleanest way to have multiple non-secure pages.. ?
>
>
> > Hi Chris,
> > yeah, I've been swearing at the manual too :) .
> > Seriously though,I think that is an excellent idea.
> >
> > Would this be a fairly easy thing to implement?
> > How do you define a list of something the TR.props?
> >
> > Patrick.
> >
> > Quoting Chris Campbell <ca...@zodiacnetworks.com>:
> > > The [f*ing ;-)] manual describes how to set up base secure screens
> and
> > > actions and then the screens that you want to be secure extend
> these.
> > > but I
> > > personally think that this is a poor way to set up security. In
> this
> > > case
> > > the security is hard coded in the system and not easily managable -
> not
> > > to
> > > mention that since multiple inheritance in java is not suported,
> you
> > > have to
> > > play inheritance games if you want your screen class to have some
> other
> > > functionality. Also, since the session validator is always
> executed,
> > > there
> > > is some redundancy in putting security checks explicitly in
> screens.
> > >
> > > I plan to write a session validator that will exlude certain module
> > > paths
> > > that are enumerated in TR.props, for example:
> > >
> > > action.sessionvalidator.exlude=org.company.modules.public
> > >
> > > Then it can parse the request and see if the action or screen falls
> > > under
> > > this path, exluding it from security checking. WDYT?
> > >
> > > Chris
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> turbine-user-help@jakarta.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Cleanest way to have multiple non-secure pages.. ?
Posted by Chris Campbell <ca...@zodiacnetworks.com>.
Its very simple. I just set up a comma separated list like the following in
TR.properties:
action.sessionvalidator.templates.exclude=public/template1,public/template2
action.sessionvalidator.actions.exclude=someaction1,someaction2
enumerating all the resources that I want the session validator to ignore.
Then in the session validator you call
TurbineResources.getVector("action.sessionvalidator.templates.exclude",null)
and get the template ( or action ) out of RunData
And check to see if the vector contains the requested action ( or template
or screen etc. ) and do the appropriate thing.
Of course you only want to do this check if they are not logged in or else
you'll be doing it with every request. You should also be aware that the
LoginUser action is performed before the sessionvalidator inside
Turbine.java as a special case - take a look. Doing this allows me to have
the security of the TemplateSecureSessionValidator, but also be able to
expose registration pages to the public... The manual may have some strange
stuff in it, but the code is very flexible.
Cheers,
Chris
----- Original Message -----
From: <ps...@comcen.com.au>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, May 16, 2001 4:38 PM
Subject: Re: Cleanest way to have multiple non-secure pages.. ?
> Hi Chris,
> yeah, I've been swearing at the manual too :) .
> Seriously though,I think that is an excellent idea.
>
> Would this be a fairly easy thing to implement?
> How do you define a list of something the TR.props?
>
> Patrick.
>
> Quoting Chris Campbell <ca...@zodiacnetworks.com>:
> > The [f*ing ;-)] manual describes how to set up base secure screens and
> > actions and then the screens that you want to be secure extend these.
> > but I
> > personally think that this is a poor way to set up security. In this
> > case
> > the security is hard coded in the system and not easily managable - not
> > to
> > mention that since multiple inheritance in java is not suported, you
> > have to
> > play inheritance games if you want your screen class to have some other
> > functionality. Also, since the session validator is always executed,
> > there
> > is some redundancy in putting security checks explicitly in screens.
> >
> > I plan to write a session validator that will exlude certain module
> > paths
> > that are enumerated in TR.props, for example:
> >
> > action.sessionvalidator.exlude=org.company.modules.public
> >
> > Then it can parse the request and see if the action or screen falls
> > under
> > this path, exluding it from security checking. WDYT?
> >
> > Chris
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Cleanest way to have multiple non-secure pages.. ?
Posted by ps...@comcen.com.au.
Hi Chris,
yeah, I've been swearing at the manual too :) .
Seriously though,I think that is an excellent idea.
Would this be a fairly easy thing to implement?
How do you define a list of something the TR.props?
Patrick.
Quoting Chris Campbell <ca...@zodiacnetworks.com>:
> The [f*ing ;-)] manual describes how to set up base secure screens and
> actions and then the screens that you want to be secure extend these.
> but I
> personally think that this is a poor way to set up security. In this
> case
> the security is hard coded in the system and not easily managable - not
> to
> mention that since multiple inheritance in java is not suported, you
> have to
> play inheritance games if you want your screen class to have some other
> functionality. Also, since the session validator is always executed,
> there
> is some redundancy in putting security checks explicitly in screens.
>
> I plan to write a session validator that will exlude certain module
> paths
> that are enumerated in TR.props, for example:
>
> action.sessionvalidator.exlude=org.company.modules.public
>
> Then it can parse the request and see if the action or screen falls
> under
> this path, exluding it from security checking. WDYT?
>
> Chris
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Cleanest way to have multiple non-secure pages.. ?
Posted by Chris Campbell <ca...@zodiacnetworks.com>.
> > The [f*ing ;-)] manual describes how to set up base secure screens and
> > actions and then the screens that you want to be secure extend these.
but
> I
> > personally think that this is a poor way to set up security.
>
> Yeah its a bad idea until some jerk
> by mistake adds org.myprogram.Customers.ShowAllCreditCards to
> action.sessionvalidator.templates.exclude, or just org.myprogram.Customers
> (or org.myprogram) if it inherits settings.
> Hardcoding is less flexible, but when it comes to security that is
sometimes
> better.
>
I see your point, but your describing a business decision, not an
engineering one. I think the business decisions should be easily
re-configurable considering how often business/product management decisions
change/evolve around here. I see it as extending the MVC pattern to the
development process (he he he, maybe EPM engineer-product-manager).
Luckily, Turbine lets you do it both ways.
Cheers,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Cleanest way to have multiple non-secure pages.. ?
Posted by Kasper Nielsen <ne...@kav.dk>.
----- Original Message -----
From: "Chris Campbell" <ca...@zodiacnetworks.com>
To: <tu...@jakarta.apache.org>
Sent: Wednesday, May 16, 2001 7:31 PM
Subject: Re: Cleanest way to have multiple non-secure pages.. ?
> The [f*ing ;-)] manual describes how to set up base secure screens and
> actions and then the screens that you want to be secure extend these. but
I
> personally think that this is a poor way to set up security.
Yeah its a bad idea until some jerk
by mistake adds org.myprogram.Customers.ShowAllCreditCards to
action.sessionvalidator.templates.exclude, or just org.myprogram.Customers
(or org.myprogram) if it inherits settings.
Hardcoding is less flexible, but when it comes to security that is sometimes
better.
- Kasper
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Cleanest way to have multiple non-secure pages.. ?
Posted by Chris Campbell <ca...@zodiacnetworks.com>.
The [f*ing ;-)] manual describes how to set up base secure screens and
actions and then the screens that you want to be secure extend these. but I
personally think that this is a poor way to set up security. In this case
the security is hard coded in the system and not easily managable - not to
mention that since multiple inheritance in java is not suported, you have to
play inheritance games if you want your screen class to have some other
functionality. Also, since the session validator is always executed, there
is some redundancy in putting security checks explicitly in screens.
I plan to write a session validator that will exlude certain module paths
that are enumerated in TR.props, for example:
action.sessionvalidator.exlude=org.company.modules.public
Then it can parse the request and see if the action or screen falls under
this path, exluding it from security checking. WDYT?
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Configuring VelocitySite... confused.....
Posted by John McNally <jm...@collab.net>.
The page property is setting up the Page module that Turbine will pass
control to in order to generate the response/handle input/etc. You
generally want to pick the one that corresponds to the template system
you are using none->DefaultPage, FreeMarker,WebMacro,JSP, and Velocity
pages should be obvious.
the screen.login and screen.homepage properties will be ignored, if you
are using a template system as the template.login and template.homepage
will be used to specify these special templates. If you are not using a
template system, you would specify the Java classes that will handle the
special cases.
john mcnally
psaunder@comcen.com.au wrote:
>
> Well, don't keep me in suspense! Why does getting answer feel like
> I'm pulling teeth?
>
> I sorta figured that they were class names from looking at the doco, but knowing
> that doesn't guide me as to what the effect is..
>
> patrick.
>
> Quoting John McNally <jm...@collab.net>:
>
> > psaunder@comcen.com.au wrote:
> > >
> > > Hi,
> > > Yep, me again. I'm a little confused about how to set up VelocitySite
> > for
> > > Turbine. The Turbine docs mentions the following under 'VelocitySite
> > Services'.
> > > Is this it, or something extra?
> > > Also, below, where I put '???' next the settings, what does this mean?
> > Why are
> > > these not the names of template files?
> > >
> > > Basically, it appears as if Turbine is configured to Velocity out of
> > the box,
> > > but the docos says to do certain things..
> > >
> > > -----------
> > > First set the following properties in TurbineResources.properties
> > located in the
> > > Turbine/conf directory.
> > > * default.template=/Default.vm
> > > * template.homepage=/Index.vm
> > > * screen.login=VelocitySiteScreen ???
> > > * screen.homepage=VelocitySiteScreen ???
> > > * default.page=VelocitySitePage ???
> > > *
> > action.sessionvalidator=sessionvalidator.VelocitySiteSessionValidato
> > > ---------------
> > >
> >
> >
> > the questioned properties are pointing to java classes; two are Screens
> > the other is a Page
> >
> > john mcnally
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Configuring VelocitySite... success!
Posted by pat comcen <ps...@comcen.com.au>.
Just a big thankyou to everyone who responded to my
request for assistance (translated: if I don't this to work I'm strangle
myself with my mouse). :)
Bit by bit, I modified the sample application until it started to look like
what I wanted.
Here are some things I did wrong the first time around:
* put HelloWorld.class in my /classes dir, instead of
/classes/com.company.app/modules/screens/
(The doco wasn't specific on this, but I should have known better)
* Created a new SessionValidator .:((
* Didn't get example working first.
* In general, mucked with TR.props w/o really understanding... :-o
Moving to 2.1b also seemed to smooth things out..
So.. at least things are moving! :))
Thanks again to the Turbine team and all people who sent me direct emal..
Regards,
Patrick Saunders.
----- Original Message -----
From: <ps...@comcen.com.au>
To: <tu...@jakarta.apache.org>
Sent: Thursday, May 17, 2001 11:01 PM
Subject: Re: Configuring VelocitySite... confused.....
> Well, don't keep me in suspense! Why does getting answer feel like
> I'm pulling teeth?
>
> I sorta figured that they were class names from looking at the doco, but
knowing
> that doesn't guide me as to what the effect is..
>
> patrick.
>
> Quoting John McNally <jm...@collab.net>:
>
> > psaunder@comcen.com.au wrote:
> > >
> > > Hi,
> > > Yep, me again. I'm a little confused about how to set up VelocitySite
> > for
> > > Turbine. The Turbine docs mentions the following under 'VelocitySite
> > Services'.
> > > Is this it, or something extra?
> > > Also, below, where I put '???' next the settings, what does this mean?
> > Why are
> > > these not the names of template files?
> > >
> > > Basically, it appears as if Turbine is configured to Velocity out of
> > the box,
> > > but the docos says to do certain things..
> > >
> > > -----------
> > > First set the following properties in TurbineResources.properties
> > located in the
> > > Turbine/conf directory.
> > > * default.template=/Default.vm
> > > * template.homepage=/Index.vm
> > > * screen.login=VelocitySiteScreen ???
> > > * screen.homepage=VelocitySiteScreen ???
> > > * default.page=VelocitySitePage ???
> > > *
> > action.sessionvalidator=sessionvalidator.VelocitySiteSessionValidato
> > > ---------------
> > >
> >
> >
> > the questioned properties are pointing to java classes; two are Screens
> > the other is a Page
> >
> > john mcnally
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Configuring VelocitySite... confused.....
Posted by ps...@comcen.com.au.
Well, don't keep me in suspense! Why does getting answer feel like
I'm pulling teeth?
I sorta figured that they were class names from looking at the doco, but knowing
that doesn't guide me as to what the effect is..
patrick.
Quoting John McNally <jm...@collab.net>:
> psaunder@comcen.com.au wrote:
> >
> > Hi,
> > Yep, me again. I'm a little confused about how to set up VelocitySite
> for
> > Turbine. The Turbine docs mentions the following under 'VelocitySite
> Services'.
> > Is this it, or something extra?
> > Also, below, where I put '???' next the settings, what does this mean?
> Why are
> > these not the names of template files?
> >
> > Basically, it appears as if Turbine is configured to Velocity out of
> the box,
> > but the docos says to do certain things..
> >
> > -----------
> > First set the following properties in TurbineResources.properties
> located in the
> > Turbine/conf directory.
> > * default.template=/Default.vm
> > * template.homepage=/Index.vm
> > * screen.login=VelocitySiteScreen ???
> > * screen.homepage=VelocitySiteScreen ???
> > * default.page=VelocitySitePage ???
> > *
> action.sessionvalidator=sessionvalidator.VelocitySiteSessionValidato
> > ---------------
> >
>
>
> the questioned properties are pointing to java classes; two are Screens
> the other is a Page
>
> john mcnally
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Configuring VelocitySite... confused.....
Posted by John McNally <jm...@collab.net>.
psaunder@comcen.com.au wrote:
>
> Hi,
> Yep, me again. I'm a little confused about how to set up VelocitySite for
> Turbine. The Turbine docs mentions the following under 'VelocitySite Services'.
> Is this it, or something extra?
> Also, below, where I put '???' next the settings, what does this mean? Why are
> these not the names of template files?
>
> Basically, it appears as if Turbine is configured to Velocity out of the box,
> but the docos says to do certain things..
>
> -----------
> First set the following properties in TurbineResources.properties located in the
> Turbine/conf directory.
> * default.template=/Default.vm
> * template.homepage=/Index.vm
> * screen.login=VelocitySiteScreen ???
> * screen.homepage=VelocitySiteScreen ???
> * default.page=VelocitySitePage ???
> * action.sessionvalidator=sessionvalidator.VelocitySiteSessionValidato
> ---------------
>
the questioned properties are pointing to java classes; two are Screens
the other is a Page
john mcnally
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Configuring VelocitySite... confused.....
Posted by Jason van Zyl <jv...@apache.org>.
psaunder@comcen.com.au wrote:
>
> Hi,
> Yep, me again. I'm a little confused about how to set up VelocitySite for
> Turbine. The Turbine docs mentions the following under 'VelocitySite Services'.
> Is this it, or something extra?
> Also, below, where I put '???' next the settings, what does this mean? Why are
> these not the names of template files?
>
> Basically, it appears as if Turbine is configured to Velocity out of the box,
> but the docos says to do certain things..
>
> -----------
> First set the following properties in TurbineResources.properties located in the
> Turbine/conf directory.
> * default.template=/Default.vm
> * template.homepage=/Index.vm
> * screen.login=VelocitySiteScreen ???
> * screen.homepage=VelocitySiteScreen ???
> * default.page=VelocitySitePage ???
> * action.sessionvalidator=sessionvalidator.VelocitySiteSessionValidato
> ---------------
>
> Any clarrifications are appreciated!
> Thankyou,
I'll being the documentation for Velocity site today along
with new torque docuementation. Patience.
> Patrick.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
--
jvz.
Jason van Zyl
jvanzyl@apache.org
http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Configuring VelocitySite... confused.....
Posted by ps...@comcen.com.au.
Hi,
Yep, me again. I'm a little confused about how to set up VelocitySite for
Turbine. The Turbine docs mentions the following under 'VelocitySite Services'.
Is this it, or something extra?
Also, below, where I put '???' next the settings, what does this mean? Why are
these not the names of template files?
Basically, it appears as if Turbine is configured to Velocity out of the box,
but the docos says to do certain things..
-----------
First set the following properties in TurbineResources.properties located in the
Turbine/conf directory.
* default.template=/Default.vm
* template.homepage=/Index.vm
* screen.login=VelocitySiteScreen ???
* screen.homepage=VelocitySiteScreen ???
* default.page=VelocitySitePage ???
* action.sessionvalidator=sessionvalidator.VelocitySiteSessionValidato
---------------
Any clarrifications are appreciated!
Thankyou,
Patrick.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Cleanest way to have multiple non-secure pages.. ?
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/16/01 4:01 AM, "psaunder@comcen.com.au" <ps...@comcen.com.au> wrote:
> Can someone kindly point towards the best method
> of having multiple pages without the need to login first.
>
> I know the doco says override SessionValidator. I just
> want to verify that, that is the way it should be done.
Yup. This hasn't changed in years.
> It would be nice if there was an option in the configuration
> that allowed you to set the pages which are not secure.
We welcome your contributions.
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org