[JBoss JIRA] Created: (JBAS-5182) Retire EJB3 JaccHelper
by Anil Saldhana (JIRA)
Retire EJB3 JaccHelper
----------------------
Key: JBAS-5182
URL: http://jira.jboss.com/jira/browse/JBAS-5182
Project: JBoss Application Server
Issue Type: Task
Security Level: Public (Everyone can see)
Components: EJB3, Security
Affects Versions: JBossAS-5.0.0.Beta3
Reporter: Anil Saldhana
Assigned To: Anil Saldhana
Priority: Critical
Fix For: JBossAS-5.0.0.CR1
The entire EJB3 Jacc Layer needs to go. The Permissions creation will be done via a separate deployer working on the Metadata. The Policy enforcement will be done by the security layer. We have already consolidated the enforcement for web and ejb2 layers.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 4 months
[JBoss JIRA] Created: (SECURITY-371) Using SecurityDomain causing problems with DB access
by William Newman (JIRA)
Using SecurityDomain causing problems with DB access
----------------------------------------------------
Key: SECURITY-371
URL: https://jira.jboss.org/jira/browse/SECURITY-371
Project: JBoss Security and Identity Management
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: Using oracle db, running linux red hat
Reporter: William Newman
Assignee: Anil Saldhana
When using @SecurityDomain in EJB I try and get a connection to a database using a datasource other than the DefaultDS and it is somehow going to the driver defined for the DefaultDS.
Create a security domain, I used the BaseCertLoginModule. Then have two datasources setup, one that is named 'DefaultDS' and one that is named something else 'AnotherDS'. Configure each data source with a different driver. When you get inside a bean get the 'AnotherDS' and call getConnection, then call something like prepareStatment. Sit back and watch the driver for the 'DefaultDS' get called.
Something seems to be getting corrupted in JBoss when you use @SecurityDomain or when you set-up the context specific stuff for use with the security domain i.e. Context.SECURITY_PRINIPAL..
here is some of my code:
jboss.xml
<jboss>
<security-domain>java:/jaas/customSecurityDomain</security-domain>
<enterprise-beans>
<session>
<ejb-name>ExampleSession</ejb-name>
<local-jndi-name>ejb/ExampleSessionRef</local-jndi-name>
<clustered />
</session>
</enterprise-beans>
</jboss>
oracle-ds.xml (DefaultDS)
<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:oracle:thin:@host:1721:example</connection-url>
<driver-class>com.example.driver.ProxiedOracleDriver</driver-class>
<user-name>defaultds</user-name>
<password>defaultds</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
A different DS with a different driver
<datasources>
<local-tx-datasource>
<jndi-name>AnotherDS</jndi-name>
<connection-url>jdbc:oracle:thin:@host:1721:example</connection-url>
<driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
<user-name>anotherds</user-name>
<password>anotherds</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>Oracle10g</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
login-config.xml
<policy>
<application-policy name="client-cert">
<authentication>
<login-module code="org.jboss.security.auth.spi.BaseCertLoginModule" flag="required">
<module-option name="securityDomain">java:/jaas/client-cert</module-option>
<module-option name="verifier">org.jboss.security.auth.certs.AnyCertVerifier</module-option>
</login-module>
</authentication>
</application-policy>
<application-policy name="ASecurityDomain">
<authentication>
<login-module code="org.jboss.security.auth.spi.BaseCertLoginModule" flag="required">
<module-option name="password-stacking">useFirstPass</module-option>
<module-option name="securityDomain">java:/jaas/client-cert</module-option>
<module-option name="verifier">org.jboss.security.auth.certs.AnyCertVerifier</module-option>
<module-option name="unathenticatedIdentity">guest</module-option>
</login-module>
<login-module code="org.jboss.security.ClientLoginModule" flag="required">
<module-option name="restore-login-identity">true</module-option>
<module-option name="password-stacking">useFirstPass</module-option>
</login-module>
</authentication>
</application-policy>
</policy>
Code in an EJB to get db stuff:
@Resource(mappedName="java:/AnotherDS")
private DataSource ds;
.
.
.
Connection dbConn = ds.getConnection();
dbConn .prepareStatement("select * from Foo");
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 4 months
[JBoss JIRA] Created: (JBAS-6219) ManagementView.getTemplate() should return a new copy of the DeploymentTemplateInfo on every call
by Ian Springer (JIRA)
ManagementView.getTemplate() should return a new copy of the DeploymentTemplateInfo on every call
-------------------------------------------------------------------------------------------------
Key: JBAS-6219
URL: https://jira.jboss.org/jira/browse/JBAS-6219
Project: JBoss Application Server
Issue Type: Sub-task
Security Level: Public (Everyone can see)
Components: ProfileService
Reporter: Ian Springer
Assignee: Scott M Stark
In our create-resource code, we do the following:
DeploymentTemplateInfo template = managementView.getTemplate(templateName);
Map<String, ManagedProperty> managedProperties = template.getProperties();
// Update managedProperties according to the properties the user entered in the EmbJopr UI.
managementView.applyTemplate(ManagedDeployment.DeploymentPhase.APPLICATION, resourceName, template);
managementView.process();
This all works fine the first time through. The problem is the next time we execute the above code using the same templateName, getTemplate(() returns the same DeploymentTemplateInfo from the previous call (with the updates we made to its managedProperties). Instead, it should return a new "fresh" DeploymentTemplateInfo object that contains only the properties from the original template.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 4 months