This will approve any alias to anything inside of the ContextHandlers resource base which
is not protected by a protected target as defined by the ContextHandler protected targets at start.
Aliases approved by this may still be able to bypass SecurityConstraints, so this class would need to be extended to enforce any additional security constraints that are required.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| protected Path | |
| private final ContextHandler | |
| private boolean | |
| private final AllowedResourceAliasChecker. | |
| private final List | |
| private final Supplier | |
| protected static final LinkOption[] | |
| private static final Logger | |
| protected static final LinkOption[] |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| public boolean | checkAlias(String
The path the aliased resource was created for. pathInContext, Resource The aliased resourced. resource)Implements org. |
| protected void | doStart()
Overrides org. |
| protected void | doStop()
Overrides org. |
| private void | |
| protected ContextHandler | |
| protected Path | |
| private String[] | |
| private static Path | |
| protected void | |
| protected boolean | |
| protected boolean | |
| public String | toString()
Overrides org. |
| _base | back to summary |
|---|---|
| protected Path _base | |
| _contextHandler | back to summary |
|---|---|
| private final ContextHandler _contextHandler | |
| _initialized | back to summary |
|---|---|
| private boolean _initialized | |
| _listener | back to summary |
|---|---|
| private final AllowedResourceAliasChecker. | |
| _protected | back to summary |
|---|---|
| private final List<Path> _protected | |
| _resourceBaseSupplier | back to summary |
|---|---|
| private final Supplier<Resource> _resourceBaseSupplier | |
| FOLLOW_LINKS | back to summary |
|---|---|
| protected static final LinkOption[] FOLLOW_LINKS | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| NO_FOLLOW_LINKS | back to summary |
|---|---|
| protected static final LinkOption[] NO_FOLLOW_LINKS | |
| AllowedResourceAliasChecker | back to summary |
|---|---|
public AllowedResourceAliasChecker(ContextHandler contextHandler)
| |
| AllowedResourceAliasChecker | back to summary |
|---|---|
| public AllowedResourceAliasChecker(ContextHandler contextHandler, Resource baseResource) | |
| AllowedResourceAliasChecker | back to summary |
|---|---|
| public AllowedResourceAliasChecker(ContextHandler contextHandler, Supplier<Resource> resourceBaseSupplier) | |
| check | back to summary |
|---|---|
| protected boolean check(String pathInContext, Path path) | |
| checkAlias | back to summary |
|---|---|
| public boolean checkAlias(String pathInContext, Resource resource) Implements org. Doc from org. Check if an alias is allowed to be served. If any | |
| doStart | back to summary |
|---|---|
| protected void doStart() throws Exception Overrides org. Doc from org. Method to override to start the lifecycle | |
| doStop | back to summary |
|---|---|
| protected void doStop() throws Exception Overrides org. Doc from org. Method to override to stop the lifecycle | |
| extractBaseResourceFromContext | back to summary |
|---|---|
| private void extractBaseResourceFromContext() | |
| getContextHandler | back to summary |
|---|---|
| protected ContextHandler getContextHandler() | |
| getPath | back to summary |
|---|---|
| protected Path getPath(Resource resource) | |
| getProtectedTargets | back to summary |
|---|---|
| private String[] getProtectedTargets() | |
| getRealPath | back to summary |
|---|---|
| private static Path getRealPath(Path path) | |
| initialize | back to summary |
|---|---|
| protected void initialize() | |
| isAllowed | back to summary |
|---|---|
| protected boolean isAllowed(Path path) | |
| isSameFile | back to summary |
|---|---|
| protected boolean isSameFile(Path path1, Path path2) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | lifeCycleStarted(LifeCycle event)
Overrides default org. |
| AllowedResourceAliasCheckListener | back to summary |
|---|---|
| private AllowedResourceAliasCheckListener() | |
| lifeCycleStarted | back to summary |
|---|---|
| public void lifeCycleStarted(LifeCycle event) Overrides default org.
| |