-
1. Re: Regarding the SubjectFactory and SecurityDomainJndiName
kesi.wei Apr 9, 2009 6:09 AM (in response to kesi.wei)Should I write accoring to the following famat.
<depends optional-attribute-name="SubjectFactory">?????
What should write in ????? position ? Please help me!
Thanks. -
2. Re: Regarding the SubjectFactory and SecurityDomainJndiName
anil.saldhana Apr 10, 2009 6:13 AM (in response to kesi.wei)https://jira.jboss.org/jira/browse/JBAS-6768
There may be a bug. I will need to review. -
3. Re: Regarding the SubjectFactory and SecurityDomainJndiName
kesi.wei Apr 13, 2009 2:14 AM (in response to kesi.wei)I modify the getSubject method, We think that it should have default value.
private Subject getSubject() { subjectFactory = new JBossSecuritySubjectFactory(); ((JBossSecuritySubjectFactory) subjectFactory).setSecurityManagement(new JNDIBasedSecurityManagement()); Subject subject = null; if(subjectFactory != null && securityDomainJndiName != null) { subject = subjectFactory.createSubject(securityDomainJndiName); } if (trace) log.trace("subject: " + subject); return subject; }
-
4. Re: Regarding the SubjectFactory and SecurityDomainJndiName
michaelfgh Apr 14, 2009 6:28 AM (in response to kesi.wei)Regarding this problem, I find a xml file security-jboss-beans.xml (jboss-5.0.0.GA\server\default\deploy\security\), it has some as following sentences.
<!-- Instance of JBoss Security Subject Factory --> <bean name="JBossSecuritySubjectFactory" class="org.jboss.security.integration.JBossSecuritySubjectFactory"> <property name="securityManagement"><inject bean="JNDIBasedSecurityManagement" /></property> </bean>
Why it is not in use?
How can I use it?
Any help can be appreciated. -
5. Re: Regarding the SubjectFactory and SecurityDomainJndiName
jeff.zhang Apr 23, 2009 7:36 PM (in response to kesi.wei)The subjectFactory was injected indeed.
@kesi.wei, could you please post whole datasource file? -
6. Re: Regarding the SubjectFactory and SecurityDomainJndiName
kesi.wei Apr 26, 2009 5:41 PM (in response to kesi.wei)I send the datasource file to your mailbox. thanks!
-
7. Re: Regarding the SubjectFactory and SecurityDomainJndiName
jeff.zhang Apr 27, 2009 12:57 AM (in response to kesi.wei)The reason is you use mbean to configure datasource, so you should inject the subjectFactory, try this:
add line<attribute name="SubjectFactory"><inject bean="JBossSecuritySubjectFactory"/></attribute>
see if it works
BTW: if you use *-ds.xml to deploy datasource, you wouldn't see this fails.
<mbean code="org.jboss.resource.connectionmanager.TxConnectionManager" display-name="Broadvision TX data source: bv_framework.bvdbPool" name="bv.ds:service=LocalTxCM,name=bv_framework.bvdbPool">
<depends optional-attribute-name="ManagedConnectionPool">bv.ds:service=ManagedConnectionPool,name=bv_framework.BVRuntimeDBPool</depends>
<depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager</depends>
<depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
<attribute name="JndiName">bv/bv_framework/dataSource/bvdbPool</attribute>
<attribute name="SecurityDomainJndiName">bvdb-password-encrypted</attribute>
<depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
<attribute name="TrackConnectionByTx">true</attribute>
<attribute name="LocalTransactions">true</attribute>
</mbean> -
8. Re: Regarding the SubjectFactory and SecurityDomainJndiName
kesi.wei Apr 27, 2009 6:37 PM (in response to kesi.wei)Hi Jeff,
I try this following code in my datasource files.<attribute name="SubjectFactory"><inject bean="JBossSecuritySubjectFactory"/></attribute>
It can work well. Thanks a lot for you teacher's help. I feel the format is especial. Is it JBoss5.x new format ? -
9. Re: Regarding the SubjectFactory and SecurityDomainJndiName
jeff.zhang Apr 27, 2009 7:05 PM (in response to kesi.wei)Well, it is about JBoss MC(microcontainer). You could get some information from http://www.jboss.org/jbossmc/
-
10. Re: Regarding the SubjectFactory and SecurityDomainJndiName
kesi.wei Apr 27, 2009 7:13 PM (in response to kesi.wei)Ok , I will see and study the MC. Thanks a million!!!