You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Matthew Langham <ml...@s-und-n.de> on 2002/02/28 17:32:21 UTC

sunRise tutorial here

Hi,

This afternoon, I quickly (!) wrote up a tutorial on using the
authentication components (sunRise) that were part of the
portal/authentication package we donated a couple of weeks ago.
Basically these components can be used to protect access to pipelines by
defining a handler that then authenticates the user using pipelines.

The tutorial is not pretty :-) but it should serve as an additional source
of information if you want to get started using them.

http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.html

Any comments are welcome

Matthew

--
Open Source Group               sunShine - Lighting up e:Business
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
           Weblogging at: http://www.need-a-cake.com
=================================================================



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: sunRise tutorial here

Posted by Matthew Langham <ml...@s-und-n.de>.
>>
The current sitemap has some CR/LF conversion problems.  On my Win2K
machine some transfomers, serializers and actions are defined on 1
line.  Replacing the strange characters with CR in Word solved the
<<
Yes I noticed that as well. I used XMLCooktop and ran Format Current
XML -Tidy - that solved it.

Matthew

--
Open Source Group               sunShine - Lighting up e:Business
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
           Weblogging at: http://www.need-a-cake.com
=================================================================



-----Original Message-----
From: Bert Van Kets [mailto:bert@visitronics.be]
Sent: Friday, March 01, 2002 11:41 AM
To: cocoon-dev@xml.apache.org
Subject: RE: sunRise tutorial here



> >>
>Is the sunRise-login action defined anywhere?
><<
>Yes. If you build Cocoon with the authentication/portal then you will find
>the action in the sitemap:

The current sitemap has some CR/LF conversion problems.  On my Win2K
machine some transfomers, serializers and actions are defined on 1
line.  Replacing the strange characters with CR in Word solved the
problem.  Opening the sitemap in IE is also possible because then you get
the XML tree, although it's not editable then.  I'm not sure the XML parser
is included in the Mac version of IE.
Bert


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: sunRise tutorial here

Posted by Bert Van Kets <be...@visitronics.be>.
> >>
>Is the sunRise-login action defined anywhere?
><<
>Yes. If you build Cocoon with the authentication/portal then you will find
>the action in the sitemap:

The current sitemap has some CR/LF conversion problems.  On my Win2K 
machine some transfomers, serializers and actions are defined on 1 
line.  Replacing the strange characters with CR in Word solved the 
problem.  Opening the sitemap in IE is also possible because then you get 
the XML tree, although it's not editable then.  I'm not sure the XML parser 
is included in the Mac version of IE.
Bert


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: sunRise tutorial here

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 9:12 am +0100 1/3/02, Matthew Langham wrote:
>>>
>I am still trying to figure out how to pass people onto where they
>originally wanted to go ;)
><<
>;-) Ok, so perhaps it is not quite so easy to work out.
>
>Basically: When the handler redirects the user to the login page it passes a
>parameter 'resource' which contains the uri the user was originally trying
>to call. In the stylesheet that builds up the form, this parameter can then
>be appended to the <url>. In the tutorial it is hardcoded. Then this
>parameter will be passed to the authentication pipeline and can then be used
>in the redirect. (I will add this to the tutorial :-))


Thanks for this :)

I forget that Cocoon can redirect internally, thereby allowing parameter
passing!

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pa...@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: sunRise tutorial here

Posted by Matthew Langham <ml...@s-und-n.de>.
Jeremy,

>>
I particularly like the use of XSLT to do the checking, makes it very
adaptable.
<<
Please realize that this is only one possibility. You can use whatever you
like in the authentication pipeline. The only requirement is that the
authentication XML is returned for the user as shown. So it is no problem to
authenticate the user against a database, LDAP or a legacy system using the
relevant components.

>>
Is the sunRise-login action defined anywhere?
<<
Yes. If you build Cocoon with the authentication/portal then you will find
the action in the sitemap:

>>
  <map:action name="sunRise-login"
src="org.apache.cocoon.sunshine.sunrise.acting.LoginAction"
logger="sitemap.action.sunRise-login" />
<<

>>
How do you use the 'role' attribute in practice?
<<
Well the role attribute can be used for whatever purpose you want. It is
used in the portal to map the user to a particular role. Each role in the
portal can have a specific profile. Actually there is a slight problem
here - one we were meaning to change - but never got round to. The portal
uses the 'role' as it is returned from the authentication which is really
not correct - it should be possible to map the authentication 'role' into an
application specific 'role'. This would be far more flexible.

>>
I am still trying to figure out how to pass people onto where they
originally wanted to go ;)
<<
;-) Ok, so perhaps it is not quite so easy to work out.

Basically: When the handler redirects the user to the login page it passes a
parameter 'resource' which contains the uri the user was originally trying
to call. In the stylesheet that builds up the form, this parameter can then
be appended to the <url>. In the tutorial it is hardcoded. Then this
parameter will be passed to the authentication pipeline and can then be used
in the redirect. (I will add this to the tutorial :-))

>>
Are there examples of this in the Portal Demo? Sorry, I have not studied it
closely yet.
<<
Not sub-sitemap protection. The same authentication concept is used in the
portal - but the portal takes the sunRise concept quite a bit further (look
at the additional entries where the handler is defined).

HTH

Matthew

--
Open Source Group               sunShine - Lighting up e:Business
=================================================================
Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  mlangham@s-und-n.de - http://www.s-und-n.de
           Weblogging at: http://www.need-a-cake.com
=================================================================

regards Jeremy
--
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pa...@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: sunRise tutorial here

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 5:32 pm +0100 28/2/02, Matthew Langham wrote:
>Hi,
>
>This afternoon, I quickly (!) wrote up a tutorial on using the
>authentication components (sunRise) that were part of the
>portal/authentication package we donated a couple of weeks ago.
>Basically these components can be used to protect access to pipelines by
>defining a handler that then authenticates the user using pipelines.
>
>The tutorial is not pretty :-) but it should serve as an additional source
>of information if you want to get started using them.
>
>http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.html
>
>Any comments are welcome

I particularly like the use of XSLT to do the checking, makes it very
adaptable.

Is the sunRise-login action defined anywhere?

How do you use the 'role' attribute in practice?

I am still trying to figure out how to pass people onto where they
originally wanted to go ;)

I'd like to work out how to protect an entire sub-sitemap, with the minimum
of pipelines, added hopefully to the parent.

Are there examples of this in the Portal Demo? Sorry, I have not studied it
closely yet.

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pa...@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org