mapping.setPathSpec(url); mapping.setConstraint(sc); ((ConstraintAware)context.getSecurityHandler()).addConstraintMapping(mapping); mapping.setPathSpec(url); mapping.setConstraint(sc); ((ConstraintAware)context.getSecurityHandler()).addConstraintMapping(mapping); mapping.setPathSpec(url); mapping.setConstraint(sc); ((ConstraintAware)context.getSecurityHandler()).addConstraintMapping(mapping);
((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); ((ConstraintAware)getSecurityHandler()).checkPathsWithUncoveredHttpMethods(); getMetaData().setOriginAPI("constraint.url."+pathSpec);
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
/** * Delegate for ServletRegistration.Dynamic.setServletSecurity method * @param registration ServletRegistration.Dynamic instance that setServletSecurity was called on * @param servletSecurityElement new security info * @return the set of exact URL mappings currently associated with the registration that are also present in the web.xml * security constraints and thus will be unaffected by this call. */ public Set<String> setServletSecurity(ServletRegistration.Dynamic registration, ServletSecurityElement servletSecurityElement) { //Default implementation is to just accept them all. If using a webapp, then this behaviour is overridden in WebAppContext.setServletSecurity Collection<String> pathSpecs = registration.getMappings(); if (pathSpecs != null) { for (String pathSpec:pathSpecs) { List<ConstraintMapping> mappings = ConstraintSecurityHandler.createConstraintsWithMappingsForPath(registration.getName(), pathSpec, servletSecurityElement); for (ConstraintMapping m:mappings) ((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); } } return Collections.emptySet(); }
dc.setDataConstraint(Constraint.DC_CONFIDENTIAL); mapping.setConstraint(dc); constraint.addConstraintMapping(mapping); } else { throw new RuntimeException("Not a ConstraintAware SecurityHandler: " + security);
securityHandler.addConstraintMapping(m);
securityHandler.addConstraintMapping(m);
securityHandler.addConstraintMapping(m);
securityHandler.addConstraintMapping(m);
((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); getMetaData().setOrigin("constraint.url."+pathSpec, Origin.API); break;
((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); getMetaData().setOrigin("constraint.url."+pathSpec, Origin.API); break;
((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); getMetaData().setOrigin("constraint.url."+pathSpec, Origin.API); break;
((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); getMetaData().setOrigin("constraint.url."+pathSpec, Origin.API); break;
((ConstraintAware)getSecurityHandler()).addConstraintMapping(m); getMetaData().setOrigin("constraint.url."+pathSpec, Origin.API); break;