[Security & JAAS/JBoss] - Regarding the SubjectFactory and SecurityDomainJndiName iss
by kesi.wei
1. I defined a application policy in login-config.xml files in JBoss5.0.0GA
for example:
<application-policy name="bvdb-password-encrypted" >
| <authentication>
| <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
| <module-option name="username">bv1to6</module-option>
| <module-option name="password">68e9a814ca20b431</module-option>
| <module-option name="managedConnectionFactoryName">bv.ds:service=LocalTxCM,name=bv_framework.bvdbPool</module-option>
| </login-module>
| </authentication>
| </application-policy>
2. I add the following code in our DataSource.
<attribute name="SecurityDomainJndiName">bvdb-password-encrypted</attribute>
| <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
3. Now the login module can't work in JBoss5.0.0GA, It can work well in JBoss4.2.3GA. I study the BaseConnectionManager2.java code. It have the following code
private Subject getSubject()
| {
| Subject subject = null;
| if(subjectFactory != null && securityDomainJndiName != null)
| {
| subject = subjectFactory.createSubject(securityDomainJndiName);
| }
| if (trace)
| log.trace("subject: " + subject);
| return subject;
| }
4. If we don't pass subjectFactory. The subjectFactory is null. So we can't get subjcet. Now we want to know How to pass subjectFactory in our datasource in xml files.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224599#4224599
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224599
17 years
[JBoss Messaging] - Re: Problem with user authorization using JBM Bridge configu
by armsargis
Sorry I should provide info about JBoss before here is my version:
11:18:45,872 INFO [ServerImpl] JBoss (Microcontainer) [5.0.1.GA (build: SVNTag=JBoss_5_0_1_GA date=200902232048)] Started in 44s:525ms
I just copy default server configuration and I am using:
oracle-persistence-service.xml just and just change in DataSource. Please not I have not problem when I am working locally without bridging.
and here is my security config:
<!-- messaging application-policy definition -->
| <application-policy xmlns="urn:jboss:security-beans:1.0" name="messaging">
| <authentication>
| <login-module code="org.jboss.security.auth.spi.DatabaseServerLoginModule" flag="required">
| <module-option name="unauthenticatedIdentity">guest</module-option>
| <module-option name="dsJndiName">java:/FormMJMSDS</module-option>
| <module-option name="principalsQuery">SELECT PASSWD FROM JBM_USER WHERE USER_ID=?</module-option>
| <module-option name="rolesQuery">SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
| <bean name="SecurityStore" class="org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore">
| <!-- default security configuration -->
| <property name="defaultSecurityConfig">
| <![CDATA[
| <security>
| <role name="guest" read="true" write="true" create="true"/>
| </security>
| ]]>
| </property>
| <property name="suckerPassword">CHANGE ME!!</property>
| <property name="securityDomain">java:/jaas/messaging</property>
| <property name="securityManagement"><inject bean="JNDIBasedSecurityManagement"/></property>
| <!-- @JMX annotation to export the management view of this bean -->
| <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.messaging:service=SecurityStore",exposedInterface=org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStoreMBean.class)</annotation>
| </bean>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224598#4224598
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224598
17 years
[Installation, Configuration & DEPLOYMENT] - .ear file deployment problem in JBOSS5.0.1
by sekhar_td
Hi
I have an .ear file working in Jboss4.0.4.
I modified the <web-app> xsd version from 2.4 to 2.5 and deployed the .ear file in Jboss5.0.1. when i ran the Jboss I am getting below exception.
Please suggest me the solution to overcome this problem.
ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile:
org.jboss.deployers.spi.DeploymentException: Exception determining structure: AbstractVFSDeployment(auctions.ear)
at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:85)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineStructure(MainDeployerImpl.java:1000)
at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:440)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:390)
at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:300)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:303)
at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
at org.jboss.Main.boot(Main.java:209)
at org.jboss.Main$1.run(Main.java:547)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: Error determining structure: auctions.ear
at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:293)
at org.jboss.deployers.vfs.plugins.structure.StructureDeployerWrapper.determineStructure(StructureDeployerWrapper.java:73)
at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.doDetermineStructure(VFSStructuralDeployersImpl.java:196)
at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:221)
at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)
... 10 more
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: The ' = ' character must follow "http:" in the XML declaration. @ *unknown*[3,26]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:183)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:161)
at org.jboss.deployment.EARStructure.determineStructure(EARStructure.java:160)
... 14 more
Caused by: org.xml.sax.SAXException: The ' = ' character must follow "http:" in the XML declaration. @ *unknown*[3,26]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.fatalError(SaxJBossXBParser.java:432)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanPseudoAttribute(Unknown Source)
at org.apache.xerces.impl.XMLScanner.scanXMLDeclOrTextDecl(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanXMLDeclOrTextDecl(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$XMLDeclDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
... 17 more
Thanks,
Sekhar
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224587#4224587
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224587
17 years