Forwarding this to the group.

Jan

-------- Original Message --------
Subject: "run-as" servlet directive and JBoss
Date: Mon, 06 May 2002 20:06:41 +0100
From: Jan Bartel <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
CC: Greg Wilkins <[EMAIL PROTECTED]>, Jules Gosnell <[EMAIL PROTECTED]>

Scott,

We've been looking into implementing the servlet "run-as" tag for
Jetty/JBoss.

So far, Greg has added the following methods to the
org.mortbay.http.UserRealm interface:


   public UserPrincipal pushRole(UserPrincipal user, String role);
   public UserPrincipal popRole(UserPrincipal user);

The intention being to create a "new" principal, based on the old,
with a role added.  The new principle is associated with the request
while it is within the run-as servlet. The popRole call ends this
association and should return either the original principal or another
equivalent principal stripped of the role (assuming it did not have it
in the first place).

This has been added to the jboss cvs with null implementations and we
are now considering how to implement them in JBossUserRealm.

The issues I can see are:

+ ensuring that the change only affects the current thread, not
    all threads executing with the same user principal.  Jetty has this
    handled on the client side (we think).

+ integrating this with the JBoss security mechanism. This appears
    problematic, as the association between a principal and their roles is
    mediated by the JaasSecurityManager (eg simply adding a "pushRole"
    would affect all threads, not just the current thread (I think))

+ handling the anonymous user (SecurityAssociation.getPrincipal() == null)

+ How we allow the webapp to associate a new role with a principal,
    without giving that ability to all other clients.

Do you have any thoughts on how it would be best to go about this?

Jan



_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to