[Nagiosplug-devel] RFC: Plugins config file (final proposal)

Gavin Carr gavin at openfusion.com.au
Tue Jan 30 00:06:27 CET 2007


Hi Ton,

On Mon, Jan 29, 2007 at 09:45:48AM +0000, Ton Voon wrote:
> I'm trying to wrap up this RFC from October last year (http:// 
> thread.gmane.org/gmane.network.nagios.plugins.devel/4199) so that we  
> can have some text written in the developer-guidelines before  
> starting work on implementing it.
> 
> This is a summary of the thread on it. I think I have all the angles  
> covered, but please let me know if not.
> 
> 
> PROBLEM
> 
> There are security issues with passing user authentication  
> information into some plugins via the command line. We would like the  
> use of configuration files, secured at the file level, allowing  
> configuration variables on a per-plugin basis.
> 
> 
> PROPOSED SOLUTION
> 
> A new option is allowed: --extra-opts. The idea is this option is  
> "replaced" with configuration options within a configuration file.

I made a first-pass at this back in November in perl, and the main piece 
that was tricky was the in-place replacement that you seemed to be keen 
on i.e.

[plugin]
username=bar

  --username=foo --extra-opts=plugin

mapping to '--username=foo --username=bar'.

I just wonder if anyone is going to need to do this in practice? Mostly
it seems to me that, if anything, we'd just want to override config file
parameters i.e.

  --extra-opts=plugin --username=foo

but not
  
  --username=foo --extra-opts=plugin

(if they're additive, of course, it doesn't make a difference).

So what do you think about saying instead: --extra-opts arguments always 
precede explicit arguments i.e.

  --username=foo --extra-opts=plugin

is in effect:

  --extra-opts=plugin --username=foo

?


Cheers,
Gavin





More information about the Devel mailing list