mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Exported AuthenticationService via RMI. Insecure for now but we can switch over
to using SSL when needed. Restructured exports of AVM specific apis to authenticate remotely and pass the ticket with each remote service call. These required some changes to jndi-client and even to the web-client which uses the AVM remote interface within the Alfresco server. Oh, the point of this is that since I'm writing some CLTs, I might as well do them correctly; we'll need the option of security sooner rather than later. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4489 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,9 +19,11 @@ package org.alfresco.repo.avm;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
import org.alfresco.repo.avm.clt.ClientTicketHolder;
|
||||
|
||||
public class AVMRemoteOutputStream extends OutputStream
|
||||
{
|
||||
private AVMRemote fAVMRemote;
|
||||
private AVMRemoteTransport fAVMRemote;
|
||||
|
||||
private String fHandle;
|
||||
|
||||
@@ -30,7 +32,7 @@ public class AVMRemoteOutputStream extends OutputStream
|
||||
* @param handle The handle returned from an AVMRemote call.
|
||||
* @param remote The AVMRemote instance.
|
||||
*/
|
||||
public AVMRemoteOutputStream(String handle, AVMRemote remote)
|
||||
public AVMRemoteOutputStream(String handle, AVMRemoteTransport remote)
|
||||
{
|
||||
fAVMRemote = remote;
|
||||
fHandle = handle;
|
||||
@@ -58,7 +60,7 @@ public class AVMRemoteOutputStream extends OutputStream
|
||||
{
|
||||
try
|
||||
{
|
||||
fAVMRemote.closeOutputHandle(fHandle);
|
||||
fAVMRemote.closeOutputHandle(ClientTicketHolder.GetTicket(), fHandle);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -80,13 +82,13 @@ public class AVMRemoteOutputStream extends OutputStream
|
||||
{
|
||||
if (off == 0)
|
||||
{
|
||||
fAVMRemote.writeOutput(fHandle, b, len);
|
||||
fAVMRemote.writeOutput(ClientTicketHolder.GetTicket(), fHandle, b, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
byte [] buff = new byte[len];
|
||||
System.arraycopy(b, off, buff, 0, len);
|
||||
fAVMRemote.writeOutput(fHandle, buff, len);
|
||||
fAVMRemote.writeOutput(ClientTicketHolder.GetTicket(), fHandle, buff, len);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
Reference in New Issue
Block a user