Top Inners Fields Constructors Methods
io.undertow.servlet.handlers.security

public Class SecurityPathMatches

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Collections, .HashMap, .HashSet, .Iterator, .List, .Map, .Set, io.undertow.servlet.UndertowServletLogger, io.undertow.servlet.api.DeploymentInfo, .SecurityConstraint, .SecurityInfo, .SingleConstraintMatch, .TransportGuaranteeType, .WebResourceCollection, io.undertow.util.Methods

Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final SecurityPathMatches.PathSecurityInformation
private final boolean
private final Map<String, SecurityPathMatches.PathSecurityInformation>
private final Map<String, SecurityPathMatches.PathSecurityInformation>
private static Set<String>
private final Map<String, SecurityPathMatches.PathSecurityInformation>

Constructor Summary

AccessConstructor and Description
private
SecurityPathMatches(final boolean denyUncoveredHttpMethods, final SecurityPathMatches.PathSecurityInformation defaultPathSecurityInformation, final Map<String, SecurityPathMatches.PathSecurityInformation> exactPathRoleInformation, final Map<String, SecurityPathMatches.PathSecurityInformation> prefixPathRoleInformation, final Map<String, SecurityPathMatches.PathSecurityInformation> extensionRoleInformation)

Method Summary

Modifier and TypeMethod and Description
public static SecurityPathMatches.Builder
builder(final DeploymentInfo deploymentInfo)

public SecurityPathMatch
getSecurityInfo(final String path, final String method)

private void
private boolean
public boolean

Returns:

true If no security path information has been defined
isEmpty
()

public void
private void
private SingleConstraintMatch
mergeConstraints(final SecurityPathMatches.RuntimeMatch currentMatch)

merge all constraints, as per 13.8.1 Combining Constraints

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultPathSecurityInformationback to summary
private final SecurityPathMatches.PathSecurityInformation defaultPathSecurityInformation
denyUncoveredHttpMethodsback to summary
private final boolean denyUncoveredHttpMethods
exactPathRoleInformationback to summary
private final Map<String, SecurityPathMatches.PathSecurityInformation> exactPathRoleInformation
extensionRoleInformationback to summary
private final Map<String, SecurityPathMatches.PathSecurityInformation> extensionRoleInformation
KNOWN_METHODSback to summary
private static Set<String> KNOWN_METHODS
prefixPathRoleInformationback to summary
private final Map<String, SecurityPathMatches.PathSecurityInformation> prefixPathRoleInformation

Constructor Detail

SecurityPathMatchesback to summary
private SecurityPathMatches(final boolean denyUncoveredHttpMethods, final SecurityPathMatches.PathSecurityInformation defaultPathSecurityInformation, final Map<String, SecurityPathMatches.PathSecurityInformation> exactPathRoleInformation, final Map<String, SecurityPathMatches.PathSecurityInformation> prefixPathRoleInformation, final Map<String, SecurityPathMatches.PathSecurityInformation> extensionRoleInformation)

Method Detail

builderback to summary
public static SecurityPathMatches.Builder builder(final DeploymentInfo deploymentInfo)
getSecurityInfoback to summary
public SecurityPathMatch getSecurityInfo(final String path, final String method)
handleMatchback to summary
private void handleMatch(final String method, final SecurityPathMatches.PathSecurityInformation exact, SecurityPathMatches.RuntimeMatch currentMatch)
isDefaultPathSecurityEmptyback to summary
private boolean isDefaultPathSecurityEmpty()
isEmptyback to summary
public boolean isEmpty()
Returns:boolean

true If no security path information has been defined

logWarningsAboutUncoveredMethodsback to summary
public void logWarningsAboutUncoveredMethods()
logWarningsAboutUncoveredMethodsback to summary
private void logWarningsAboutUncoveredMethods(Map<String, SecurityPathMatches.PathSecurityInformation> matches, String prefix, String suffix)
mergeConstraintsback to summary
private SingleConstraintMatch mergeConstraints(final SecurityPathMatches.RuntimeMatch currentMatch)

merge all constraints, as per 13.8.1 Combining Constraints

transportback to summary
private void transport(SecurityPathMatches.RuntimeMatch match, TransportGuaranteeType other)
io.undertow.servlet.handlers.security back to summary

public Class SecurityPathMatches.Builder

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.servlet.handlers.security.SecurityPathMatches.Builder

Field Summary

Modifier and TypeField and Description
private final SecurityPathMatches.PathSecurityInformation
private final DeploymentInfo
private final Map<String, SecurityPathMatches.PathSecurityInformation>
private final Map<String, SecurityPathMatches.PathSecurityInformation>
private final Map<String, SecurityPathMatches.PathSecurityInformation>

Constructor Summary

AccessConstructor and Description
private
Builder(final DeploymentInfo deploymentInfo)

Method Summary

Modifier and TypeMethod and Description
public void
addSecurityConstraint(final SecurityConstraint securityConstraint)

