ThomasJSmart
Programmer
- Sep 16, 2002
- 634
Has anyone worked on something like this before?
We have a closed web application coded in php/javascript, the usual. This application supports plugins to provide different features in the front-end. Kind of like widgets I guess.
We want to open this up to users so they can add plugins for their own interface. Plugins should support php/javascript. Ideally we would allow them to do this directly without us needing to check everything. but is there any secure way of doing this??
1. user submits code, we check it and add it, user tests, sends an update and the cycle starts again. secure sure, but very inefficient and takes up a lot of our time.
2. we provide some sdk/testing environment so they can build and test their plugin in an environment similar to the live application then they submit it, we check it and add to system. Still secure as the live application isnt at risk but we would need to maintain a separate testing environment and there is the chance they break the testing environment for other users.
3. (ideal but possible??) sandbox the user's web application account somehow. limit what functionality they can call with their plugin and lock it down. This way they can just upload their plugins, self test and any issues would be only within their own account and they would only be able to access their own data.
3b. item 3 might be easier possible if we didnt allow php but only some scripting language that we add. so user's plugin would have to use this safe/limited scripting language to interact with a backend api instead of direct with php. are there existing script classes/apis that can provide something like this?
Thanks!
Thomas
site | / blog |
We have a closed web application coded in php/javascript, the usual. This application supports plugins to provide different features in the front-end. Kind of like widgets I guess.
We want to open this up to users so they can add plugins for their own interface. Plugins should support php/javascript. Ideally we would allow them to do this directly without us needing to check everything. but is there any secure way of doing this??
1. user submits code, we check it and add it, user tests, sends an update and the cycle starts again. secure sure, but very inefficient and takes up a lot of our time.
2. we provide some sdk/testing environment so they can build and test their plugin in an environment similar to the live application then they submit it, we check it and add to system. Still secure as the live application isnt at risk but we would need to maintain a separate testing environment and there is the chance they break the testing environment for other users.
3. (ideal but possible??) sandbox the user's web application account somehow. limit what functionality they can call with their plugin and lock it down. This way they can just upload their plugins, self test and any issues would be only within their own account and they would only be able to access their own data.
3b. item 3 might be easier possible if we didnt allow php but only some scripting language that we add. so user's plugin would have to use this safe/limited scripting language to interact with a backend api instead of direct with php. are there existing script classes/apis that can provide something like this?
Thanks!
Thomas
site | / blog |