user3482876
user3482876

Reputation: 249

Simple server-side response to wget request with password

My organization maintains a front-end server with back-end compute nodes. Is the following possible (or a good way to do this)?

I understand the question is somewhat vague, but we are unsure how to most quickly implement the above feature. We are anticipating receiving at most 1-2 requests per day, and not at the same time.

Upvotes: 0

Views: 184

Answers (1)

Leo K
Leo K

Reputation: 5354

Yes, it is possible.

It is a 'good way of doing it' on the condition that the script simply produces output data and makes no changes to the server (or the backends), other than some log entries, cache, etc. (stuff that has no visible effect on operation).

You should use https:// and not http:// if this is visible on the public network (to keep the passwords and returned data safe).

You can include the input parameters in any shape and form you want in the URL, but unless you have a special reason not to use an HTTP query, this form is probably best:

wget "https://address/script.php?arg1name=arg1value&arg2name=value2..."

How to implement it quickly: depends what your server setup is. If it has PHP, that's quick and easy enough. Using plain old CGI (with a Python or a shell script) is also an option, nearly all HTTP servers support it.

Upvotes: 1

Related Questions