[Security & JAAS/JBoss] - Re: After Login standalone client -> getCallerPrincipal on
by noFreak
Here are more Traces which makes me confused:
2008-09-05 10:07:44,984 TRACE [org.jboss.security.ClientLoginModule] Security domain: orga-security
| 2008-09-05 10:07:44,984 TRACE [org.jboss.security.ClientLoginModule] Enabling multi-threaded mode
| 2008-09-05 10:07:44,984 TRACE [org.jboss.security.ClientLoginModule] Enabling restore-login-identity mode
| 2008-09-05 10:07:44,984 TRACE [org.jboss.security.ClientLoginModule] Enabling useFirstPass mode
| 2008-09-05 10:07:44,984 TRACE [org.jboss.security.ClientLoginModule] Begin login
| 2008-09-05 10:07:45,406 TRACE [org.jboss.security.ClientLoginModule] commit, subject=Betreff:
| Principal: username
| Principal: Roles(members:admin,read)
|
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.SecurityAssociation] pushSubjectContext, subject=Betreff:
| Principal: username
| Principal: Roles(members:admin,read)
| , sc=org.jboss.security.SecurityAssociation$SubjectContext@ee6ba6{principal=username,subject=14519264}
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] defaultLogin, lc=javax.security.auth.login.LoginContext@10a3f5e, subject=Subject(14519264).principals=org.jboss.security.SimplePrincipal@30812805(username)org.jboss.security.SimpleGroup@6401464(Roles(members:admin,read))
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] updateCache, inputSubject=Subject(14519264).principals=org.jboss.security.SimplePrincipal@30812805(username)org.jboss.security.SimpleGroup@6401464(Roles(members:admin,read)), cacheSubject=Subject(29775540).principals=org.jboss.security.SimplePrincipal@30812805(username)org.jboss.security.SimpleGroup@6401464(Roles(members:admin,read))
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] Inserted cache info: org.jboss.security.plugins.JaasSecurityManager$DomainInfo@666f6a[Subject(29775540).principals=org.jboss.security.SimplePrincipal@30812805(username)org.jboss.security.SimpleGroup@6401464(Roles(members:admin,read)),credential.class=java.lang.String@22591049,expirationTime=1220603840125]
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] End isValid, true
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.SecurityAssociation] pushSubjectContext, subject=Betreff:
| Principal: username
| Principal: Roles(members:admin,read)
| , sc=org.jboss.security.SecurityAssociation$SubjectContext@e11d0e{principal=,subject=20623813}
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.SecurityAssociation] getPrincipal, principal=
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.SecurityAssociation] getSubject, sc=org.jboss.security.SecurityAssociation$SubjectContext@e11d0e{principal=,subject=20623813}
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] doesUserHaveRole(Set), subject: Betreff:
| Principal: username
| Principal: Roles(members:admin,read)
|
| 2008-09-05 10:07:45,421 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] roles=Roles(members:admin,read)
| 2008-09-05 10:07:45,437 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] hasRole(read)=true
| 2008-09-05 10:07:45,437 TRACE [org.jboss.security.plugins.JaasSecurityManager.orga-security] hasRole=true
| 2008-09-05 10:07:45,484 TRACE [org.jboss.security.SecurityAssociation] getPrincipal, principal=
| 2008-09-05 10:07:45,484 TRACE [org.jboss.security.SecurityAssociation] pushSubjectContext, subject=null, sc=org.jboss.security.SecurityAssociation$SubjectContext@8f11a6{principal=,subject=null}
| 2008-09-05 10:07:45,562 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4999586060288000
username = correct principal
admin, read = correct roles
I don't understand why at the most entrys, the correct username and roles a listed. I seems that they are commited by the ClientLoginModule. But in the last two trace logs, the principal and the subject are null...
I still can't use the getCallerPrincipal() method get to work... :(...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174509#4174509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174509
17 years, 10 months
[EJB 3.0] - Re: CNF on Exploded Jar in app.ear/lib
by skajotde
"jaikiran" wrote :
| When i had tested it, the jar file was exploded and at the root of the EAR. In your case, is the jar file in zip format or is it exploded? And are you seeing issues if you place a zipped jar file in the lib folder of the EAR (this is something i had not tried)?
In https://jira.jboss.org/jira/browse/EJBTHREE-1254?focusedCommentId=1242828... I think my case is explained ;>
anonymous wrote : After patch mentioned in forum thread (thanks jakiran ;>) On JBoss 4.2.1 there is additional problem (but close so comment here):
|
| If library from <jar-file> is also exploded and is situated in lib directory there is problem CNF from this library.
|
| Application.ear\lib\exploded-library-with-persistence-ob.jar has persistence.xml with
|
| {quote}
| <jar-file>../exploded-library-lib-ob.jar</jar-file>
| <jar-file>../../exploded-library-ob.jar</jar-file>
| <jar-file>../library-ob.jar</jar-file>
| {quote}
|
| Structure jars:
|
| Application.ear\lib\exploded-library-lib-ob.jar
| Application.ear\exploded-library-ob.jar
| Application.ear\lib\library-ob.jar
|
| On scanning persistence unit from exploded-library-with-persistence-ob.jar there is CNF while addind entity from Application.ear\lib\exploded-library-lib-ob.jar to PU. Scanning Application.ear\lib\library-ob.jar and Application.ear\exploded-library-ob.jar is OK.
|
| So Workaround is to move Application.ear\lib\exploded-library-lib-ob.jar to Application.ear. Any other options ?
It is default structure for our project so I don't want be too invasive. Now I'm testing exploded deployment to boost developing. We are using maven2.
My ear is exploded (Application.ear)
My persistence library is in lib and is exploded (Application.ear\lib\exploded-library-with-persistence-ob.jar)
When library is in lib and not exploded and referenced from <jar-file> there is no problem (Application.ear\lib\library-ob.jar).
When library is in lib and exploded and referenced from <jar-file> there is CNF (Application.ear\lib\exploded-library-lib-ob.jar)
When library is in root and exploded and referenced from <jar-file> there is no problem (Application.ear\exploded-library2-ob.jar)
"jaikiran" wrote :
| "skajotde" wrote :
| | Thanks, I'll try java module in our maven build.
| |
|
| Let us know how it goes.
Thanks for clue ;> It resolved problem ;>
For the moment I need only two jarModule exploded (ejb, war are exploded with no problem and are situated in root) so I revert to lib directory and I add Application.ear\lib\exploded-library-lib-ob.jar as java module to application.xml.
Application deploys successful.
<plugin>
| <groupId>org.apache.maven.plugins</groupId>
| <artifactId>maven-ear-plugin</artifactId>
| <configuration>
| <unpackTypes>ejb,war,sar,rar</unpackTypes>
| <workDirectory>${basedir}/target/30-${project.build.finalName}.${packaging}</workDirectory>
| <modules>
| <!-- required changes from https://jira.jboss.org/jira/browse/EJBTHREE-1254 -->
| <jarModule>
| <groupId>pl.skajotde.tests</groupId>
| <artifactId>exploded-library-with-persistence-ob.jar</artifactId>
| <unpack>true</unpack>
| </jarModule>
| <jarModule>
| <groupId>pl.skajotde.tests</groupId>
| <artifactId>exploded-library-lib-ob.jar</artifactId>
| <unpack>true</unpack>
| <includeInApplicationXml>true</includeInApplicationXml>
| </jarModule>
| </modules>
| </configuration>
| </plugin>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174508#4174508
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174508
17 years, 10 months