You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Pesendorfer, Tom" <to...@eds.com> on 2005/02/09 19:35:08 UTC

Diagrams for login, authentication, LDAP handlers 1/3

From: Pesendorfer, Tom 
Sent: Thursday, 10 February 2005 7:18 AM
To: 'Jetspeed Users List'
Subject: Diagrams for login, authentication, LDAP handlers


Attached are 3 sequence diagrams (in 3 posts due to mail size limit) from
what I could follow in the code in an effort to understand what is
happening. The first one covers the login, the second one the portlet
security, and the third one the new LDAP handlers (by Mike Long).

Any clarifications, corrections, or additional details are very welcome!

The first question I have is: It seems the user is retrieved twice - once
(typically) inside the LoginModule (see first diagram), and then later on
when the SecurityValveImpl doesn't find a Subject in the session (if it's
the first time). Why is the Principal & Subject/credential not re-used from
when it was available in the LoginModule?  (if I were to do that, would it
remove the need for the UserSecurityHandler?)
Also, regarding the first diagram, how does the user/password end up with
the LoginModule - I assume this is done by JBoss' JAAS implementation,
correct?

Thanks & regards,
Tom




AW: Changing the webapp context on J2

Posted by Sven Thiergen <s....@itcampus.de>.
> OK ... got it!
>
> In order to change the default context in Jetspeed2 ... I still had to
take
> all the steps I outlined in my previous email (see below), but I had to
> perform them immediately after running Maven's "quickStart" task.
> Apparently, J2 does some type of initialization that "hard-codes" the
> context into the database ...

Indeed J2 does this! I had the problem that my own, Struts-based portlet
simply did not show any contents when I deployed it the first time. (I only
could see the Portlet title and the maximize/minimize etc. icons). The
JPetstore portlet (Struts-based, too), however showed content and I could
not see any differences between both of them, until ...

I looked at the database! J2 stores a lot of portlet and other information
here, so initialization, once done for a Portlet is only done in a "reduced"
manner on each following startup. That at least is my impression so far. It
helps, to run the Maven "quickStart" task, which - besides other tasks -
clears the database and refills the initial values. You may as well extract
the appropriate SQL scripts for your database and run them manually.


> in a place/manner I haven't yet identified for the
> portlets.  This happens the very first time you start-up J2.  So, the
moral
> of the story ... make your context change before you start J2 for the very
> first time ... or else, you're up the proverbial creek! ;-)

Apparently my own Portlet was not made up correctly in the first place, when
J2 registered it in the database and after correcting the mistakes it wasn't
re-initialized correctly, 'cause J2 finds some information in the database
and "skips initial deployment" (-> this you see in the "Logs").

Cleaning and reinitializing the database could solve you're webapp context
problem, too. Though it is a rather bad solution. Maybe one can find the
tables and fields that need to be cleared, to make J2 startup the next time
from scratch.

Sven.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


RE: Changing the webapp context on J2

Posted by Frank Villarreal <f_...@tetco.com>.
OK ... got it!

In order to change the default context in Jetspeed2 ... I still had to take
all the steps I outlined in my previous email (see below), but I had to
perform them immediately after running Maven's "quickStart" task.
Apparently, J2 does some type of initialization that "hard-codes" the
context into the database in a place/manner I haven't yet identified for the
portlets.  This happens the very first time you start-up J2.  So, the moral
of the story ... make your context change before you start J2 for the very
first time ... or else, you're up the proverbial creek! ;-)


- Frank

-----Original Message-----
From: Frank Villarreal [mailto:f_villarreal@tetco.com]
Sent: Thursday, February 10, 2005 09:14 AM
To: Jetspeed Users List
Subject: RE: Changing the webapp context on J2


Thanks for the info Chris.  This is a real bummer, kinda need this soon ...
like I said, I'm real close to making it work.  I'm able to page through the
site in my new context and see all my portlet "placeholders", but their
content all comes up "Reason: null".  I'll keep trying and post to this list
if I figure out how to get it done ... this is definately some type of
initialization issue.

- Frank

-----Original Message-----
From: Chris Custine [mailto:chris.custine@gmail.com]
Sent: Wednesday, February 09, 2005 09:17 PM
To: Jetspeed Users List
Subject: Re: Changing the webapp context on J2