public SecurityPathMatches
private Set<String>
expandRolesAllowed(final Set<String> rolesAllowed)

private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultPathSecurityInformationback to summary
private final SecurityPathMatches.PathSecurityInformation defaultPathSecurityInformation
deploymentInfoback to summary
private final DeploymentInfo deploymentInfo
exactPathRoleInformationback to summary
private final Map<String, SecurityPathMatches.PathSecurityInformation> exactPathRoleInformation
extensionRoleInformationback to summary
private final Map<String, SecurityPathMatches.PathSecurityInformation> extensionRoleInformation
prefixPathRoleInformationback to summary
private final Map<String, SecurityPathMatches.PathSecurityInformation> prefixPathRoleInformation

Constructor Detail

Builderback to summary
private Builder(final DeploymentInfo deploymentInfo)

Method Detail

addSecurityConstraintback to summary
public void addSecurityConstraint(final SecurityConstraint securityConstraint)
buildback to summary
public SecurityPathMatches build()
expandRolesAllowedback to summary
private Set<String> expandRolesAllowed(final Set<String> rolesAllowed)
setupPathSecurityInformationback to summary
private void setupPathSecurityInformation(final SecurityPathMatches.PathSecurityInformation info, final SecurityPathMatches.SecurityInformation securityConstraint, final WebResourceCollection webResources)
io.undertow.servlet.handlers.security back to summary

private final Class SecurityPathMatches.ExcludedMethodRoles

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.servlet.handlers.security.SecurityPathMatches.ExcludedMethodRoles

Field Summary

Modifier and TypeField and Description
pack-priv final Set<String>
pack-priv final SecurityPathMatches.SecurityInformation

Constructor Summary

AccessConstructor and Description
pack-priv
ExcludedMethodRoles(final Set<String> methods, final SecurityPathMatches.SecurityInformation securityInformation)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

methodsback to summary
pack-priv final Set<String> methods
securityInformationback to summary
pack-priv final SecurityPathMatches.SecurityInformation securityInformation

Constructor Detail

ExcludedMethodRolesback to summary
pack-priv ExcludedMethodRoles(final Set<String> methods, final SecurityPathMatches.SecurityInformation securityInformation)
io.undertow.servlet.handlers.security back to summary

private Class SecurityPathMatches.PathSecurityInformation

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.servlet.handlers.security.SecurityPathMatches.PathSecurityInformation

Field Summary

Modifier and TypeField and Description
pack-priv final List<SecurityPathMatches.SecurityInformation>
pack-priv final List<SecurityPathMatches.ExcludedMethodRoles>
pack-priv final Map<String, List<SecurityPathMatches.SecurityInformation>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultRequiredRolesback to summary
pack-priv final List<SecurityPathMatches.SecurityInformation> defaultRequiredRoles
excludedMethodRolesback to summary
pack-priv final List<SecurityPathMatches.ExcludedMethodRoles> excludedMethodRoles
perMethodRequiredRolesback to summary
pack-priv final Map<String, List<SecurityPathMatches.SecurityInformation>> perMethodRequiredRoles

Constructor Detail

PathSecurityInformationback to summary
private PathSecurityInformation()
io.undertow.servlet.handlers.security back to summary

private final Class SecurityPathMatches.RuntimeMatch

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.servlet.handlers.security.SecurityPathMatches.RuntimeMatch

Field Summary

Modifier and TypeField and Description
pack-priv final List<SingleConstraintMatch>
pack-priv TransportGuaranteeType
pack-priv boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

constraintsback to summary
pack-priv final List<SingleConstraintMatch> constraints
typeback to summary
pack-priv TransportGuaranteeType type
uncoveredback to summary
pack-priv boolean uncovered

Constructor Detail

RuntimeMatchback to summary
private RuntimeMatch()
io.undertow.servlet.handlers.security back to summary

private final Class SecurityPathMatches.SecurityInformation

extends Object
Class Inheritance
  • java.lang.Object
  • io.undertow.servlet.handlers.security.SecurityPathMatches.SecurityInformation

Field Summary

Modifier and TypeField and Description
pack-priv final SecurityInfo.EmptyRoleSemantic
pack-priv final Set<String>
pack-priv final TransportGuaranteeType

Constructor Summary

AccessConstructor and Description
private
SecurityInformation(final Set<String> roles, final TransportGuaranteeType transportGuaranteeType, final SecurityInfo.EmptyRoleSemantic emptyRoleSemantic)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

emptyRoleSemanticback to summary
pack-priv final SecurityInfo.EmptyRoleSemantic emptyRoleSemantic
rolesback to summary
pack-priv final Set<String> roles
transportGuaranteeTypeback to summary
pack-priv final TransportGuaranteeType transportGuaranteeType

Constructor Detail

SecurityInformationback to summary
private SecurityInformation(final Set<String> roles, final TransportGuaranteeType transportGuaranteeType, final SecurityInfo.EmptyRoleSemantic emptyRoleSemantic)