[JBoss Seam] - How to delegate/propagate Identity for authorization over ht
by PatrickMadden
Hi,
I've been working with seam and jboss for about a year and we're close to deployment. I have one major hurdle to cross before I'm satisfied however. It relates to enterprise security.
I have an enterprise grid based system where certain applications use JGroups, Seam, JBossAS and and others use Embedded JBoss + Seam + JGroups. All systems can authenticate against Microsoft's Active Directory.
In an enterprise there can be hundreds of my services running. All of this so far is working very nicely thanks to you guys.
However, I want to be able to authenticate to JBossAS and run code on other hosts based on the original logged in user. Its not authentication I'm worried about, its authorization. The authorization I'm looking for is File based.
For example, user authenticates on JBossAS against AD as a generic User/Power User/Admin etc agains AD. User runs a query and a result set is returned. The results come not from a database query but an enterprise query against my grid. User clicks on a result link in web browser where that will spawn a possible http/jndi request to access a file on a different machine.
I only want to allow access to that link if the user has sufficient privilege to the file on the remote host.
Does anyone know of a "simple" way of doing this? How do I pass the identity to my grid based services, all of which speak EJB and Seam.
I hope this makes sense to others.
Thanks so much in advance.
PVM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105705#4105705
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105705
18 years, 8 months
[JBoss Seam] - Slow integration test times with Embedded jboss
by cpopetz
I'm in the midst of transitioning a pretty large web app to use ejb3.0/seam. The app was in sort of a post-Struts1.2 state, i.e. several years of rolling our own internal framework to solve design problems until a decent web framework could come along.
It seems like seam/jsf/ejb3.0 matches what we need pretty closely. Thanks so much for the work that went into this design. It's been dreamy replacing spring-based xml injection and hand-coded injection with @Name and @In.
I made the design decision to make each action a seam component that is also a sfsb. They're all conversation scoped, though most never achieve long running conversation status. At this time we are also needing to convert to a cluster-aware 2nd level cache because our deployment has grown from 1 to 8 jboss instances running in a cluster, and the load on our database (of an unmentionable vendor) was just plain silly. This meant moving to using JTA, so that motivated making each action a session bean; then I got the transactions for free. (Well, free +/- two weeks of debugging.)
So far so good, but the biggest hurdle has been the test suite, which is big. We have a _lot_ of integration tests, written with a strutsTestCase based home-grown framework that mocks requests, executes the actions, compiles jsps with jasper, executes them, and walks the html output checking for things.
Now for why I'm posting: org.jboss.embedded.Bootstrap is slow. And seam startup is not speedy. It takes around 42 seconds to bootstrap everything. For automated continuous integration testing this is not a problem, but when writing an integration test it means tweak WAIT tweak WAIT...
I modeled the bootstrapping off SeamTest and seam-gen's libs/paths. I'm guessing the issue is that I have around 180 session beans, most all of which are stateful. Here's the breakdown of time (numbers are in seconds)
Bootstrap.deployResourceBases (28)
EJBStage2Deployer.deploy (24.5)
startPersistence units (7.8)
buildSessionFactory (3.8)
configure (4.0)
build mappings (1.7)
scanning for classes (1.1)
parse hbms (1.0)
registerEjbContainer: (15.5)
EJBContainer.create (6.6)
StatefulContainer.start (5.6)
(almost all of that is addJaccContext and callees)
AOPDependencyBuilder.getDependencies (2.8)
Ejb3Deployment.processEJBContainerMetadata (1.0)
EJBRegistrationDeployer.deploy (4.3)
Bootstrap.bootstrap (5.6)
DeploymentScanner.start (3.9)
seam initialization (7.0)
scan classes for components (3.5)
parse ejb-jar.xml (0.5)
look for all seam annotations in seam components (2.0)
init spring (1.0) (<-- needed for one last spring dependency I can't chuck.)
This is all on a P4 3.4GHz, 3GB RAM. The testng instance has been given a gig to work with, and isn't using it, so I'm not thrashing in GC.
So I'm wondering...are other people seeing this? Is it misconfiguration? Are there ways to make it faster? We're trying to be extremely test-driven, but 40 seconds is just too long to wait in a test-writing cycle.
Thanks for any help you can offer.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105695#4105695
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105695
18 years, 8 months
[JBoss Seam] - Re: Complex PDF generation and architecture question
by bolke
Ah thanks for the response. Indeed what iText is doing here pretty inconvenient. This makes me wonder why the choice for iText, besides being quite popular? Speed?
Jasper or Apache FOP could be candidates as well.
my current approach is slightly hackish. Using a facet with a name 'header' allows to get to the PdfWriter / Document before it gets opened. I was thinking about something along the lines of having a pageEvents tag with event tags as childs. Eg:
| <facet name="header">
| <p:pageEvents>
| <event name="onEndPage">
| ...
| </event>
| </p:pageEvents>
| </facet>
|
At the moment I end up with a wrapper around PdfPageEvent (if I remember correctly) which allows to 'register' events by adding it to a hashmap. But to be honest, it does not feel really nice and I am juggling with classes.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4105692#4105692
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4105692
18 years, 8 months