Skip to content

Commit

Permalink
ZEPPELIN-3357. Livy security mode is broken
Browse files Browse the repository at this point in the history
Straightforward fix for livy security issue.

[Bug Fix]

* [ ] - Task

* https://issues.apache.org/jira/browse/ZEPPELIN-3357

* CI pass

* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zjffdu@apache.org>

Closes apache#2887 from zjffdu/ZEPPELIN-3357 and squashes the following commits:

2fbbbeb [Jeff Zhang] ZEPPELIN-3357. Livy security mode is broken

(cherry picked from commit db716c8)
Signed-off-by: Jeff Zhang <zjffdu@apache.org>
(cherry picked from commit f5e56f1)

Change-Id: I061a6dcac221f550d33cf56716c7beb39cde398b
  • Loading branch information
zjffdu committed Mar 22, 2018
1 parent 6aff512 commit 3a0a97b
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -662,11 +662,12 @@ public Principal getUserPrincipal() {
} else {
restTemplate = new KerberosRestTemplate(keytabLocation, principal, httpClient);
}
}
if (httpClient == null) {
restTemplate = new RestTemplate();
} else {
restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient));
if (httpClient == null) {
restTemplate = new RestTemplate();
} else {
restTemplate = new RestTemplate(new HttpComponentsClientHttpRequestFactory(httpClient));
}
}
restTemplate.getMessageConverters().add(0,
new StringHttpMessageConverter(Charset.forName("UTF-8")));
Expand Down

0 comments on commit 3a0a97b

Please sign in to comment.