| <!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:40 GMT 2021 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>SecurityUtil (Apache Hadoop Common 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="SecurityUtil (Apache Hadoop Common 3.3.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/SecurityUtil.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/SaslRpcServer.SaslGssCallbackHandler.html" title="class in org.apache.hadoop.security"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/hadoop/security/SecurityUtil.QualifiedHostResolver.html" title="class in org.apache.hadoop.security"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/hadoop/security/SecurityUtil.html" target="_top">Frames</a></li> |
| <li><a href="SecurityUtil.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><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </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>Constr | </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</div> |
| <h2 title="Class SecurityUtil" class="title">Class SecurityUtil</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.SecurityUtil</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public final class <span class="typeNameLabel">SecurityUtil</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></pre> |
| <div class="block">Security Utils.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.QualifiedHostResolver.html" title="class in org.apache.hadoop.security">SecurityUtil.QualifiedHostResolver</a></span></code> |
| <div class="block">This an alternate resolver with important properties that the standard |
| java resolver lacks: |
| 1) The hostname is fully qualified.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== 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/SecurityUtil.html#FAILED_TO_GET_UGI_MSG_HEADER">FAILED_TO_GET_UGI_MSG_HEADER</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/SecurityUtil.html#HOSTNAME_PATTERN">HOSTNAME_PATTERN</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static org.slf4j.Logger</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#LOG">LOG</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="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="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/SecurityUtil.html#buildDTServiceName-java.net.URI-int-">buildDTServiceName</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> uri, |
| int defPort)</code> |
| <div class="block">create the service name for a Delegation token</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#buildTokenService-java.net.InetSocketAddress-">buildTokenService</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a> addr)</code> |
| <div class="block">Construct the service key for a token</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#buildTokenService-java.net.URI-">buildTokenService</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> uri)</code> |
| <div class="block">Construct the service key for a token</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#doAsCurrentUser-java.security.PrivilegedExceptionAction-">doAsCurrentUser</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/security/PrivilegedExceptionAction.html?is-external=true" title="class or interface in java.security">PrivilegedExceptionAction</a><T> action)</code> |
| <div class="block">Perform the given action as the daemon's current user.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#doAsLoginUser-java.security.PrivilegedExceptionAction-">doAsLoginUser</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/security/PrivilegedExceptionAction.html?is-external=true" title="class or interface in java.security">PrivilegedExceptionAction</a><T> action)</code> |
| <div class="block">Perform the given action as the daemon's login user.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <T> T</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#doAsLoginUserOrFatal-java.security.PrivilegedAction-">doAsLoginUserOrFatal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/security/PrivilegedAction.html?is-external=true" title="class or interface in java.security">PrivilegedAction</a><T> action)</code> |
| <div class="block">Perform the given action as the daemon's login user.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/hadoop/security/UserGroupInformation.AuthenticationMethod.html" title="enum in org.apache.hadoop.security">UserGroupInformation.AuthenticationMethod</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#getAuthenticationMethod-org.apache.hadoop.conf.Configuration-">getAuthenticationMethod</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> </td> |
| </tr> |
| <tr id="i7" 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/SecurityUtil.html#getClientPrincipal-java.lang.Class-org.apache.hadoop.conf.Configuration-">getClientPrincipal</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> protocol, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> |
| <div class="block">Look up the client principal for a given protocol.</div> |
| </td> |
| </tr> |
| <tr id="i8" 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/SecurityUtil.html#getHostFromPrincipal-java.lang.String-">getHostFromPrincipal</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> principalName)</code> |
| <div class="block">Get the host name from the principal name of format <service |
| >/host@realm.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static org.apache.hadoop.security.KerberosInfo</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#getKerberosInfo-java.lang.Class-org.apache.hadoop.conf.Configuration-">getKerberosInfo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> protocol, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> |
| <div class="block">Look up the KerberosInfo for a given protocol.</div> |
| </td> |
| </tr> |
| <tr id="i10" 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/SecurityUtil.html#getServerPrincipal-java.lang.String-java.net.InetAddress-">getServerPrincipal</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> principalConfig, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a> addr)</code> |
| <div class="block">Convert Kerberos principal name pattern to valid Kerberos principal names.</div> |
| </td> |
| </tr> |
| <tr id="i11" 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/SecurityUtil.html#getServerPrincipal-java.lang.String-java.lang.String-">getServerPrincipal</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> principalConfig, |
| <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> hostname)</code> |
| <div class="block">Convert Kerberos principal name pattern to valid Kerberos principal |
| names.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../org/apache/hadoop/security/token/TokenInfo.html" title="annotation in org.apache.hadoop.security.token">TokenInfo</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#getTokenInfo-java.lang.Class-org.apache.hadoop.conf.Configuration-">getTokenInfo</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> protocol, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> |
| <div class="block">Look up the TokenInfo for a given protocol.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#getTokenServiceAddr-org.apache.hadoop.security.token.Token-">getTokenServiceAddr</a></span>(<a href="../../../../org/apache/hadoop/security/token/Token.html" title="class in org.apache.hadoop.security.token">Token</a><?> token)</code> |
| <div class="block">Decode the given token's service field into an InetAddress</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><org.apache.hadoop.util.ZKUtil.ZKAuthInfo></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#getZKAuthInfos-org.apache.hadoop.conf.Configuration-java.lang.String-">getZKAuthInfos</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| <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> configKey)</code> |
| <div class="block">Utility method to fetch ZK auth info from the configuration.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>protected static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#isOriginalTGT-javax.security.auth.kerberos.KerberosTicket-">isOriginalTGT</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/javax/security/auth/kerberos/KerberosTicket.html?is-external=true" title="class or interface in javax.security.auth.kerberos">KerberosTicket</a> ticket)</code> |
| <div class="block">Check whether the server principal is the TGS's principal</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#isPrivilegedPort-int-">isPrivilegedPort</a></span>(int port)</code> </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#login-org.apache.hadoop.conf.Configuration-java.lang.String-java.lang.String-">login</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| <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> keytabFileKey, |
| <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> userNameKey)</code> |
| <div class="block">Login as a principal specified in config.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#login-org.apache.hadoop.conf.Configuration-java.lang.String-java.lang.String-java.lang.String-">login</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| <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> keytabFileKey, |
| <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> userNameKey, |
| <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> hostname)</code> |
| <div class="block">Login as a principal specified in config.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#setAuthenticationMethod-org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod-org.apache.hadoop.conf.Configuration-">setAuthenticationMethod</a></span>(<a href="../../../../org/apache/hadoop/security/UserGroupInformation.AuthenticationMethod.html" title="enum in org.apache.hadoop.security">UserGroupInformation.AuthenticationMethod</a> authenticationMethod, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#setConfiguration-org.apache.hadoop.conf.Configuration-">setConfiguration</a></span>(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</code> </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#setTokenService-org.apache.hadoop.security.token.Token-java.net.InetSocketAddress-">setTokenService</a></span>(<a href="../../../../org/apache/hadoop/security/token/Token.html" title="class in org.apache.hadoop.security.token">Token</a><?> token, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a> addr)</code> |
| <div class="block">Set the given token's service to the format expected by the RPC client</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="LOG"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>LOG</h4> |
| <pre>public static final org.slf4j.Logger LOG</pre> |
| </li> |
| </ul> |
| <a name="HOSTNAME_PATTERN"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>HOSTNAME_PATTERN</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> HOSTNAME_PATTERN</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.hadoop.security.SecurityUtil.HOSTNAME_PATTERN">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="FAILED_TO_GET_UGI_MSG_HEADER"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>FAILED_TO_GET_UGI_MSG_HEADER</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> FAILED_TO_GET_UGI_MSG_HEADER</pre> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../constant-values.html#org.apache.hadoop.security.SecurityUtil.FAILED_TO_GET_UGI_MSG_HEADER">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setConfiguration-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setConfiguration</h4> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public static void setConfiguration(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| </li> |
| </ul> |
| <a name="isOriginalTGT-javax.security.auth.kerberos.KerberosTicket-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isOriginalTGT</h4> |
| <pre>protected static boolean isOriginalTGT(<a href="https://docs.oracle.com/javase/8/docs/api/javax/security/auth/kerberos/KerberosTicket.html?is-external=true" title="class or interface in javax.security.auth.kerberos">KerberosTicket</a> ticket)</pre> |
| <div class="block">Check whether the server principal is the TGS's principal</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ticket</code> - the original TGT (the ticket that is obtained when a |
| kinit is done)</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true or false</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getServerPrincipal-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServerPrincipal</h4> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public 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> getServerPrincipal(<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> principalConfig, |
| <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> hostname) |
| 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></pre> |
| <div class="block">Convert Kerberos principal name pattern to valid Kerberos principal |
| names. It replaces hostname pattern with hostname, which should be |
| fully-qualified domain name. If hostname is null or "0.0.0.0", it uses |
| dynamically looked-up fqdn of the current host instead.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>principalConfig</code> - the Kerberos principal name conf value to convert</dd> |
| <dd><code>hostname</code> - the fully-qualified domain name used for substitution</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>converted Kerberos principal name</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> - if the client address cannot be determined</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getServerPrincipal-java.lang.String-java.net.InetAddress-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getServerPrincipal</h4> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public 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> getServerPrincipal(<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> principalConfig, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net">InetAddress</a> addr) |
| 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></pre> |
| <div class="block">Convert Kerberos principal name pattern to valid Kerberos principal names. |
| This method is similar to <a href="../../../../org/apache/hadoop/security/SecurityUtil.html#getServerPrincipal-java.lang.String-java.lang.String-"><code>getServerPrincipal(String, String)</code></a>, |
| except 1) the reverse DNS lookup from addr to hostname is done only when |
| necessary, 2) param addr can't be null (no default behavior of using local |
| hostname when addr is null).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>principalConfig</code> - Kerberos principal name pattern to convert</dd> |
| <dd><code>addr</code> - InetAddress of the host used for substitution</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>converted Kerberos principal name</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> - if the client address cannot be determined</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="login-org.apache.hadoop.conf.Configuration-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>login</h4> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public static void login(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| <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> keytabFileKey, |
| <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> userNameKey) |
| 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></pre> |
| <div class="block">Login as a principal specified in config. Substitute $host in |
| user's Kerberos principal name with a dynamically looked-up fully-qualified |
| domain name of the current host.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>conf</code> - conf to use</dd> |
| <dd><code>keytabFileKey</code> - the key to look for keytab file in conf</dd> |
| <dd><code>userNameKey</code> - the key to look for user's Kerberos principal name in conf</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> - if login fails</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="login-org.apache.hadoop.conf.Configuration-java.lang.String-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>login</h4> |
| <pre>@InterfaceAudience.Public |
| @InterfaceStability.Evolving |
| public static void login(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| <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> keytabFileKey, |
| <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> userNameKey, |
| <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> hostname) |
| 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></pre> |
| <div class="block">Login as a principal specified in config. Substitute $host in user's Kerberos principal |
| name with hostname. If non-secure mode - return. If no keytab available - |
| bail out with an exception</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>conf</code> - conf to use</dd> |
| <dd><code>keytabFileKey</code> - the key to look for keytab file in conf</dd> |
| <dd><code>userNameKey</code> - the key to look for user's Kerberos principal name in conf</dd> |
| <dd><code>hostname</code> - hostname to use for substitution</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> - if the config doesn't specify a keytab</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="buildDTServiceName-java.net.URI-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buildDTServiceName</h4> |
| <pre>public 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> buildDTServiceName(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> uri, |
| int defPort)</pre> |
| <div class="block">create the service name for a Delegation token</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - of the service</dd> |
| <dd><code>defPort</code> - is used if the uri lacks a port</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the token service, or null if no authority</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../org/apache/hadoop/security/SecurityUtil.html#buildTokenService-java.net.InetSocketAddress-"><code>buildTokenService(InetSocketAddress)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHostFromPrincipal-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHostFromPrincipal</h4> |
| <pre>public 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> getHostFromPrincipal(<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> principalName)</pre> |
| <div class="block">Get the host name from the principal name of format <service |
| >/host@realm.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>principalName</code> - principal name of format as described above</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>host name if the the string conforms to the above format, else null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getKerberosInfo-java.lang.Class-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getKerberosInfo</h4> |
| <pre>public static org.apache.hadoop.security.KerberosInfo getKerberosInfo(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> protocol, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| <div class="block">Look up the KerberosInfo for a given protocol. It searches all known |
| SecurityInfo providers.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>protocol</code> - the protocol class to get the information for</dd> |
| <dd><code>conf</code> - configuration object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the KerberosInfo or null if it has no KerberosInfo defined</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getClientPrincipal-java.lang.Class-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClientPrincipal</h4> |
| <pre>public 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> getClientPrincipal(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> protocol, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| <div class="block">Look up the client principal for a given protocol. It searches all known |
| SecurityInfo providers.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>protocol</code> - the protocol class to get the information for</dd> |
| <dd><code>conf</code> - configuration object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>client principal or null if it has no client principal defined.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTokenInfo-java.lang.Class-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTokenInfo</h4> |
| <pre>public static <a href="../../../../org/apache/hadoop/security/token/TokenInfo.html" title="annotation in org.apache.hadoop.security.token">TokenInfo</a> getTokenInfo(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a><?> protocol, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| <div class="block">Look up the TokenInfo for a given protocol. It searches all known |
| SecurityInfo providers.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>protocol</code> - The protocol class to get the information for.</dd> |
| <dd><code>conf</code> - Configuration object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the TokenInfo or null if it has no KerberosInfo defined</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getTokenServiceAddr-org.apache.hadoop.security.token.Token-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getTokenServiceAddr</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a> getTokenServiceAddr(<a href="../../../../org/apache/hadoop/security/token/Token.html" title="class in org.apache.hadoop.security.token">Token</a><?> token)</pre> |
| <div class="block">Decode the given token's service field into an InetAddress</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>token</code> - from which to obtain the service</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>InetAddress for the service</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setTokenService-org.apache.hadoop.security.token.Token-java.net.InetSocketAddress-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setTokenService</h4> |
| <pre>public static void setTokenService(<a href="../../../../org/apache/hadoop/security/token/Token.html" title="class in org.apache.hadoop.security.token">Token</a><?> token, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a> addr)</pre> |
| <div class="block">Set the given token's service to the format expected by the RPC client</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>token</code> - a delegation token</dd> |
| <dd><code>addr</code> - the socket for the rpc connection</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="buildTokenService-java.net.InetSocketAddress-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buildTokenService</h4> |
| <pre>public static <a href="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a> buildTokenService(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetSocketAddress.html?is-external=true" title="class or interface in java.net">InetSocketAddress</a> addr)</pre> |
| <div class="block">Construct the service key for a token</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>addr</code> - InetSocketAddress of remote connection with a token</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>"ip:port" or "host:port" depending on the value of |
| hadoop.security.token.service.use_ip</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="buildTokenService-java.net.URI-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buildTokenService</h4> |
| <pre>public static <a href="../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</a> buildTokenService(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> uri)</pre> |
| <div class="block">Construct the service key for a token</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>uri</code> - of remote connection with a token</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>"ip:port" or "host:port" depending on the value of |
| hadoop.security.token.service.use_ip</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="doAsLoginUserOrFatal-java.security.PrivilegedAction-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doAsLoginUserOrFatal</h4> |
| <pre>public static <T> T doAsLoginUserOrFatal(<a href="https://docs.oracle.com/javase/8/docs/api/java/security/PrivilegedAction.html?is-external=true" title="class or interface in java.security">PrivilegedAction</a><T> action)</pre> |
| <div class="block">Perform the given action as the daemon's login user. If the login |
| user cannot be determined, this will log a FATAL error and exit |
| the whole JVM.</div> |
| </li> |
| </ul> |
| <a name="doAsLoginUser-java.security.PrivilegedExceptionAction-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doAsLoginUser</h4> |
| <pre>public static <T> T doAsLoginUser(<a href="https://docs.oracle.com/javase/8/docs/api/java/security/PrivilegedExceptionAction.html?is-external=true" title="class or interface in java.security">PrivilegedExceptionAction</a><T> action) |
| 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></pre> |
| <div class="block">Perform the given action as the daemon's login user. If an |
| InterruptedException is thrown, it is converted to an IOException.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>action</code> - the action to perform</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the result of the action</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> - in the event of error</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="doAsCurrentUser-java.security.PrivilegedExceptionAction-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>doAsCurrentUser</h4> |
| <pre>public static <T> T doAsCurrentUser(<a href="https://docs.oracle.com/javase/8/docs/api/java/security/PrivilegedExceptionAction.html?is-external=true" title="class or interface in java.security">PrivilegedExceptionAction</a><T> action) |
| 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></pre> |
| <div class="block">Perform the given action as the daemon's current user. If an |
| InterruptedException is thrown, it is converted to an IOException.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>action</code> - the action to perform</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the result of the action</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> - in the event of error</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getAuthenticationMethod-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getAuthenticationMethod</h4> |
| <pre>public static <a href="../../../../org/apache/hadoop/security/UserGroupInformation.AuthenticationMethod.html" title="enum in org.apache.hadoop.security">UserGroupInformation.AuthenticationMethod</a> getAuthenticationMethod(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| </li> |
| </ul> |
| <a name="setAuthenticationMethod-org.apache.hadoop.security.UserGroupInformation.AuthenticationMethod-org.apache.hadoop.conf.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAuthenticationMethod</h4> |
| <pre>public static void setAuthenticationMethod(<a href="../../../../org/apache/hadoop/security/UserGroupInformation.AuthenticationMethod.html" title="enum in org.apache.hadoop.security">UserGroupInformation.AuthenticationMethod</a> authenticationMethod, |
| <a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf)</pre> |
| </li> |
| </ul> |
| <a name="isPrivilegedPort-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isPrivilegedPort</h4> |
| <pre>public static boolean isPrivilegedPort(int port)</pre> |
| </li> |
| </ul> |
| <a name="getZKAuthInfos-org.apache.hadoop.conf.Configuration-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>getZKAuthInfos</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><org.apache.hadoop.util.ZKUtil.ZKAuthInfo> getZKAuthInfos(<a href="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf">Configuration</a> conf, |
| <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> configKey) |
| 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></pre> |
| <div class="block">Utility method to fetch ZK auth info from the configuration.</div> |
| <dl> |
| <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> - if the Zookeeper ACLs configuration file |
| cannot be read</dd> |
| <dd><code>ZKUtil.BadAuthFormatException</code> - if the auth format is invalid</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/SecurityUtil.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/SaslRpcServer.SaslGssCallbackHandler.html" title="class in org.apache.hadoop.security"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/hadoop/security/SecurityUtil.QualifiedHostResolver.html" title="class in org.apache.hadoop.security"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/hadoop/security/SecurityUtil.html" target="_top">Frames</a></li> |
| <li><a href="SecurityUtil.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><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </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>Constr | </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> |