| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (17) --> |
| <title>User (Apache HBase 4.0.0-alpha-1-SNAPSHOT API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: package: org.apache.hadoop.hbase.security, class: User"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="class-use/User.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#class">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li><a href="#nested-class-summary">Nested</a> | </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="sub-nav-list"> |
| <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> |
| <div class="nav-list-search"><label for="search-input">SEARCH:</label> |
| <input type="text" id="search-input" value="search" disabled="disabled"> |
| <input type="reset" id="reset-button" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.hadoop.hbase.security</a></div> |
| <h1 title="Class User" class="title">Class User</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a> |
| <div class="inheritance">org.apache.hadoop.hbase.security.User</div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <dl class="notes"> |
| <dt>Direct Known Subclasses:</dt> |
| <dd><code><a href="access/AccessChecker.InputUser.html" title="class in org.apache.hadoop.hbase.security.access">AccessChecker.InputUser</a></code>, <code><a href="User.SecureHadoopUser.html" title="class in org.apache.hadoop.hbase.security">User.SecureHadoopUser</a></code></dd> |
| </dl> |
| <hr> |
| <div class="type-signature"><span class="annotations">@Public |
| </span><span class="modifiers">public abstract class </span><span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-51">User</a></span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div> |
| <div class="block">Wrapper to abstract out usage of user and group information in HBase. |
| <p> |
| This class provides a common interface for interacting with user and group information across |
| changing APIs in different versions of Hadoop. It only provides access to the common set of |
| functionality in <code>UserGroupInformation</code> currently needed by |
| HBase, but can be extended as needs change. |
| </p></div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <li> |
| <section class="nested-class-summary" id="nested-class-summary"> |
| <h2>Nested Class Summary</h2> |
| <div class="caption"><span>Nested Classes</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Class</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>static final class </code></div> |
| <div class="col-second even-row-color"><code><a href="User.SecureHadoopUser.html" class="type-name-link" title="class in org.apache.hadoop.hbase.security">User.SecureHadoopUser</a></code></div> |
| <div class="col-last even-row-color"> |
| <div class="block">Bridges <code>User</code> invocations to underlying calls to |
| <code>UserGroupInformation</code> for secure Hadoop 0.20 and versions |
| 0.21 and above.</div> |
| </div> |
| <div class="col-first odd-row-color"><code>static class </code></div> |
| <div class="col-second odd-row-color"><code><a href="User.TestingGroups.html" class="type-name-link" title="class in org.apache.hadoop.hbase.security">User.TestingGroups</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <li> |
| <section class="field-summary" id="field-summary"> |
| <h2>Field Summary</h2> |
| <div class="caption"><span>Fields</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Field</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color"><code><a href="#HBASE_SECURITY_AUTHORIZATION_CONF_KEY" class="member-name-link">HBASE_SECURITY_AUTHORIZATION_CONF_KEY</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| <div class="col-first odd-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color"><code><a href="#HBASE_SECURITY_CONF_KEY" class="member-name-link">HBASE_SECURITY_CONF_KEY</a></code></div> |
| <div class="col-last odd-row-color"> </div> |
| <div class="col-first even-row-color"><code>protected org.apache.hadoop.security.UserGroupInformation</code></div> |
| <div class="col-second even-row-color"><code><a href="#ugi" class="member-name-link">ugi</a></code></div> |
| <div class="col-last even-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <li> |
| <section class="constructor-summary" id="constructor-summary"> |
| <h2>Constructor Summary</h2> |
| <div class="caption"><span>Constructors</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Constructor</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E()" class="member-name-link">User</a>()</code></div> |
| <div class="col-last even-row-color"> </div> |
| </div> |
| </section> |
| </li> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#addToken(org.apache.hadoop.security.token.Token)" class="member-name-link">addToken</a><wbr>(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Adds the given Token to the user's credentials.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="User.html" title="class in org.apache.hadoop.hbase.security">User</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#create(org.apache.hadoop.security.UserGroupInformation)" class="member-name-link">create</a><wbr>(org.apache.hadoop.security.UserGroupInformation ugi)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Wraps an underlying <code>UserGroupInformation</code> instance.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="User.html" title="class in org.apache.hadoop.hbase.security">User</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#createUserForTesting(org.apache.hadoop.conf.Configuration,java.lang.String,java.lang.String%5B%5D)" class="member-name-link">createUserForTesting</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>[] groups)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Generates a new <code>User</code> instance specifically for use in test code.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#equals(java.lang.Object)" class="member-name-link">equals</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> o)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="User.html" title="class in org.apache.hadoop.hbase.security">User</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getCurrent()" class="member-name-link">getCurrent</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns the <code>User</code> instance within current execution context.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>[]</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGroupNames()" class="member-name-link">getGroupNames</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the list of groups of which this user is a member.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getName()" class="member-name-link">getName</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the full user name.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getShortName()" class="member-name-link">getShortName</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Returns the shortened version of the user name -- the portion that maps to an operating system |
| user name.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.apache.hadoop.security.token.Token<?></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getToken(java.lang.String,java.lang.String)" class="member-name-link">getToken</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> kind, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> service)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns the Token of the specified kind associated with this user, or null if the Token is not |
| present.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTokens()" class="member-name-link">getTokens</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns all the tokens stored in the user's credentials.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>org.apache.hadoop.security.UserGroupInformation</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getUGI()" class="member-name-link">getUGI</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#hashCode()" class="member-name-link">hashCode</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isHBaseSecurityEnabled(org.apache.hadoop.conf.Configuration)" class="member-name-link">isHBaseSecurityEnabled</a><wbr>(org.apache.hadoop.conf.Configuration conf)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns whether or not secure authentication is enabled for HBase.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isLoginFromKeytab()" class="member-name-link">isLoginFromKeytab</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> |
| <div class="block">Returns true if user credentials are obtained from keytab.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isSecurityEnabled()" class="member-name-link">isSecurityEnabled</a>()</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Returns whether or not Kerberos authentication is configured for Hadoop.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#login(java.lang.String,java.lang.String)" class="member-name-link">login</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> keytabLocation, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> pricipalName)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Login with the given keytab and principal.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#login(org.apache.hadoop.conf.Configuration,java.lang.String,java.lang.String,java.lang.String)" class="member-name-link">login</a><wbr>(org.apache.hadoop.conf.Configuration conf, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> fileConfKey, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> principalConfKey, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> localhost)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Log in the current process using the given configuration keys for the credential file and login |
| principal.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <T> T</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#runAs(java.security.PrivilegedAction)" class="member-name-link">runAs</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/PrivilegedAction.html" title="class or interface in java.security" class="external-link">PrivilegedAction</a><T> action)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Executes the given action within the context of this user.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>abstract <T> T</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#runAs(java.security.PrivilegedExceptionAction)" class="member-name-link">runAs</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/PrivilegedExceptionAction.html" title="class or interface in java.security" class="external-link">PrivilegedExceptionAction</a><T> action)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"> |
| <div class="block">Executes the given action within the context of this user.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <T> T</code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#runAsLoginUser(java.security.PrivilegedExceptionAction)" class="member-name-link">runAsLoginUser</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/PrivilegedExceptionAction.html" title="class or interface in java.security" class="external-link">PrivilegedExceptionAction</a><T> action)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Executes the given action as the login user</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static boolean</code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#shouldLoginFromKeytab(org.apache.hadoop.conf.Configuration)" class="member-name-link">shouldLoginFromKeytab</a><wbr>(org.apache.hadoop.conf.Configuration conf)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">In secure environment, if a user specified his keytab and principal, a hbase client will try to |
| login with them.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"> </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class java.lang.<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <li> |
| <section class="field-details" id="field-detail"> |
| <h2>Field Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="HBASE_SECURITY_CONF_KEY"> |
| <h3>HBASE_SECURITY_CONF_KEY</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-53">HBASE_SECURITY_CONF_KEY</a></span></div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.security.User.HBASE_SECURITY_CONF_KEY">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="HBASE_SECURITY_AUTHORIZATION_CONF_KEY"> |
| <h3>HBASE_SECURITY_AUTHORIZATION_CONF_KEY</h3> |
| <div class="member-signature"><span class="modifiers">public static final</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-54">HBASE_SECURITY_AUTHORIZATION_CONF_KEY</a></span></div> |
| <dl class="notes"> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="see-list"> |
| <li><a href="../../../../../constant-values.html#org.apache.hadoop.hbase.security.User.HBASE_SECURITY_AUTHORIZATION_CONF_KEY">Constant Field Values</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="ugi"> |
| <h3>ugi</h3> |
| <div class="member-signature"><span class="modifiers">protected</span> <span class="return-type">org.apache.hadoop.security.UserGroupInformation</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-56">ugi</a></span></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <li> |
| <section class="constructor-details" id="constructor-detail"> |
| <h2>Constructor Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="<init>()"> |
| <h3>User</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-52">User</a></span>()</div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="getUGI()"> |
| <h3>getUGI</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">org.apache.hadoop.security.UserGroupInformation</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-58">getUGI</a></span>()</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getName()"> |
| <h3>getName</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-67">getName</a></span>()</div> |
| <div class="block">Returns the full user name. For Kerberos principals this will include the host and realm |
| portions of the principal name.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>User full name.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getGroupNames()"> |
| <h3>getGroupNames</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>[]</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-76">getGroupNames</a></span>()</div> |
| <div class="block">Returns the list of groups of which this user is a member. On secure Hadoop this returns the |
| group information for the user as resolved on the server. For 0.20 based Hadoop, the group |
| names are passed from the client.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getShortName()"> |
| <h3>getShortName</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-85">getShortName</a></span>()</div> |
| <div class="block">Returns the shortened version of the user name -- the portion that maps to an operating system |
| user name.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Short name</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="runAs(java.security.PrivilegedAction)"> |
| <h3>runAs</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="type-parameters"><T></span> <span class="return-type">T</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-90">runAs</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/PrivilegedAction.html" title="class or interface in java.security" class="external-link">PrivilegedAction</a><T> action)</span></div> |
| <div class="block">Executes the given action within the context of this user.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="runAs(java.security.PrivilegedExceptionAction)"> |
| <h3>runAs</h3> |
| <div class="member-signature"><span class="modifiers">public abstract</span> <span class="type-parameters"><T></span> <span class="return-type">T</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-95">runAs</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/PrivilegedExceptionAction.html" title="class or interface in java.security" class="external-link">PrivilegedExceptionAction</a><T> action)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a>, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/InterruptedException.html" title="class or interface in java.lang" class="external-link">InterruptedException</a></span></div> |
| <div class="block">Executes the given action within the context of this user.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/InterruptedException.html" title="class or interface in java.lang" class="external-link">InterruptedException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getToken(java.lang.String,java.lang.String)"> |
| <h3>getToken</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">org.apache.hadoop.security.token.Token<?></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-105">getToken</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> kind, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> service)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Returns the Token of the specified kind associated with this user, or null if the Token is not |
| present.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>kind</code> - the kind of token</dd> |
| <dd><code>service</code> - service on which the token is supposed to be used</dd> |
| <dt>Returns:</dt> |
| <dd>the token of the specified kind.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getTokens()"> |
| <h3>getTokens</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/Collection.html" title="class or interface in java.util" class="external-link">Collection</a><org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-120">getTokens</a></span>()</div> |
| <div class="block">Returns all the tokens stored in the user's credentials.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="addToken(org.apache.hadoop.security.token.Token)"> |
| <h3>addToken</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-128">addToken</a></span><wbr><span class="parameters">(org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token)</span></div> |
| <div class="block">Adds the given Token to the user's credentials.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>token</code> - the token to add</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isLoginFromKeytab()"> |
| <h3>isLoginFromKeytab</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-133">isLoginFromKeytab</a></span>()</div> |
| <div class="block">Returns true if user credentials are obtained from keytab.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="equals(java.lang.Object)"> |
| <h3>equals</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-137">equals</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> o)</span></div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a></code> in class <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hashCode()"> |
| <h3>hashCode</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-148">hashCode</a></span>()</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a></code> in class <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="toString()"> |
| <h3>toString</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-153">toString</a></span>()</div> |
| <dl class="notes"> |
| <dt>Overrides:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code> in class <code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCurrent()"> |
| <h3>getCurrent</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="User.html" title="class in org.apache.hadoop.hbase.security">User</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-159">getCurrent</a></span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Returns the <code>User</code> instance within current execution context.</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="runAsLoginUser(java.security.PrivilegedExceptionAction)"> |
| <h3>runAsLoginUser</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="type-parameters"><T></span> <span class="return-type">T</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-168">runAsLoginUser</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/security/PrivilegedExceptionAction.html" title="class or interface in java.security" class="external-link">PrivilegedExceptionAction</a><T> action)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Executes the given action as the login user</div> |
| <dl class="notes"> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code></dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="create(org.apache.hadoop.security.UserGroupInformation)"> |
| <h3>create</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="User.html" title="class in org.apache.hadoop.hbase.security">User</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-184">create</a></span><wbr><span class="parameters">(org.apache.hadoop.security.UserGroupInformation ugi)</span></div> |
| <div class="block">Wraps an underlying <code>UserGroupInformation</code> instance.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>ugi</code> - The base Hadoop user</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="createUserForTesting(org.apache.hadoop.conf.Configuration,java.lang.String,java.lang.String[])"> |
| <h3>createUserForTesting</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="User.html" title="class in org.apache.hadoop.hbase.security">User</a></span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-197">createUserForTesting</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>[] groups)</span></div> |
| <div class="block">Generates a new <code>User</code> instance specifically for use in test code.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>name</code> - the full username</dd> |
| <dd><code>groups</code> - the group names to which the test user will belong</dd> |
| <dt>Returns:</dt> |
| <dd>a new <code>User</code> instance</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="login(org.apache.hadoop.conf.Configuration,java.lang.String,java.lang.String,java.lang.String)"> |
| <h3>login</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-216">login</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> fileConfKey, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> principalConfKey, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> localhost)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Log in the current process using the given configuration keys for the credential file and login |
| principal. |
| <p> |
| <strong>This is only applicable when running on secure Hadoop</strong> -- see |
| org.apache.hadoop.security.SecurityUtil#login(Configuration,String,String,String). On regular |
| Hadoop (without security features), this will safely be ignored. |
| </p></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>conf</code> - The configuration data to use</dd> |
| <dd><code>fileConfKey</code> - Property key used to configure path to the credential file</dd> |
| <dd><code>principalConfKey</code> - Property key used to configure login principal</dd> |
| <dd><code>localhost</code> - Current hostname to use in any credentials</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - underlying exception from SecurityUtil.login() call</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="login(java.lang.String,java.lang.String)"> |
| <h3>login</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-227">login</a></span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> keytabLocation, |
| <a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> pricipalName)</span> |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></span></div> |
| <div class="block">Login with the given keytab and principal.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>keytabLocation</code> - path of keytab</dd> |
| <dd><code>pricipalName</code> - login principal</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/IOException.html" title="class or interface in java.io" class="external-link">IOException</a></code> - underlying exception from UserGroupInformation.loginUserFromKeytab</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isSecurityEnabled()"> |
| <h3>isSecurityEnabled</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-236">isSecurityEnabled</a></span>()</div> |
| <div class="block">Returns whether or not Kerberos authentication is configured for Hadoop. For non-secure Hadoop, |
| this always returns <code>false</code>. For secure Hadoop, it will return the value from |
| <code>UserGroupInformation.isSecurityEnabled()</code>.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isHBaseSecurityEnabled(org.apache.hadoop.conf.Configuration)"> |
| <h3>isHBaseSecurityEnabled</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-245">isHBaseSecurityEnabled</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf)</span></div> |
| <div class="block">Returns whether or not secure authentication is enabled for HBase. Note that HBase security |
| requires HDFS security to provide any guarantees, so it is recommended that secure HBase should |
| run on secure HDFS.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="shouldLoginFromKeytab(org.apache.hadoop.conf.Configuration)"> |
| <h3>shouldLoginFromKeytab</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type">boolean</span> <span class="element-name"><a href="../../../../../src-html/org/apache/hadoop/hbase/security/User.html#line-255">shouldLoginFromKeytab</a></span><wbr><span class="parameters">(org.apache.hadoop.conf.Configuration conf)</span></div> |
| <div class="block">In secure environment, if a user specified his keytab and principal, a hbase client will try to |
| login with them. Otherwise, hbase client will try to obtain ticket(through kinit) from system.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>conf</code> - configuration file</dd> |
| <dt>Returns:</dt> |
| <dd>true if keytab and principal are configured</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><small>Copyright © 2007–2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |