This is a test version of Biostars. For the public version, visit https://www.biostars.org.
temporary JSON file for visualisation plugin - where to save?

In my web visualisation plugin, from mako file I call web api and from there I generate 3 JSON files(by executing a java library) for visualisation in my web visualisation plugin. For the time being, i have saved them in the same directory of the plugin.(eg: galaxy/config/plugins/visualizations/mypluginname/static/data). Currently this is working since I am the only user. but how or where should i save these temporary files that the logged in user can access, but not others can access them?

json visualisation temporary files

1 answer

You can generate random filenames every time. That way, only the right user knows which files are theirs.

Technically, this isn't fully secure, since you can brute-force discover the files, but if the random part is sufficiently long, it's essentially impossible in a reasonable timeframe.

Log in to answer this question.