FTPS in Spring or Applet - spring

I have a requirement to provide Secure-File-Upload file feature as a new service in my existing application. Expected Upload file size would be huge like over 100MB. If I do plugin-in such feature into my application it will surely die.
At the same time I need to provide or launch that service only through my current application, anyhow I need to achieve it without affecting my current application at any cost.
I am thinking of two solutions in mind, request others advise
Develop a small file uploader web app, host it in a seperate web/app severs,
launch it from my current application through some link. (I can not ask user to login into another new url)
Render an Applet to achieve secure file transfer service (in this point I am not clear whether the applet can directly talk to SFTP server without hindering
my current app's server components)
Further, I am referring to Spring Integration docs with FTP server.
I wonder Can a spring controller receive stream from client via FTPS connection and immediately transfer to FTP server without having to store it in local file.
Please advise your views.
Thanks&Regards,
Sabari

Related

Web Application Servers Infrastructure and Configuration (to Display and Stream Media with laravel & Nginx)

I have questions about the infrastructure, and configuration of servers in a particular web application (to display and stream media). I am new to this field and my question may be simple. I would be grateful if you could guide me.
The web application I am considering is an interactive website where users upload their media such as images, videos and audio.
I have two servers, One of them has the web application (based on Laravel and MySQL) and User-uploaded files are stored on another server (by FTP).
Server 1: Web Application
Server 2: FTP server for storing media
Server 3: Database Server
Now my questions include several sections:
How to display files stored in FTP Server to users and how to link (URL of Media) to them within the laravel project.
I know that we can stream videos and audio by making some configurations in Nginx (Based on this Link). Now in my scenario that the files are stored on another server, how should this be done (Especially with video.js)? Should all HTTP requests be sent to the web application server and a decision made based on the path? For example, redirecting requests.
In which server should Streaming or HLS settings be made? Should Nginx be installed on both servers? Do I need a Reverse Proxy to do this?
In general, is the infrastructure and scenario provided a suitable solution? Or is there a better infrastructure?
In most of the references I saw, they have not considered the situation in which there are different servers. Is there a reference for such a situation that I should read?
Thank You

Automatically publish internal web application

I have written a web application that is, typically, installed internally by customers (based on IIS/MSSQL server).
When a customer wants to provide external access to the application, we offer the following supported scenarios:
Publish the application in their DMZ (pretty standard deployment).
Use our own platform where we host the application in our own cloud infrastructure for them.
However, because I have more and more customers who misunderstand the requirements for publishing an internal application, I would like to add a "one click" way of providing that service.
My idea is to have a reverse proxy installed on the customer's web server that will connect to a cloud server we control. When the application starts, it will connect to our server, authenticate and maintain the connection. When a user wants to use the application, she will use an URL that directs it to our server (say https://myapp.mycompany.org/CustomerID or https://CustomerID.myapp.mycompany.org). The server will then lookup the list of connections from reverse proxy to find the one matching the customer ID and, if found, use that connection to relay the end user connection.
In essence, that is the same thing as what Azure Application proxy or TeamViewer do, only without the need for using Azure AD or TeamViewer.
Is there an existing framework I can use for building such a service ? I know I can write it on my own but that is quite a large development.

Can my application server find out which Java hosting provider it lives in?

I'd like to have my Scala application server find out if it's running inside Heroku or CloudBees or Cloud Foundry or something else. Is there some standard way of finding out which Java hosting provider is currently in use? (if any)
Perhaps the hosting provider's firewall/load-balancer/whatever adds some standard HTTP header that the app server could check? Or perhaps it's possible to do hosting provider specific checks somehow, for the most popular hosting providers?
Background: The app server could then show helpful tips to the server admin that tells him/her how to view the server's log files. This would be useful during the initial setup of the server + database, because then the admin needs to find a certain magic password in the log file, which s/he then uses to get access to the admin interface web pages the very first time (before any admin user exists in the database, see this security question). — The installation would be more user-friendly, if the server could tell the admin exactly how to view the log files (which varies from hosting provider to hosting provider).
In the case of cloudbees there are several ways, none of which are guaranteed to be future proof (given changing containers).
Perhaps what is needed is a standard environment variable to make this doable.

how to create a session with a proxy server

I have the following problem. I have an application (3rd party) that needs to connect to API via a proxy to request various data again and again. The application has a configuration section where the necessary details can be entered (the app then stores them in a config.ini file). However, one client doesn't like the proxy user/password to be stored in config files;
As I don't have access to the application's code, the simplest solution I can think of is something along the lines of a tunnel, i.e. write a simple app/script that would open a connection to the proxy, prompts the user for the username/password and then keep the connection open so that the application can access the proxy without needing username/password everytime. Is something like this possible? I mean I don't to create sort of full blown proxy that would sit between the app and the real proxy server, all I really want is something like a session so that once the IP is authorized to get through the proxy, the consequent requests go through as well.
I'd appreciate help and/or any suggestions for an alternate solution
p.s. the app is win32 only so the solution is for win32 only as well (ie no cygwin, etc.)
Thank you
Proxy credential caching typically works on a per-process basis, not a per-machine basis. So, having Application A make a request through the proxy rarely allows Application B to make a request without getting challenged.
If you can change the application's code, make a single request through the proxy using the desired credentials; e.g. make a HEAD request for your server's homepage. Most HTTP stacks (e.g. WinINET) will cache the proxy credentials for the life of the process.

Online server for desktop app - implement as web-server or custom socket application?

A bit of a generic question but let's say you have a desktop app that allows a user to connect to a central server and provides functionality like:
Login
Ability to auto-download profile data on login
Download and uploading save files through the app
A web-server (JSP/ASP.NET/PHP/etc) would do lots of work for you especially on the request-serving and threading front, but it seems a bit of a cheat for a desktop app to use HTTP requests like this.
All thoughts welcome. Maybe this should be community wiki?
If you want to leave things open for other possibilities in the future, go with a web server. That way, if you decide to write a web-based version of your desktop app (or an iPhone/Pre/Android application), you don't have to rewrite your socket server. Almost everything can speak HTTP these days.

Resources