Apache Ant FTP connection over TLS - ant

How to connect to FTP over TLS in Apache Ant? Ftp task doesn't seem to support this. Are there some other tasks for FTP over TLS?

FTPS has not been widely accepted by the industry. SFTP (part of SSH) is preferred. FTPS suffers the same limitations as FTP and introduces a new one: Firewall Incompatibilty.
This is very likley why the ftp task doesn't support it. As Martin Clayton suggests scp will do the trick.

Related

Jenkins client certificate authentication

You could use Apache with Jenkins to use client certificates for authentication, but is there a less bulky way that is just as simple on Windows or RHEL? Perhaps, customizing the Jenkins code is an option, since it says it already runs in a Jetty servlet? A way to do this in Hudson itself?
With Apache Web Server, I was fighting with some plugins, like Selenium related plugins. Also, I noticed more issues connecting to slaves when using a proxy despite using the tunnel option. Leaner and meaner would be nice.

How hard is it to enable TFS to use SSL?

How hard is it to enable TFS to start using secure connections, if its not already? Does doing so affect SQL configuration also? How can we force SSL to be required?
Im looking over this reference material
https://msdn.microsoft.com/en-us/library/aa833872%28v=vs.120%29.aspx#DisAd
Reading the above, I get the impression that MS is trying to discourage someone from using SSL for TFS over the internet?
Then I stumbled on to this blocg post
http://www.jwsecure.com/2009/01/29/using-tfs-via-the-internet/
Summary = just get a ssl cert and force ssl and port-forward a high port to 443
thoughts?
Firstly, the MSDN article you posted above shows you the detailed steps on how to set up HTTPS with SSL for TFS. To summarize main steps include:
Install a certification authority, obtain and install a server certificate for servers.
Request, install and configure websites with a certificate for Team Foundation Server using Internet Information Services (IIS) Manager.
Configure Team Foundation Server to require HTTPS and SSL.
Install the certificate on client computers.
You can also check this walkthrough: https://msdn.microsoft.com/en-us/library/aa833873.aspx
Secondly, you don't need to configure SQL Server. But if you have SQL Reporting Service, you need to configure it to support HTTPS with SSL.
Thirdly, to enable TFS to be available with external connections, you need to configure it with HTTPS with SSL. Also with it, web connections to TFS are more secure. However, these process needs more administrator's configuration & maintenance work. So you need to determine whether to use it based on your requirement.

How to configure P4Ant Tasks to use ssl port

We use a few P4Ant tasks to commit code to our perforce depots from within an Ant task. This has been working fine for months, however we recently changed our perforce server to only accept trusted/ssl connections.
As such, our new P4 port now looks like ssl:server_hostname:port and we’re getting an error when running our Ant task: non-numeric Perforce server port specifier: p4java://ssl:server_hostname:port .
From the P4Java api (which P4Ant uses under the hood), it seems that the connection should have looked like: p4javassl://server_hostname:port
Does the P4Ant library support SSL perforce ports? If so, how can I configure it to pass this port properly to p4java.
Regarding P4Ant and SSL, not as downloaded because it is bundled with a pre-2012.1 P4Java version. SSL support was added for P4Java versions 2012.1 and forward as noted in the release notes:
http://www.perforce.com/perforce/doc.current/user/p4javanotes.txt
It should work by using (replacing) the p4java.jar with the latest version.
See the following Knowledge Base article:
http://answers.perforce.com/articles/KB_Article/P4Ant--SSL-p4d
Also, you can check this article regarding your java installation in case you may also need the following:
http://answers.perforce.com/articles/KB_Article/Using-P4Java-and-P4Eclipse-with-SSL-enabled-Perforce-Servers

Running an LDAP Server on Cloudbees

I have a simple Grails app that I've written to authenticate against an LDAP server. To develop it, I've installed ApacheDS locally and populated it with an LDIF file. Now I want to deploy it to CloudBees. Is it possible to install an LDAP server on CloudBees?
If not, an alternative seems to be to use the Grails ldap-server plugin. However, it doesn't have any documentation on how to configure it. How do I configure this plugin to load an LDIF on startup?
Unfortunately, running LDAP in a CloudBees app container/stack won't work because in-bound routing to your application port must be over HTTP/HTTPS.
Alternative 1: host the LDAP server outside of CloudBees (like on your own EC2 server)
Alternative 2: [for the highly motivated] you might be able to get a WebSocket gateway of some kind to work, but you'd special code on the client and server side to negotiate the socket stream hand-off outside of the LDAP server and client. [Client -> WS-Client --> CloudBees --> WS-Server --> LDAP Server]
gripe: why can't all protocols support virtual hosting like HTTP? -- that would make them much more Cloud-friendly :(

copy file from unix system to windows using ant

can any one help me
how to copy file from unix Windoes system to windows UNIX using ant?
Thanks in advance
EDIT
Let me explain in detail what I am looking for I want to copy file from windows to unix machine (correcting my previous question not from unix to windows) using ANT. I thought of using ftp task.
Before that as a check I tried to ftp unix sever from windows but it gave connection refused error(Do I need to provide my username and password,if that is the case what is the syntax).
But I am able to connect through putty which asks for my user name and password. Does putty uses a different protocol.
So if that is the case does ftp task works for me in ANT?. If not what task I need to use?
You have a couple of options.
If you have a windows shared drive mounted on your windows you can simply use the task.
<copy>
http://ant.apache.org/manual/Tasks/copy.html
If you don't you'll need to set up some service in the Windows side, probably FTP, if that's the case you'll need to use the task:
<ftp>
http://ant.apache.org/manual/Tasks/ftp.html
EDIT
As per your comment, this is all you need:
http://ant.apache.org/manual/Tasks/ftp.html
Take a look at your server ( UNIX ) FTP configuration, compare it with the one you're using in putty.
The protocol should be the same, but unless you give us your FTP server IP + User/Password we won't be able to test it for you.
The link I posted has the needed configuration and examples on how to connect to an UNIX server using FTP. Just, try it.
Probably the simplest option (if you are going from Windows -> Unix) is the Ant SCP task (which will use the same underlying type of connection PuTTY uses -- SSH). See the Ant SCP Task for details. Note that this will require that you have JSch here.
ant scp task can be set up to use passwordless ssh if you set it up with an appropriate key file.
So first make sure you can ssh to the windos server without putting your password into the shell. here is a good set of tutorial for doing it unix to unix http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html . Haven't tried setting up a windows machine, so not too sure how that would work though.
<scp file="file.zip" dir="${userid}#${server}:${remotedir}" keyfile="${env.HOME}/.ssh/id_rsa" passphrase=""/>

Resources