YARN-9334. Allow YARN Service client to send SPNEGO challenge header when authentication type is not simple.
Contributed by Billie Rinaldi
This commit is contained in:
parent
ea3cdc60b3
commit
04b228e43b
@ -226,11 +226,10 @@ private Builder getApiClient() throws IOException {
|
||||
private Builder getApiClient(String requestPath)
|
||||
throws IOException {
|
||||
Client client = Client.create(getClientConfig());
|
||||
Configuration conf = getConfig();
|
||||
client.setChunkedEncodingSize(null);
|
||||
Builder builder = client
|
||||
.resource(requestPath).type(MediaType.APPLICATION_JSON);
|
||||
if (conf.get("hadoop.http.authentication.type").equals("kerberos")) {
|
||||
if (UserGroupInformation.isSecurityEnabled()) {
|
||||
try {
|
||||
URI url = new URI(requestPath);
|
||||
String challenge = YarnClientUtils.generateToken(url.getHost());
|
||||
|
Loading…
Reference in New Issue
Block a user