Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.hadoop.hbase.security.User;
import org.apache.hadoop.hbase.util.Pair;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.security.token.TokenIdentifier;
import org.apache.yetus.audience.InterfaceAudience;
Expand Down Expand Up @@ -124,8 +125,11 @@ public Pair<SaslClientAuthenticationProvider, Token<? extends TokenIdentifier>>
}
}
// Unwrap PROXY auth'n method if that's what we have coming in.
if (user.getUGI().hasKerberosCredentials() ||
user.getUGI().getRealUser().hasKerberosCredentials()) {
final UserGroupInformation currentUser = user.getUGI();
// May be null if Hadoop AuthenticationMethod is PROXY
final UserGroupInformation realUser = currentUser.getRealUser();
if (currentUser.hasKerberosCredentials() ||
(realUser != null && realUser.hasKerberosCredentials())) {
return new Pair<>(krbAuth, null);
}
// This indicates that a client is requesting some authentication mechanism which the servers
Expand Down
1 change: 1 addition & 0 deletions hbase-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -543,3 +543,4 @@
</profile>
</profiles>
</project>
<!-- trigger ut -->
1 change: 1 addition & 0 deletions hbase-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -897,3 +897,4 @@
</profile>
</profiles>
</project>
<!-- trigger ut -->
1 change: 1 addition & 0 deletions hbase-thrift/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -600,3 +600,4 @@
</profile>
</profiles>
</project>
<!-- trigger ut -->