void addQualifier(String urlPattern) { if (WebPermissionUtil.implies(urlPattern, this.urlPatternSpec.substring(0,this.patternLength))) this.irrelevantByQualifier = true; this.urlPatternSpec.append(":" + urlPattern); }
MapValue (String urlPattern) { this.committed = false; this.patternType = WebPermissionUtil.patternType(urlPattern); this.patternLength = urlPattern.length(); this.irrelevantByQualifier = false; this.urlPatternSpec = new StringBuffer(urlPattern); otherConstraint = new ConstraintValue(); }
HashMap qpMap = parseConstraints(wbd); HashMap<String,Permissions> roleMap = new HashMap<String,Permissions>(); handleExcluded(excluded,m,name); handleRoles(roleMap,m,name); handleNoAuth(unchecked,m,name); handleConnections(unchecked,m,name);
public void loadPolicyConfiguration() throws PolicyContextException { boolean inService = getPolicyFactory().inService(CONTEXT_ID); // only regenerate policy file if it isn't already in service // Consequently all things that deploy modules (as apposed to // loading already deployed modules) must make sure pre-exiting // pc is either in deleted or open state before this method // (i.e. initialise) is called. That is, before constructing // the WebSecurityManager. Note that policy statements are not // removed to allow multiple web modules to be represented by same pc. if (!inService) { pc = getPolicyFactory().getPolicyConfiguration(CONTEXT_ID,false); try{ WebPermissionUtil.processConstraints(wbd, pc); WebPermissionUtil.createWebRoleRefPermission(wbd, pc); } catch (PolicyContextException pce){ logger.log(Level.FINE,"[Web-Security] FATAL Permission Generation: " + pce.getMessage()); throw pce; } } }
int otherUrlType = patternType(otherUrl); switch(patternType(url)) { if ((otherUrlType == PT_PREFIX || otherUrlType == PT_EXACT) && implies(url,otherUrl)) mValue.addQualifier(otherUrl); implies(otherUrl,url)) qpVal.getValue().addQualifier(url); if (otherUrlType == PT_PREFIX || (otherUrlType == PT_EXACT && implies(url,otherUrl))) mValue.addQualifier(otherUrl); if ((otherUrlType == PT_PREFIX || otherUrlType == PT_EXTENSION) && implies(otherUrl,url)) qpVal.getValue().addQualifier(url); else if (otherUrlType == PT_DEFAULT)
actions = "!" + MethodValue.getActions(methods); addToRoleMap(map,roleName,new WebResourcePermission(name,actions)); if (!roleMethods.isEmpty()) { String actions = MethodValue.getActions(roleMethods); addToRoleMap(map,roleName,new WebResourcePermission(name,actions));
HashMap qpMap = parseConstraints(wbd); HashMap<String,Permissions> roleMap = new HashMap<String,Permissions>(); handleExcluded(excluded,m,name); handleRoles(roleMap,m,name); handleNoAuth(unchecked,m,name); handleConnections(unchecked,m,name);
public void loadPolicyConfiguration() throws PolicyContextException { boolean inService = getPolicyFactory().inService(CONTEXT_ID); // only regenerate policy file if it isn't already in service // Consequently all things that deploy modules (as apposed to // loading already deployed modules) must make sure pre-exiting // pc is either in deleted or open state before this method // (i.e. initialise) is called. That is, before constructing // the WebSecurityManager. Note that policy statements are not // removed to allow multiple web modules to be represented by same pc. if (!inService) { pc = getPolicyFactory().getPolicyConfiguration(CONTEXT_ID,false); try{ WebPermissionUtil.processConstraints(wbd, pc); WebPermissionUtil.createWebRoleRefPermission(wbd, pc); } catch (PolicyContextException pce){ logger.log(Level.FINE,"[Web-Security] FATAL Permission Generation: " + pce.getMessage()); throw pce; } } }
int otherUrlType = patternType(otherUrl); switch(patternType(url)) { if ((otherUrlType == PT_PREFIX || otherUrlType == PT_EXACT) && implies(url,otherUrl)) mValue.addQualifier(otherUrl); implies(otherUrl,url)) qpVal.getValue().addQualifier(url); if (otherUrlType == PT_PREFIX || (otherUrlType == PT_EXACT && implies(url,otherUrl))) mValue.addQualifier(otherUrl); if ((otherUrlType == PT_PREFIX || otherUrlType == PT_EXTENSION) && implies(otherUrl,url)) qpVal.getValue().addQualifier(url); else if (otherUrlType == PT_DEFAULT)
actions = "!" + MethodValue.getActions(methods); addToRoleMap(map,roleName,new WebResourcePermission(name,actions)); if (!roleMethods.isEmpty()) { String actions = MethodValue.getActions(roleMethods); addToRoleMap(map,roleName,new WebResourcePermission(name,actions));
MapValue (String urlPattern) { this.patternType = WebPermissionUtil.patternType(urlPattern); this.patternLength = urlPattern.length(); this.irrelevantByQualifier = false; this.urlPatternSpec = new StringBuffer(urlPattern); otherConstraint = new ConstraintValue(); }
void addQualifier(String urlPattern) { if (WebPermissionUtil.implies(urlPattern, this.urlPatternSpec.substring(0,this.patternLength))) this.irrelevantByQualifier = true; this.urlPatternSpec.append(":" + urlPattern); }