News for hackers. Stuff that matters.
Re:Riemann – A network monitoring system by falcolas on Tuesday January 19, 2016 @10:38AM (#10931402)
The problem with configs (and this is with my operations hat on), is that they are rarely as well secured (or reviewed) as regular code, so code based configuration files pose a significant privilege escalation threat on production servers.

With my programmer's hat on, they're also harder to populate programmatically, so I have a hard time justifying their use.

Re:Riemann – A network monitoring system by lmm on Tuesday January 19, 2016 @10:56AM (#10931500)
> The problem with configs (and this is with my operations hat on), is that they are rarely as well secured (or reviewed) as regular code, so code based configuration files pose a significant privilege escalation threat on production servers.

Any complex config file runs that kind of risk though, whether it's in a well-known programming language or an ad-hoc DSL. My preferred approach is to include most of the config in the regular code (subject to the normal review/release process), with the only thing on the server being a one-line "which config to use" setting (e.g. dev/stag/prod). Of course that has its own problems.

> With my programmer's hat on, they're also harder to populate programmatically, so I have a hard time justifying their use.

Not at all true in the case of Clojure - it's just S-expressions, very easy to write, parse or modify programatically. I agree that a config structure should have good programmatic access, but to my mind that's an argument for using a language with a good metamodel rather than anything else.

Re:Riemann – A network monitoring system by falcolas on Tuesday January 19, 2016 @11:06AM (#10931565)
> Any complex config file runs that kind of risk though, whether it's in a well-known programming language or an ad-hoc DSL.

The major difference is that Clojure (Python, Lua, Perl, et al) gives you all the tools right out of the box, whereas with a DSL you should be severely restricted from doing things like reading/writing to disk, making network calls, or executing other binaries.

Granted, there are possibly ways to break out of the sandbox, but it's the difference between giving the thief a set of master keys and $50 for a U-Haul and making them work to enter every safe you have on the premises.

/me takes off the tinfoil hat

Re:Riemann – A network monitoring system by lmm on Tuesday January 19, 2016 @12:14PM (#10932099)
That sounds like a security-through-obscurity approach to me. (No doubt others would call it defense in depth).
Re:Riemann – A network monitoring system by jsmthrowaway on Tuesday January 19, 2016 @12:30PM (#10932231)
How is "don't give a config file an arbitrary writable open() call" security by obscurity? What is being hidden? That's not really how that term works. I also don't understand your invocation of defense in depth or the (wrong) comparison you are trying to make. Can you reframe your rebuttal without loaded security terms that don't fit what you're saying?

The point GP is making, and with which I agree, is that executable configurations can be dangerous if not sandboxed and even then still carry an elevated risk versus a parser. We are speaking relatively; it is absolutely still a risk to parse user input as a config, but less so than a full programming environment being immediately available to a malicious config writer.

Stepping back and identifying the malicious vector is worth it here, though, as there's a case to be made that configurations are the domain of administrators and should be secured accordingly via external means. Then the problem is recentered.

Re:Riemann – A network monitoring system by xorcist on Tuesday January 19, 2016 @01:19PM (#10932639)
If it's code, the only way to evaluate it is to run it. That makes it very hard to reason about at scale. ("Which URLs go to load balancer x with SSL".) Not a great idea, in my opinion.