You aren't the only one looking forward to this  ;-)  This has come up
several times on the list in the past few months, but apparently this
is not a trivial task, and I believe it currently requires some
re-work to the core JS2 codebase.  Unless I am mistaken, I don't think
this has been fully implemented yet.

Chris


On Wed, 9 Feb 2005 15:05:31 -0600, Frank Villarreal
<f_...@tetco.com> wrote:
> Hello all,
>
> I feel silly having to ask this, but this simple task hasn't been as
> straight-forward as I would like ....
>
> How do you give Jetspeed2 a new webapp context (instead of the default
> "/jetspeed").
>
> Here is what I've already tried ...
>
> 1) renamed "${tomcat_home}/webapps/jetspeed" to
> "${tomcat_home}/webapps/mysite"
> 2) renamed path & docBase attributes in
> "${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
> "mysite" respectively ...
> 3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
> table to "/mysite" for the record previously named "/jetspeed"
> 4) renamed the mapping for the jetspeed servlet in
> "${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...
>
>     <servlet-mapping>
>        <servlet-name>jetspeed</servlet-name>
>        <url-pattern>/mysite/*</url-pattern>
>     </servlet-mapping>
>
> Only after performing all 4 steps above was I able to view the portal in
the
> "/mysite" context (at least the decorators and layouts) .... BUTTTT ...
one
> thing is still vomiting on me ... my portlets all render as "Portlet is
not
> available: null Reason: null" without providing meaningful clues as to why
> in the logs (seems my portletDefinition objects are all null) ... hence my
> email, does anyone know why??? (Seems like I must be missing a setting
> somewhere).
>
> I'm so close, yet soooo far away .... :-(
>
> - Frank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


RE: Changing the webapp context on J2

Posted by Frank Villarreal <f_...@tetco.com>.
Thanks for the info Chris.  This is a real bummer, kinda need this soon ...
like I said, I'm real close to making it work.  I'm able to page through the
site in my new context and see all my portlet "placeholders", but their
content all comes up "Reason: null".  I'll keep trying and post to this list
if I figure out how to get it done ... this is definately some type of
initialization issue.

- Frank

-----Original Message-----
From: Chris Custine [mailto:chris.custine@gmail.com]
Sent: Wednesday, February 09, 2005 09:17 PM
To: Jetspeed Users List
Subject: Re: Changing the webapp context on J2


You aren't the only one looking forward to this  ;-)  This has come up
several times on the list in the past few months, but apparently this
is not a trivial task, and I believe it currently requires some
re-work to the core JS2 codebase.  Unless I am mistaken, I don't think
this has been fully implemented yet.

Chris


On Wed, 9 Feb 2005 15:05:31 -0600, Frank Villarreal
<f_...@tetco.com> wrote:
> Hello all,
>
> I feel silly having to ask this, but this simple task hasn't been as
> straight-forward as I would like ....
>
> How do you give Jetspeed2 a new webapp context (instead of the default
> "/jetspeed").
>
> Here is what I've already tried ...
>
> 1) renamed "${tomcat_home}/webapps/jetspeed" to
> "${tomcat_home}/webapps/mysite"
> 2) renamed path & docBase attributes in
> "${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
> "mysite" respectively ...
> 3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
> table to "/mysite" for the record previously named "/jetspeed"
> 4) renamed the mapping for the jetspeed servlet in
> "${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...
>
>     <servlet-mapping>
>        <servlet-name>jetspeed</servlet-name>
>        <url-pattern>/mysite/*</url-pattern>
>     </servlet-mapping>
>
> Only after performing all 4 steps above was I able to view the portal in
the
> "/mysite" context (at least the decorators and layouts) .... BUTTTT ...
one
> thing is still vomiting on me ... my portlets all render as "Portlet is
not
> available: null Reason: null" without providing meaningful clues as to why
> in the logs (seems my portletDefinition objects are all null) ... hence my
> email, does anyone know why??? (Seems like I must be missing a setting
> somewhere).
>
> I'm so close, yet soooo far away .... :-(
>
> - Frank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Changing the webapp context on J2

Posted by Chris Custine <ch...@gmail.com>.
You aren't the only one looking forward to this  ;-)  This has come up
several times on the list in the past few months, but apparently this
is not a trivial task, and I believe it currently requires some
re-work to the core JS2 codebase.  Unless I am mistaken, I don't think
this has been fully implemented yet.

Chris


On Wed, 9 Feb 2005 15:05:31 -0600, Frank Villarreal
<f_...@tetco.com> wrote:
> Hello all,
> 
> I feel silly having to ask this, but this simple task hasn't been as
> straight-forward as I would like ....
> 
> How do you give Jetspeed2 a new webapp context (instead of the default
> "/jetspeed").
> 
> Here is what I've already tried ...
> 
> 1) renamed "${tomcat_home}/webapps/jetspeed" to
> "${tomcat_home}/webapps/mysite"
> 2) renamed path & docBase attributes in
> "${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
> "mysite" respectively ...
> 3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
> table to "/mysite" for the record previously named "/jetspeed"
> 4) renamed the mapping for the jetspeed servlet in
> "${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...
> 
>     <servlet-mapping>
>        <servlet-name>jetspeed</servlet-name>
>        <url-pattern>/mysite/*</url-pattern>
>     </servlet-mapping>
> 
> Only after performing all 4 steps above was I able to view the portal in the
> "/mysite" context (at least the decorators and layouts) .... BUTTTT ... one
> thing is still vomiting on me ... my portlets all render as "Portlet is not
> available: null Reason: null" without providing meaningful clues as to why
> in the logs (seems my portletDefinition objects are all null) ... hence my
> email, does anyone know why??? (Seems like I must be missing a setting
> somewhere).
> 
> I'm so close, yet soooo far away .... :-(
> 
> - Frank
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Changing the webapp context on J2

Posted by Frank Villarreal <f_...@tetco.com>.
Hello all,

I feel silly having to ask this, but this simple task hasn't been as
straight-forward as I would like ....

How do you give Jetspeed2 a new webapp context (instead of the default
"/jetspeed").

Here is what I've already tried ...

1) renamed "${tomcat_home}/webapps/jetspeed" to
"${tomcat_home}/webapps/mysite"
2) renamed path & docBase attributes in
"${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
"mysite" respectively ...
3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
table to "/mysite" for the record previously named "/jetspeed"
4) renamed the mapping for the jetspeed servlet in
"${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...

    <servlet-mapping>
       <servlet-name>jetspeed</servlet-name>
       <url-pattern>/mysite/*</url-pattern>
    </servlet-mapping>


Only after performing all 4 steps above was I able to view the portal in the
"/mysite" context (at least the decorators and layouts) .... BUTTTT ... one
thing is still vomiting on me ... my portlets all render as "Portlet is not
available: null Reason: null" without providing meaningful clues as to why
in the logs (seems my portletDefinition objects are all null) ... hence my
email, does anyone know why??? (Seems like I must be missing a setting
somewhere).

I'm so close, yet soooo far away .... :-(

- Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Diagrams for login, authentication, LDAP handlers 1/3

Posted by David Le Strat <dl...@yahoo.com>.
Tom,

Thanks for putting this together...

See comments below:

--- "Pesendorfer, Tom" <to...@eds.com>
wrote:

> From: Pesendorfer, Tom 
> Sent: Thursday, 10 February 2005 7:18 AM
> To: 'Jetspeed Users List'
> Subject: Diagrams for login, authentication, LDAP
> handlers
> 
> 
> Attached are 3 sequence diagrams (in 3 posts due to
> mail size limit) from
> what I could follow in the code in an effort to
> understand what is
> happening. The first one covers the login, the
> second one the portlet
> security, and the third one the new LDAP handlers
> (by Mike Long).
> 
> Any clarifications, corrections, or additional
> details are very welcome!
> 
> The first question I have is: It seems the user is
> retrieved twice - once
> (typically) inside the LoginModule (see first
> diagram), and then later on
> when the SecurityValveImpl doesn't find a Subject in
> the session (if it's
> the first time). Why is the Principal &
> Subject/credential not re-used from
> when it was available in the LoginModule?  (if I
> were to do that, would it
> remove the need for the UserSecurityHandler?)

The UserSecurityHandler is used by the UserManager for
managing users also.

> Also, regarding the first diagram, how does the
> user/password end up with
> the LoginModule - I assume this is done by JBoss'
> JAAS implementation,
> correct?
> 
> Thanks & regards,
> Tom
> 
> 
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
jetspeed-user-help@jakarta.apache.org



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org