public SecurityConstaintBuilder authConstraint(final boolean authConstraint) { securityConstraint.setAuthConstraint(authConstraint); return this; }
public SecurityConstaintBuilder authConstraint(final boolean authConstraint) { securityConstraint.setAuthConstraint(authConstraint); return this; }
public void setAuthConstraint(final boolean authConstraint) { securityConstraint.setAuthConstraint(authConstraint); }
public void setAuthConstraint(final boolean authConstraint) { securityConstraint.setAuthConstraint(authConstraint); }
private static void handleOmittedMethods(Set<String> omittedMethods, String pattern, boolean denyUncoveredHttpMethods, List<SecurityConstraint> newConstraints, Log log) { if (omittedMethods.size() > 0) { StringBuilder msg = new StringBuilder(); for (String method : omittedMethods) { msg.append(method); msg.append(' '); } if (denyUncoveredHttpMethods) { log.info(sm.getString( "securityConstraint.uncoveredHttpOmittedMethodFix", pattern, msg.toString().trim())); SecurityCollection collection = new SecurityCollection(); for (String method : omittedMethods) { collection.addMethod(method); } collection.addPatternDecoded(pattern); collection.setName("deny-uncovered-http-methods"); SecurityConstraint constraint = new SecurityConstraint(); constraint.setAuthConstraint(true); constraint.addCollection(collection); newConstraints.add(constraint); } else { log.error(sm.getString( "securityConstraint.uncoveredHttpOmittedMethod", pattern, msg.toString().trim())); } } } }
private static void handleOmittedMethods(Set<String> omittedMethods, String pattern, boolean denyUncoveredHttpMethods, List<SecurityConstraint> newConstraints, Log log) { if (omittedMethods.size() > 0) { StringBuilder msg = new StringBuilder(); for (String method : omittedMethods) { msg.append(method); msg.append(' '); } if (denyUncoveredHttpMethods) { log.info(sm.getString( "securityConstraint.uncoveredHttpOmittedMethodFix", pattern, msg.toString().trim())); SecurityCollection collection = new SecurityCollection(); for (String method : omittedMethods) { collection.addMethod(method); } collection.addPatternDecoded(pattern); collection.setName("deny-uncovered-http-methods"); SecurityConstraint constraint = new SecurityConstraint(); constraint.setAuthConstraint(true); constraint.addCollection(collection); newConstraints.add(constraint); } else { log.error(sm.getString( "securityConstraint.uncoveredHttpOmittedMethod", pattern, msg.toString().trim())); } } } }
collection.setName("deny-uncovered-http-methods"); SecurityConstraint constraint = new SecurityConstraint(); constraint.setAuthConstraint(true); constraint.addCollection(collection); newConstraints.add(constraint);
collection.setName("deny-uncovered-http-methods"); SecurityConstraint constraint = new SecurityConstraint(); constraint.setAuthConstraint(true); constraint.addCollection(collection); newConstraints.add(constraint);
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { SecurityConstraint securityConstraint = (SecurityConstraint) digester.peek(); securityConstraint.setAuthConstraint(true); if (digester.getLogger().isDebugEnabled()) { digester.getLogger() .debug("Calling SecurityConstraint.setAuthConstraint(true)"); } }
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { SecurityConstraint securityConstraint = (SecurityConstraint) digester.peek(); securityConstraint.setAuthConstraint(true); if (digester.getLogger().isDebugEnabled()) { digester.getLogger() .debug("Calling SecurityConstraint.setAuthConstraint(true)"); } }
@Override public void begin(String namespace, String name, Attributes attributes) throws Exception { SecurityConstraint securityConstraint = (SecurityConstraint) digester.peek(); securityConstraint.setAuthConstraint(true); if (digester.getLogger().isDebugEnabled()) { digester.getLogger() .debug("Calling SecurityConstraint.setAuthConstraint(true)"); } }
collection.setName("deny-uncovered-http-methods"); SecurityConstraint constraint = new SecurityConstraint(); constraint.setAuthConstraint(true); constraint.addCollection(collection); newConstraints.add(constraint); collection.setName("deny-uncovered-http-methods"); SecurityConstraint constraint = new SecurityConstraint(); constraint.setAuthConstraint(true); constraint.addCollection(collection); newConstraints.add(constraint); collection.setName("deny-uncovered-http-methods"); SecurityConstraint constraint = new SecurityConstraint(); constraint.setAuthConstraint(true); constraint.addCollection(collection); newConstraints.add(constraint);
if(authRole.equals("*") || authRole.equals("**")) { tomcatConstraint.setAuthConstraint(true);
private static SecurityConstraint createConstraint( HttpConstraintElement element, String urlPattern, boolean alwaysCreate) { SecurityConstraint constraint = new SecurityConstraint(); SecurityCollection collection = new SecurityCollection(); boolean create = alwaysCreate; if (element.getTransportGuarantee() != ServletSecurity.TransportGuarantee.NONE) { constraint.setUserConstraint(element.getTransportGuarantee().name()); create = true; } if (element.getRolesAllowed().length > 0) { String[] roles = element.getRolesAllowed(); for (String role : roles) { constraint.addAuthRole(role); } create = true; } if (element.getEmptyRoleSemantic() != EmptyRoleSemantic.PERMIT) { constraint.setAuthConstraint(true); create = true; } if (create) { collection.addPattern(urlPattern); constraint.addCollection(collection); return constraint; } return null; }
private static SecurityConstraint createConstraint( HttpConstraintElement element, String urlPattern, boolean alwaysCreate) { SecurityConstraint constraint = new SecurityConstraint(); SecurityCollection collection = new SecurityCollection(); boolean create = alwaysCreate; if (element.getTransportGuarantee() != ServletSecurity.TransportGuarantee.NONE) { constraint.setUserConstraint(element.getTransportGuarantee().name()); create = true; } if (element.getRolesAllowed().length > 0) { String[] roles = element.getRolesAllowed(); for (String role : roles) { constraint.addAuthRole(role); } create = true; } if (element.getEmptyRoleSemantic() != EmptyRoleSemantic.PERMIT) { constraint.setAuthConstraint(true); create = true; } if (create) { collection.addPattern(urlPattern); constraint.addCollection(collection); return constraint; } return null; }
private static SecurityConstraint createConstraint( HttpConstraintElement element, String urlPattern, boolean alwaysCreate) { SecurityConstraint constraint = new SecurityConstraint(); SecurityCollection collection = new SecurityCollection(); boolean create = alwaysCreate; if (element.getTransportGuarantee() != ServletSecurity.TransportGuarantee.NONE) { constraint.setUserConstraint(element.getTransportGuarantee().name()); create = true; } if (element.getRolesAllowed().length > 0) { String[] roles = element.getRolesAllowed(); for (String role : roles) { constraint.addAuthRole(role); } create = true; } if (element.getEmptyRoleSemantic() != EmptyRoleSemantic.PERMIT) { constraint.setAuthConstraint(true); create = true; } if (create) { collection.addPattern(urlPattern); constraint.addCollection(collection); return constraint; } return null; }