| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_292) on Tue Jun 15 06:01:17 GMT 2021 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>AuthenticationFilter (Apache Hadoop Auth 3.3.1 API)</title> |
| <meta name="date" content="2021-06-15"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="AuthenticationFilter (Apache Hadoop Auth 3.3.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AuthenticationFilter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/hadoop/security/authentication/server/AltKerberosAuthenticationHandler.html" title="class in org.apache.hadoop.security.authentication.server"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/security/authentication/server/AuthenticationFilter.html" target="_top">Frames</a></li> |
| <li><a href="AuthenticationFilter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.hadoop.security.authentication.server</div> |
| <h2 title="Class AuthenticationFilter" class="title">Class AuthenticationFilter</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.hadoop.security.authentication.server.AuthenticationFilter</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd>javax.servlet.Filter</dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Private |
| @InterfaceStability.Unstable |
| public class <span class="typeNameLabel">AuthenticationFilter</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements javax.servlet.Filter</pre> |
| <div class="block">The <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationFilter</code></a> enables protecting web application |
| resources with different (pluggable) |
| authentication mechanisms and signer secret providers. |
| <p> |
| Additional authentication mechanisms are supported via the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a> interface. |
| <p> |
| This filter delegates to the configured authentication handler for authentication and once it obtains an |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationToken</code></a> from it, sets a signed HTTP cookie with the token. For client requests |
| that provide the signed HTTP cookie, it verifies the validity of the cookie, extracts the user information |
| and lets the request proceed to the target resource. |
| <p> |
| The rest of the configuration properties are specific to the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a> implementation and the |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationFilter</code></a> will take all the properties that start with the prefix #PREFIX#, it will remove |
| the prefix from it and it will pass them to the the authentication handler for initialization. Properties that do |
| not start with the prefix will not be passed to the authentication handler initialization. |
| <p> |
| Details of the configurations are listed on <a href="../../../../../../../Configuration.html">Configuration Page</a> |
| <p> |
| The "zookeeper" implementation has additional configuration properties that |
| must be specified; see <a href="../../../../../../org/apache/hadoop/security/authentication/util/ZKSignerSecretProvider.html" title="class in org.apache.hadoop.security.authentication.util"><code>ZKSignerSecretProvider</code></a> for details.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#AUTH_TOKEN_MAX_INACTIVE_INTERVAL">AUTH_TOKEN_MAX_INACTIVE_INTERVAL</a></span></code> |
| <div class="block">Constant for the configuration property |
| that indicates the max inactive interval of the generated token.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#AUTH_TOKEN_VALIDITY">AUTH_TOKEN_VALIDITY</a></span></code> |
| <div class="block">Constant for the configuration property that indicates the validity of the generated token.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#AUTH_TYPE">AUTH_TYPE</a></span></code> |
| <div class="block">Constant for the property that specifies the authentication handler to use.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#CONFIG_PREFIX">CONFIG_PREFIX</a></span></code> |
| <div class="block">Constant for the property that specifies the configuration prefix.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#COOKIE_DOMAIN">COOKIE_DOMAIN</a></span></code> |
| <div class="block">Constant for the configuration property that indicates the domain to use in the HTTP cookie.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#COOKIE_PATH">COOKIE_PATH</a></span></code> |
| <div class="block">Constant for the configuration property that indicates the path to use in the HTTP cookie.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#COOKIE_PERSISTENT">COOKIE_PERSISTENT</a></span></code> |
| <div class="block">Constant for the configuration property |
| that indicates the persistence of the HTTP cookie.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#SIGNATURE_SECRET">SIGNATURE_SECRET</a></span></code> |
| <div class="block">Constant for the property that specifies the secret to use for signing the HTTP Cookies.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#SIGNATURE_SECRET_FILE">SIGNATURE_SECRET_FILE</a></span></code> </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#SIGNER_SECRET_PROVIDER">SIGNER_SECRET_PROVIDER</a></span></code> |
| <div class="block">Constant for the configuration property that indicates the name of the |
| SignerSecretProvider class to use.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#SIGNER_SECRET_PROVIDER_ATTRIBUTE">SIGNER_SECRET_PROVIDER_ATTRIBUTE</a></span></code> |
| <div class="block">Constant for the ServletContext attribute that can be used for providing a |
| custom implementation of the SignerSecretProvider.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#AuthenticationFilter--">AuthenticationFilter</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../../org/apache/hadoop/security/authentication/util/SignerSecretProvider.html" title="class in org.apache.hadoop.security.authentication.util">SignerSecretProvider</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#constructSecretProvider-javax.servlet.ServletContext-java.util.Properties-boolean-">constructSecretProvider</a></span>(javax.servlet.ServletContext ctx, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> config, |
| boolean disallowFallbackToRandomSecretProvider)</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#createAuthCookie-javax.servlet.http.HttpServletResponse-java.lang.String-java.lang.String-java.lang.String-long-boolean-boolean-">createAuthCookie</a></span>(javax.servlet.http.HttpServletResponse resp, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> token, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> domain, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> path, |
| long expires, |
| boolean isCookiePersistent, |
| boolean isSecure)</code> |
| <div class="block">Creates the Hadoop authentication HTTP cookie.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#destroy--">destroy</a></span>()</code> |
| <div class="block">Destroys the filter.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#doFilter-javax.servlet.FilterChain-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-">doFilter</a></span>(javax.servlet.FilterChain filterChain, |
| javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response)</code> |
| <div class="block">Delegates call to the servlet filter chain.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#doFilter-javax.servlet.ServletRequest-javax.servlet.ServletResponse-javax.servlet.FilterChain-">doFilter</a></span>(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| javax.servlet.FilterChain filterChain)</code> |
| <div class="block">If the request has a valid authentication token it allows the request to continue to the target resource, |
| otherwise it triggers an authentication sequence using the configured <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server">AuthenticationHandler</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getAuthenticationHandler--">getAuthenticationHandler</a></span>()</code> |
| <div class="block">Returns the authentication handler being used.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getConfiguration--">getConfiguration</a></span>()</code> |
| <div class="block">Returns the configuration properties of the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationFilter</code></a> |
| without the prefix.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getConfiguration-java.lang.String-javax.servlet.FilterConfig-">getConfiguration</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> configPrefix, |
| javax.servlet.FilterConfig filterConfig)</code> |
| <div class="block">Returns the filtered configuration (only properties starting with the specified prefix).</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getCookieDomain--">getCookieDomain</a></span>()</code> |
| <div class="block">Returns the cookie domain to use for the HTTP cookie.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getCookiePath--">getCookiePath</a></span>()</code> |
| <div class="block">Returns the cookie path to use for the HTTP cookie.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getMaxInactiveInterval--">getMaxInactiveInterval</a></span>()</code> |
| <div class="block">Returns the max inactive interval time of the generated tokens.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getRequestURL-javax.servlet.http.HttpServletRequest-">getRequestURL</a></span>(javax.servlet.http.HttpServletRequest request)</code> |
| <div class="block">Returns the full URL of the request including the query string.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server">AuthenticationToken</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getToken-javax.servlet.http.HttpServletRequest-">getToken</a></span>(javax.servlet.http.HttpServletRequest request)</code> |
| <div class="block">Returns the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationToken</code></a> for the request.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>protected long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getValidity--">getValidity</a></span>()</code> |
| <div class="block">Returns the validity time of the generated tokens.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#init-javax.servlet.FilterConfig-">init</a></span>(javax.servlet.FilterConfig filterConfig)</code> |
| <div class="block">Initializes the authentication filter and signer secret provider.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#initializeAuthHandler-java.lang.String-javax.servlet.FilterConfig-">initializeAuthHandler</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> authHandlerClassName, |
| javax.servlet.FilterConfig filterConfig)</code> </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#initializeSecretProvider-javax.servlet.FilterConfig-">initializeSecretProvider</a></span>(javax.servlet.FilterConfig filterConfig)</code> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#isCookiePersistent--">isCookiePersistent</a></span>()</code> |
| <div class="block">Returns the cookie persistence to use for the HTTP cookie.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#isCustomSignerSecretProvider--">isCustomSignerSecretProvider</a></span>()</code> |
| <div class="block">Returns if a custom implementation of a SignerSecretProvider is being used.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#isRandomSecret--">isRandomSecret</a></span>()</code> |
| <div class="block">Returns if a random secret is being used.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#verifyTokenType-org.apache.hadoop.security.authentication.server.AuthenticationHandler-org.apache.hadoop.security.authentication.server.AuthenticationToken-">verifyTokenType</a></span>(<a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server">AuthenticationHandler</a> handler, |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server">AuthenticationToken</a> token)</code> |
| <div class="block">This method verifies if the specified token type matches one of the the |
| token types supported by a specified <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="CONFIG_PREFIX"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CONFIG_PREFIX</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> CONFIG_PREFIX</pre> |
| <div class="block">Constant for the property that specifies the configuration prefix.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.CONFIG_PREFIX">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="AUTH_TYPE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>AUTH_TYPE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> AUTH_TYPE</pre> |
| <div class="block">Constant for the property that specifies the authentication handler to use.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.AUTH_TYPE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SIGNATURE_SECRET"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SIGNATURE_SECRET</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SIGNATURE_SECRET</pre> |
| <div class="block">Constant for the property that specifies the secret to use for signing the HTTP Cookies.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.SIGNATURE_SECRET">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SIGNATURE_SECRET_FILE"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SIGNATURE_SECRET_FILE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SIGNATURE_SECRET_FILE</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.SIGNATURE_SECRET_FILE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="AUTH_TOKEN_MAX_INACTIVE_INTERVAL"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>AUTH_TOKEN_MAX_INACTIVE_INTERVAL</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> AUTH_TOKEN_MAX_INACTIVE_INTERVAL</pre> |
| <div class="block">Constant for the configuration property |
| that indicates the max inactive interval of the generated token.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.AUTH_TOKEN_MAX_INACTIVE_INTERVAL">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="AUTH_TOKEN_VALIDITY"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>AUTH_TOKEN_VALIDITY</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> AUTH_TOKEN_VALIDITY</pre> |
| <div class="block">Constant for the configuration property that indicates the validity of the generated token.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.AUTH_TOKEN_VALIDITY">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="COOKIE_DOMAIN"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>COOKIE_DOMAIN</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> COOKIE_DOMAIN</pre> |
| <div class="block">Constant for the configuration property that indicates the domain to use in the HTTP cookie.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.COOKIE_DOMAIN">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="COOKIE_PATH"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>COOKIE_PATH</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> COOKIE_PATH</pre> |
| <div class="block">Constant for the configuration property that indicates the path to use in the HTTP cookie.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.COOKIE_PATH">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="COOKIE_PERSISTENT"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>COOKIE_PERSISTENT</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> COOKIE_PERSISTENT</pre> |
| <div class="block">Constant for the configuration property |
| that indicates the persistence of the HTTP cookie.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.COOKIE_PERSISTENT">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SIGNER_SECRET_PROVIDER"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>SIGNER_SECRET_PROVIDER</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SIGNER_SECRET_PROVIDER</pre> |
| <div class="block">Constant for the configuration property that indicates the name of the |
| SignerSecretProvider class to use. |
| Possible values are: "file", "random", "zookeeper", or a classname. |
| If not specified, the "file" implementation will be used with |
| SIGNATURE_SECRET_FILE; and if that's not specified, the "random" |
| implementation will be used.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.SIGNER_SECRET_PROVIDER">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="SIGNER_SECRET_PROVIDER_ATTRIBUTE"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>SIGNER_SECRET_PROVIDER_ATTRIBUTE</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> SIGNER_SECRET_PROVIDER_ATTRIBUTE</pre> |
| <div class="block">Constant for the ServletContext attribute that can be used for providing a |
| custom implementation of the SignerSecretProvider. Note that the class |
| should already be initialized. If not specified, SIGNER_SECRET_PROVIDER |
| will be used.</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.hadoop.security.authentication.server.AuthenticationFilter.SIGNER_SECRET_PROVIDER_ATTRIBUTE">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="AuthenticationFilter--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>AuthenticationFilter</h4> |
| <pre>public AuthenticationFilter()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="init-javax.servlet.FilterConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>init</h4> |
| <pre>public void init(javax.servlet.FilterConfig filterConfig) |
| throws javax.servlet.ServletException</pre> |
| <div class="block"><p>Initializes the authentication filter and signer secret provider.</p> |
| It instantiates and initializes the specified <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>init</code> in interface <code>javax.servlet.Filter</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>filterConfig</code> - filter configuration.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.servlet.ServletException</code> - thrown if the filter or the authentication handler could not be initialized properly.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="initializeAuthHandler-java.lang.String-javax.servlet.FilterConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initializeAuthHandler</h4> |
| <pre>protected void initializeAuthHandler(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> authHandlerClassName, |
| javax.servlet.FilterConfig filterConfig) |
| throws javax.servlet.ServletException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.servlet.ServletException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="initializeSecretProvider-javax.servlet.FilterConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>initializeSecretProvider</h4> |
| <pre>protected void initializeSecretProvider(javax.servlet.FilterConfig filterConfig) |
| throws javax.servlet.ServletException</pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.servlet.ServletException</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="constructSecretProvider-javax.servlet.ServletContext-java.util.Properties-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>constructSecretProvider</h4> |
| <pre>public static <a href="../../../../../../org/apache/hadoop/security/authentication/util/SignerSecretProvider.html" title="class in org.apache.hadoop.security.authentication.util">SignerSecretProvider</a> constructSecretProvider(javax.servlet.ServletContext ctx, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> config, |
| boolean disallowFallbackToRandomSecretProvider) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getConfiguration--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getConfiguration</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> getConfiguration()</pre> |
| <div class="block">Returns the configuration properties of the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationFilter</code></a> |
| without the prefix. The returned properties are the same that the |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationFilter.html#getConfiguration-java.lang.String-javax.servlet.FilterConfig-"><code>getConfiguration(String, FilterConfig)</code></a> method returned.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the configuration properties.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAuthenticationHandler--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAuthenticationHandler</h4> |
| <pre>protected <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server">AuthenticationHandler</a> getAuthenticationHandler()</pre> |
| <div class="block">Returns the authentication handler being used.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the authentication handler being used.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isRandomSecret--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isRandomSecret</h4> |
| <pre>protected boolean isRandomSecret()</pre> |
| <div class="block">Returns if a random secret is being used.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>if a random secret is being used.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isCustomSignerSecretProvider--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isCustomSignerSecretProvider</h4> |
| <pre>protected boolean isCustomSignerSecretProvider()</pre> |
| <div class="block">Returns if a custom implementation of a SignerSecretProvider is being used.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>if a custom implementation of a SignerSecretProvider is being used.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getMaxInactiveInterval--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxInactiveInterval</h4> |
| <pre>protected long getMaxInactiveInterval()</pre> |
| <div class="block">Returns the max inactive interval time of the generated tokens.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the max inactive interval time of the generated tokens in seconds.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getValidity--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getValidity</h4> |
| <pre>protected long getValidity()</pre> |
| <div class="block">Returns the validity time of the generated tokens.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the validity time of the generated tokens, in seconds.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCookieDomain--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCookieDomain</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getCookieDomain()</pre> |
| <div class="block">Returns the cookie domain to use for the HTTP cookie.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cookie domain to use for the HTTP cookie.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCookiePath--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCookiePath</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getCookiePath()</pre> |
| <div class="block">Returns the cookie path to use for the HTTP cookie.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cookie path to use for the HTTP cookie.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isCookiePersistent--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isCookiePersistent</h4> |
| <pre>protected boolean isCookiePersistent()</pre> |
| <div class="block">Returns the cookie persistence to use for the HTTP cookie.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the cookie persistence to use for the HTTP cookie.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="destroy--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>destroy</h4> |
| <pre>public void destroy()</pre> |
| <div class="block">Destroys the filter. |
| <p> |
| It invokes the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html#destroy--"><code>AuthenticationHandler.destroy()</code></a> method to release any resources it may hold.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>destroy</code> in interface <code>javax.servlet.Filter</code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getConfiguration-java.lang.String-javax.servlet.FilterConfig-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getConfiguration</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util">Properties</a> getConfiguration(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> configPrefix, |
| javax.servlet.FilterConfig filterConfig) |
| throws javax.servlet.ServletException</pre> |
| <div class="block">Returns the filtered configuration (only properties starting with the specified prefix). The property keys |
| are also trimmed from the prefix. The returned <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html?is-external=true" title="class or interface in java.util"><code>Properties</code></a> object is used to initialized the |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a>. |
| <p> |
| This method can be overriden by subclasses to obtain the configuration from other configuration source than |
| the web.xml file.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>configPrefix</code> - configuration prefix to use for extracting configuration properties.</dd> |
| <dd><code>filterConfig</code> - filter configuration object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the configuration to be used with the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a> instance.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code>javax.servlet.ServletException</code> - thrown if the configuration could not be created.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getRequestURL-javax.servlet.http.HttpServletRequest-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRequestURL</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getRequestURL(javax.servlet.http.HttpServletRequest request)</pre> |
| <div class="block">Returns the full URL of the request including the query string. |
| <p> |
| Used as a convenience method for logging purposes.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - the request object.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the full URL of the request including the query string.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getToken-javax.servlet.http.HttpServletRequest-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getToken</h4> |
| <pre>protected <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server">AuthenticationToken</a> getToken(javax.servlet.http.HttpServletRequest request) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, |
| <a href="../../../../../../org/apache/hadoop/security/authentication/client/AuthenticationException.html" title="class in org.apache.hadoop.security.authentication.client">AuthenticationException</a></pre> |
| <div class="block">Returns the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationToken</code></a> for the request. |
| <p> |
| It looks at the received HTTP cookies and extracts the value of the <a href="../../../../../../org/apache/hadoop/security/authentication/client/AuthenticatedURL.html#AUTH_COOKIE"><code>AuthenticatedURL.AUTH_COOKIE</code></a> |
| if present. It verifies the signature and if correct it creates the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server"><code>AuthenticationToken</code></a> and returns |
| it. |
| <p> |
| If this method returns <code>null</code> the filter will invoke the configured <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a> |
| to perform user authentication.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - request object.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the Authentication token if the request is authenticated, <code>null</code> otherwise.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - thrown if an IO error occurred.</dd> |
| <dd><code><a href="../../../../../../org/apache/hadoop/security/authentication/client/AuthenticationException.html" title="class in org.apache.hadoop.security.authentication.client">AuthenticationException</a></code> - thrown if the token is invalid or if it has expired.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="verifyTokenType-org.apache.hadoop.security.authentication.server.AuthenticationHandler-org.apache.hadoop.security.authentication.server.AuthenticationToken-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>verifyTokenType</h4> |
| <pre>protected boolean verifyTokenType(<a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server">AuthenticationHandler</a> handler, |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationToken.html" title="class in org.apache.hadoop.security.authentication.server">AuthenticationToken</a> token)</pre> |
| <div class="block">This method verifies if the specified token type matches one of the the |
| token types supported by a specified <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a>. This |
| method is specifically designed to work with |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/CompositeAuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>CompositeAuthenticationHandler</code></a> implementation which supports |
| multiple authentication schemes while the <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a> |
| interface supports a single type via |
| <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html#getType--">AuthenticationHandler.getType()</a> method.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>handler</code> - The authentication handler whose supported token types |
| should be used for verification.</dd> |
| <dd><code>token</code> - The token whose type needs to be verified.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true If the token type matches one of the supported token types |
| false Otherwise</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="doFilter-javax.servlet.ServletRequest-javax.servlet.ServletResponse-javax.servlet.FilterChain-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doFilter</h4> |
| <pre>public void doFilter(javax.servlet.ServletRequest request, |
| javax.servlet.ServletResponse response, |
| javax.servlet.FilterChain filterChain) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, |
| javax.servlet.ServletException</pre> |
| <div class="block">If the request has a valid authentication token it allows the request to continue to the target resource, |
| otherwise it triggers an authentication sequence using the configured <a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><code>AuthenticationHandler</code></a>.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code>doFilter</code> in interface <code>javax.servlet.Filter</code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>request</code> - the request object.</dd> |
| <dd><code>response</code> - the response object.</dd> |
| <dd><code>filterChain</code> - the filter chain object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - thrown if an IO error occurred.</dd> |
| <dd><code>javax.servlet.ServletException</code> - thrown if a processing error occurred.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="doFilter-javax.servlet.FilterChain-javax.servlet.http.HttpServletRequest-javax.servlet.http.HttpServletResponse-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doFilter</h4> |
| <pre>protected void doFilter(javax.servlet.FilterChain filterChain, |
| javax.servlet.http.HttpServletRequest request, |
| javax.servlet.http.HttpServletResponse response) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a>, |
| javax.servlet.ServletException</pre> |
| <div class="block">Delegates call to the servlet filter chain. Sub-classes my override this |
| method to perform pre and post tasks.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>filterChain</code> - the filter chain object.</dd> |
| <dd><code>request</code> - the request object.</dd> |
| <dd><code>response</code> - the response object.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - thrown if an IO error occurred.</dd> |
| <dd><code>javax.servlet.ServletException</code> - thrown if a processing error occurred.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="createAuthCookie-javax.servlet.http.HttpServletResponse-java.lang.String-java.lang.String-java.lang.String-long-boolean-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>createAuthCookie</h4> |
| <pre>public static void createAuthCookie(javax.servlet.http.HttpServletResponse resp, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> token, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> domain, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> path, |
| long expires, |
| boolean isCookiePersistent, |
| boolean isSecure)</pre> |
| <div class="block">Creates the Hadoop authentication HTTP cookie.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>resp</code> - the response object.</dd> |
| <dd><code>token</code> - authentication token for the cookie.</dd> |
| <dd><code>domain</code> - the cookie domain.</dd> |
| <dd><code>path</code> - the cookie path.</dd> |
| <dd><code>expires</code> - UNIX timestamp that indicates the expire date of the |
| cookie. It has no effect if its value < 0.</dd> |
| <dd><code>isSecure</code> - is the cookie secure?</dd> |
| <dd><code>isCookiePersistent</code> - whether the cookie is persistent or not. |
| |
| XXX the following code duplicate some logic in Jetty / Servlet API, |
| because of the fact that Hadoop is stuck at servlet 2.5 and jetty 6 |
| right now.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/AuthenticationFilter.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/hadoop/security/authentication/server/AltKerberosAuthenticationHandler.html" title="class in org.apache.hadoop.security.authentication.server"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/hadoop/security/authentication/server/AuthenticationHandler.html" title="interface in org.apache.hadoop.security.authentication.server"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/hadoop/security/authentication/server/AuthenticationFilter.html" target="_top">Frames</a></li> |
| <li><a href="AuthenticationFilter.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2008–2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |