[ 
https://issues.apache.org/jira/browse/OOZIE-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790658#comment-13790658
 ] 

Alejandro Abdelnur commented on OOZIE-1460:
-------------------------------------------

The following is already before the patch, the patch just moves it.

{code}
+                        FileOutputStream fos = new FileOutputStream(tempFile);
+                        IOUtils.copyStream(is, fos);
+                        is.close();
+                        fos.close();
+                        reader = new BufferedReader(new FileReader(tempFile));
{code}

Still, why do we need to copy it locally? why not just returning a {{new 
BufferedReader(new InputStreamReader(conn.getInputStream()))}}


The getConnection() method seems to be redoing much of the stuff the 
AuthenticatedURL does. The AuthenticatedURL should work without security. We 
should just use the AuthenticatedURL:

{code}
AuthenticatedURL.Token token = new AuthenticatedURL.Token();
Authenticator authenticator = getAuthenticator();
HttpURLConnection conn = new 
AuthenticatedURL(authenticator).openConnection(url, token);
{code}


> Implement and Document security for HA
> --------------------------------------
>
>                 Key: OOZIE-1460
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1460
>             Project: Oozie
>          Issue Type: Improvement
>          Components: HA
>    Affects Versions: trunk
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>         Attachments: OOZIE-1460.patch
>
>
> Implement and document anything that needs to be done to add support for 
> security (i.e. kerberos) for High Availability.  



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to