public abstract class RangerJwtAuthHandler extends Object implements RangerAuthHandler
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
audiences |
protected static String |
cookieName |
static String |
JWT_AUTHZ_PREFIX |
static String |
KEY_JWT_AUDIENCES |
static String |
KEY_JWT_COOKIE_NAME |
static String |
KEY_JWT_PUBLIC_KEY |
static String |
KEY_PROVIDER_URL |
protected com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> |
keySource |
static String |
TYPE |
| Constructor and Description |
|---|
RangerJwtAuthHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.hadoop.security.authentication.server.AuthenticationToken |
authenticate(String jwtAuthHeader,
String jwtCookie,
String doAsUser) |
protected String |
getJWT(String jwtAuthHeader,
String jwtCookie) |
abstract com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext> |
getJwtProcessor(com.nimbusds.jose.proc.JWSKeySelector<com.nimbusds.jose.proc.SecurityContext> keySelector) |
void |
initialize(Properties config) |
static boolean |
shouldProceedAuth(String authHeader,
String jwtCookie) |
protected boolean |
validateAudiences(com.nimbusds.jwt.SignedJWT jwtToken)
Validate whether any of the accepted audience claims is present in the issued
token claims list for audience.
|
protected boolean |
validateExpiration(com.nimbusds.jwt.SignedJWT jwtToken)
Validate that the expiration time of the JWT token has not been violated.
|
protected boolean |
validateSignature(com.nimbusds.jwt.SignedJWT jwtToken)
Verify the signature of the JWT token in this method.
|
protected boolean |
validateToken(com.nimbusds.jwt.SignedJWT jwtToken)
This method provides a single method for validating the JWT for use in
request processing.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitauthenticatepublic static final String TYPE
public static final String KEY_PROVIDER_URL
public static final String KEY_JWT_PUBLIC_KEY
public static final String KEY_JWT_COOKIE_NAME
public static final String KEY_JWT_AUDIENCES
public static final String JWT_AUTHZ_PREFIX
protected com.nimbusds.jose.jwk.source.JWKSource<com.nimbusds.jose.proc.SecurityContext> keySource
protected static String cookieName
public void initialize(Properties config) throws Exception
initialize in interface RangerAuthHandlerExceptionprotected org.apache.hadoop.security.authentication.server.AuthenticationToken authenticate(String jwtAuthHeader, String jwtCookie, String doAsUser)
protected boolean validateToken(com.nimbusds.jwt.SignedJWT jwtToken)
jwtToken - the token to validateprotected boolean validateSignature(com.nimbusds.jwt.SignedJWT jwtToken)
jwtToken - the token that contains the signature to be validatedpublic abstract com.nimbusds.jwt.proc.ConfigurableJWTProcessor<com.nimbusds.jose.proc.SecurityContext> getJwtProcessor(com.nimbusds.jose.proc.JWSKeySelector<com.nimbusds.jose.proc.SecurityContext> keySelector)
protected boolean validateAudiences(com.nimbusds.jwt.SignedJWT jwtToken)
jwtToken - the JWT token where the allowed audiences will be foundprotected boolean validateExpiration(com.nimbusds.jwt.SignedJWT jwtToken)
jwtToken - the token that contains the expiration date to validateCopyright © 2025 The Apache Software Foundation. All rights reserved.