Package thredds.servlet.filter
Class LocalApiFilter
java.lang.Object
jakarta.servlet.GenericFilter
jakarta.servlet.http.HttpFilter
thredds.servlet.filter.LocalApiFilter
- All Implemented Interfaces:
jakarta.servlet.Filter,jakarta.servlet.FilterConfig,Serializable
@WebFilter(urlPatterns="/local/*")
public class LocalApiFilter
extends jakarta.servlet.http.HttpFilter
implements jakarta.servlet.Filter
Handle access to the local api of the TDS.
the TDS.
This is an attempt to filter out and reject requests not originating on the
same machine as the TDS. This implementation is slightly more restrictive,
in that it will filter out requests not originating from the same network
interface as was received by the TDS. Additionally, a time-limited, signature
based authorization is used to further protect from spoofed requests.
The client is responsible for managing the key, and must ensure the user
running the TDS has the necessary permissions to read the key file (location
defined by the tds.local.api.key property). This implementation assumes the
client may update the key without informing the TDS (rotating keys are ok).
- Since:
- 5.7
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) Methods inherited from class jakarta.servlet.http.HttpFilter
doFilterMethods inherited from class jakarta.servlet.GenericFilter
getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init, initMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.Filter
destroy, init
-
Constructor Details
-
LocalApiFilter
public LocalApiFilter()
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Overrides:
doFilterin classjakarta.servlet.http.HttpFilter- Throws:
IOExceptionjakarta.servlet.ServletException
-