Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Attachments via SFTP (and other methods) - drop-in solution (almost) available

Highlighted
Radovan Skolnik
Honored Contributor

Attachments via SFTP (and other methods) - drop-in solution (almost) available

Hi!

In some spare time I have been developing a drop-in replacement of libftp.jar that would allow storing/retrieving attachments from alternative sources than FTP. First attempt is almost ready and it is SFTP (that is FTP over SSH) with user/password authentication. I'm planning to add the possibility to use the key authentication. Much further plans would be FTPS (FTP over SSL), CIFS/SMB (that is the protocol used by Windows shares) and NFS.

The thing is configured from SD's admin consolde as standard attachments, the fields just will have different meaning (will be described in docs).

I'm heading for the first demo release of the SFTP with username/password authentication for SD 4.5. I have few questions regarding this:

1. Would you be interested in such functionality?
2. If so, which one specifically? You can propose something I did not mention as well.
3. Which SD version is more interesting for you? I mean versions will be available for both SD 4.5 and SD 5.0
4. Would you be willing to pay for this? How much approximately? Few things come for free ;-)

Thank you very much.
12 REPLIES
Vasily Kamenev
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Hi Rodovan.
I use 4.5 and have interest for testing your lib. Is it possible?

Vassili
Radovan Skolnik
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Vasili,

it's not 100% ready - I need few more days to polish it a bit (on the beginning of the next week I hope I'll upload demo here). In the meantime I'd welcome answers to the questions above ;-)

Best regards

Radovan

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Hi Rodovan,

i have a customer asking for the SFTP:
So I am quite interested in this part.

rgrds

L
we have been where you wanna go..
Ryan Jenkins
Regular Collector

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

As FTP is currently blocked within our environment (due to security) we would be quite interested in the sFTP solution. We're currently running 4.5 SP13 and looking to go to 5.1 when available. I couldn't answer your pricing question as I'm not the one to make the decisions, but I believe we would be willing to pay a fair price.
Radovan Skolnik
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

OK guys. I'll hurry up finishing the first version so that you can try. In the meantime - are there any other requirements for storage? Like CIFS/SMB or NFS or ... ???
Radovan Skolnik
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Well guys the first version is here. Contains both usernam/password as well as public key authentication. Go here: http://www.skolnik.info/sdutils/sftp/readme.html or read the announcement here: http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1024482
Radovan Skolnik
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Have you guys tried it? Can you provide any feedback on it? Any problems seting up? Any suggestions?
Boulbes
Acclaimed Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Hi Radovan! hi guys!

I would like to use the sftp lib for our OVSD environment, but i need it only for the web pages (Integration in WEB-API) and I would like to keep FTP Transfert on the client side. Is such a thing possible ? And if it is, how ?

I am currently working with SD v4.5 and service pack 17.

I really need to solve this problem in order to save our project and I will be therefore really thanksfull if you can provide me any kind of Infos.

Thanks very much in advance.

Radovan Skolnik
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Hi!

My library aims mainly for SD client (it supports 4.5 both old client and 2008 version as well 5.x).

What you need is possible. You just need to make the attachment directory available through SSH and use any SSH library supporting SFTP (or SCP if you wanted) to get the attachments usual way (i.e. calculate the complete path to it from its OID). That is for downloading. For uploading you need to get the file being attached to the SD server(!) filesystem and then call WEB-API to actually attach it. The server will then upload it through FTP to appropriate attachment directory.


Hope this helps.

Radovan
Boulbes
Acclaimed Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Hi Radovan!

Thank you very much for your answer! It looks very fine for downloading through SFTP and it seems not to be the main issue.

The problem I´m facing is actually to upload files (from service pages) to service desk server through SFTP (and not FTP). (for certain security reason, I can´t use FTP transfer).

In the description of your libary I found : "You can put it into lib directory of the server as well but it is only used there if you use WEB-API for working with attachments." It looks like this could solve my problem but then how can I configure SD server (or tomcat ?) to specify the sftp server adress, user, pwd etc... in order to force service pages (and ONLY service pages!) to use the sftp server.

PS: for SD Client, I must keep on using a FTP server.

I hope you can identify my request. It would be great, if you can help me further!

Thanks a lot in advance.
Radovan Skolnik
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Boulbes,

you cannot easily achieve this. The problem here is that upload of attachment via WEB-API (that's what ServicePages use) is 2 step process:

1) You need to upload the attachment from Service Pages host to HPOVSD server host (unless it is the same host). This can be done any method you want - SD does not handle this.

2) HPOVSD server takes the file from its filesystem and uses available library to upload it to attachment server. The settings (FTP host, directory) and credentials (username and password) are taken from SD settings (Attachment settings in Administrator console).

Usually the library is original libftp.jar from HP that implements FTP protocol. What I provide is library with same interface but that goes over SSH/SFTP. It also takes settings from Attachment settings - that's why it's hard to support different method for clients and different method for WEB-API - they both use the same settings.

Now it could be possible to achieve what you need under the following conditions:

1) You will be able to configure the same username/password combination for SSH as you have for FTP. Also you will need to be able to setup SSH user to have the same home directory as FTP user. Both these steps are required so that the same configuration from Attachments settings can be used for both libraries (original FTP on clients and modified one on SD server).

2) I will create a special build for you that accepts hostname in form it is originally done in SD. In my library I did it the way that sftp:// precedes the actual hostname/IP address (if not changed this would cause problems to clients going over FTP).

3) you would be willing to buy license for it ;-)

This is becoming pretty specific and out of the scope of this thread. If you want to discuss this, please contact me at radovan@skolnik.info
Radovan Skolnik
Honored Contributor

Re: Attachments via SFTP (and other methods) - drop-in solution (almost) available

Now I have read your post again. You're more concerned about first step of the 2-step process. That can be done with any SSH/SFTP/SCP java library. There are few that are free. You just need to have SSH server running on SD server host so that you will be able to upload files there.

What I wrote was about how to achieve SFTP from SD to Attachment server ;-)
//Add this to "OnDomLoad" event