Package org.apache.spark.ui
Class JWSFilter
Object
org.apache.spark.ui.JWSFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
A servlet filter that requires JWS, a cryptographically signed JSON Web Token, in the header.
Like the other UI filters, the following configurations are required to use this filter.
- spark.ui.filters=org.apache.spark.ui.JWSFilter
- spark.org.apache.spark.ui.JWSFilter.param.secretKey=BASE64URL-ENCODED-YOUR-PROVIDED-KEY
The HTTP request should have Authorization: Bearer <jws> header.
- <jws> is a string with three fields, '<header>.<payload>.<signature>'.
- <header> is supposed to be a base64url-encoded string of '{"alg":"HS256","typ":"JWT"}'.
- <payload> is a base64url-encoded string of fully-user-defined content.
- <signature> is a signature based on '<header>.<payload>' and a user-provided key parameter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) voidinit(jakarta.servlet.FilterConfig config) Load and validate the configurtions: - IllegalArgumentException will happen if the user didn't provide this argument - WeakKeyException will happen if the user-provided value is insufficientMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.Filter
destroy
-
Constructor Details
-
JWSFilter
public JWSFilter()
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) - Specified by:
doFilterin interfacejakarta.servlet.Filter
-
init
public void init(jakarta.servlet.FilterConfig config) Load and validate the configurtions: - IllegalArgumentException will happen if the user didn't provide this argument - WeakKeyException will happen if the user-provided value is insufficient- Specified by:
initin interfacejakarta.servlet.Filter- Parameters:
config- (undocumented)
-