1

I am developing a web-app, currently the application is being developed in both NodeJs and in ASP Net. We are structuring the application in micro-services. Lets say we have a service that calls some functions in a dll and we have the possibility to choose which dll to call the functions from, but the client wants to make that dynamic, so he can upload a .dll in the front-end and then the application must transfer that to a directory which the micro-service scans and add that new .dll to the list of dlls of which we can use, the dlls have the same Interface so the only thing we change is the .dll we choose.

I have some doubts about whether this is a good idea regarding security and some implementations problems such as the downtime.

Specifically that micro service is the center of the application, and the functions that are run take several seconds or even minutes to complete, so we are going to implement a task scheduler that receives a new task from a specific user, and then executes the given function from the dll and returns the result.

4
  • What benefits, if any, are there to allowing uncontrolled computers to upload executable code and run it on your production server(s) without going through QA first? May 29, 2018 at 19:38
  • 1
    Sounds like a security and stability nightmare to me. May 29, 2018 at 19:49
  • 3
    Sigh. Downvotes aren't for marking bad ideas, they are for bad questions. May 29, 2018 at 20:50
  • @DanPichelman it seems obvious to me that the benefits are increased flexibility. although I would heavily recommend against, there are clear and obvious benefits.
    – emory
    May 29, 2018 at 21:18

2 Answers 2

4

This is not a good idea at all. The entire point of software security is to prevent arbitrary code execution.

Allowing someone to upload arbitrary code which you then run is obviously and unavoidably counter to that. Do you want your services hosting kiddie porn? Hacking government systems? Stealing every credit card that comes close to your system?

How much do you really trust that client?

2

It can be a good idea. Isn't this essentially what cloud providers like AWS, Azure, and GCE are doing?

However, I think those guys are tightly containing the executable code, probably much tighter than you could.

If the client means the person paying for the project and they own the server computers and they control the users (e.g., users are employees) it is probably still a very bad idea, but it is their money so why not just give them what they want.

In most other situations, like for example you own the servers and you can not guarantee the executable code is tightly contained then I would recommend flatly refusing the request.

HINT: If you are asking questions like this on stack exchange then you can not guarantee the executable code is tightly contained.

2
  • Cloud providers have several safeguards in place, and the client is assumed to be a development team. May 29, 2018 at 19:50
  • @RobertHarvey I heavily agree with the first point, but any half-wit can get an AWS account. Cloud providers should assume that many of their users are malicious and/or incompetent.
    – emory
    May 29, 2018 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.