Skip to content

Commit

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

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3357

### How should this be tested?
* CI pass

### Screenshots (if appropriate)

### Questions:
* 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
  • Loading branch information
zjffdu committed Mar 22, 2018
1 parent 67582b8 commit db716c8
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")));
return restTemplate;
Expand Down

0 comments on commit db716c8

Please sign in to comment.