|
From: Anil S. <ani...@jb...> - 2006-07-07 16:41:29
|
User: asaldhana
Date: 06/07/07 12:41:25
Modified: src/main/org/jboss/web/tomcat/tc6 TomcatDeployer.java
Log:
JBAS-2673: replace the default xacml policy file for a web app and remove the private method to deprefix security domain
Revision Changes Path
1.3 +4 -20 jboss-tomcat/src/main/org/jboss/web/tomcat/tc6/TomcatDeployer.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TomcatDeployer.java
===================================================================
RCS file: /cvsroot/jboss/jboss-tomcat/src/main/org/jboss/web/tomcat/tc6/TomcatDeployer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- TomcatDeployer.java 28 Jun 2006 02:18:36 -0000 1.2
+++ TomcatDeployer.java 7 Jul 2006 16:41:25 -0000 1.3
@@ -45,6 +45,7 @@
import org.jboss.deployment.DeploymentInfo;
import org.jboss.metadata.WebMetaData;
import org.jboss.security.AuthorizationManager;
+import org.jboss.security.Util;
import org.jboss.security.authorization.PolicyRegistration;
import org.jboss.security.plugins.AuthorizationManagerServiceMBean;
import org.jboss.web.AbstractWebContainer;
@@ -62,7 +63,7 @@
*
* @author Sco...@jb...
* @author Costin Manolache
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public class TomcatDeployer extends AbstractWebDeployer
{
@@ -74,7 +75,7 @@
/**
* Optional XACML Policy File
*/
- private static final String XACML_POLICY_FILE = "WEB-INF/xacml-policy.xml";
+ private static final String XACML_POLICY_FILE = "WEB-INF/jboss-xacml-policy.xml";
private DeployerConfig config;
private String[] javaVMs =
@@ -385,7 +386,7 @@
if(metaData.getSecurityDomain() != null)
{
- String secDomain = getUnprefixedSecurityDomain(metaData.getSecurityDomain());
+ String secDomain = Util.unprefixSecurityDomain(metaData.getSecurityDomain());
//Associate the Context Id with the Security Domain
String contextID = metaData.getJaccContextID();
mapSecurityDomain(secDomain, contextID);
@@ -608,21 +609,4 @@
log.error("mapSecurityDomain::" + me.getLocalizedMessage());
}
}
-
- /**
- * Strip the security domain of prefix (java:jaas or java:jbsx)
- * @param securityDomain
- * @return
- */
- private String getUnprefixedSecurityDomain(String securityDomain)
- {
- String result = "";
- if(securityDomain.startsWith("java:/jaas"))
- result = securityDomain.substring("java:/jaas/".length());
- else
- if(securityDomain.startsWith("java:/jbsx"))
- result = securityDomain.substring("java:/jbsx/".length());
- return result;
-
- }
}
|