New GBrowse feature design - "injecting" a trusted configuration file into a 3rd party feature file

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

New GBrowse feature design - "injecting" a trusted configuration file into a 3rd party feature file

Vladimir Gritsenko
Hello all,

I’ve recently hit upon an issue which required writing Perl code in the configuration section of a track file. However, the track files I’m generating are external to the GBrowse I need to integrate with, and thus the Perl code can’t run. The solution I propose is to allow an external file to specify a configuration file on the server that is trusted (as it is on the server and thus vetted by the server admin), and can allow running Perl code in the external files. This is the first time I’m working on GBrowse (or Perl), so I want to run my proposal by the development mailing list, see if I’m missing something.

Two configuration fields should be added:
server_config_file - the file in /etc/gbrowse2 which will be “injected” into the feature file.
server_config_section - since a feature file may have more than one configuration section, the server configuration file may itself have a number of configuration sections. This field will select the relevant section to inject from the server configuration file.

The proposed changes to FeatureFile.pm:
External files are obviously created with safe=false (or undefined, which evaluates to false anyway), thus not executing any code from the configuration. However, if the server_config fields are specified, they will be parsed and will override previously defined configuration values. These (and only these) values will be marked as safe (probably a separate “safe” set of values will be kept separately). Every access to a setting will check if that particular setting is safe. If no, it will proceed as normal (not execute any code). If it is safe, the code will be executed.

Please tell me what you think,
Thank you!
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Gmod-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-devel