-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: aux_path parameter #3181
Comments
IMO Varnish can and should provide the tools that allow admins to decide how they can restrict the worker process and also provide access to the file system. For example, |
What should But if this is hidden behind the VRT curtain, can't we make it update-able via the CLI? The master already forwards CLI commands to the child, we can maybe have a syntax for "private" commands that would never be forwarded?
The manager could know NOT to forward such a command (starting with
But it could then use it internally: mgt_private_askchild(cli, "@aux_path %s", aux_path); With the appropriate Then we need to figure how to make this update-proof, but if this is hidden behind VRT it should be possible to come up with something safe.
I have been thinking about this for a while, I think we should also fix the default -$PREFIX/etc/varnish:$PREFIX/share/varnish/vcl
+$PREFIX/etc/varnish/vcl:$PREFIX/share/varnish/vcl The reason being that The moment we do this there will be an outcry for the dearly beloved I know you will consider this off topic, but I want to make sure to bring this up here if we add a new path with a default value in |
Should this feature be implemented within the vmod? Or maybe make a way for vmods to define params? Making a core feature for a 3rd party vmod seems like we are glazing over a real need. |
@rezan my question is if such a parameter would be considered generally useful - if there is any demand for it. If by saying for a 3rd party vmod you imply that you do not consider it generally useful, I am happy to take this as your -1 vote. But there would be at least @dridi :
|
A hard -1 (-Inf if could) for changing the default value of I don't see why a secret can't be generated in the Varnish home directory, as Varnish does by itself in the default case. Or put the secret in some other location entirely, not on the Disrupting everyone's VCL deployments because of a problem that can easily be solved in other ways strikes me as sheer madness. |
Like I said I would need to ponder this, but this is the idea I got after the string parameters discussion. A way to safely pass a string parameter to the child, via the CLI.
My idea was rather to align what's in For example in an environment with multiple
That would be compatible with the current SELinux varnishd module, and something end-users could opt into using. And more importantly to me, we'd stop mixing everything up in
And also |
@slimhazard do you have that strong an opinion even if |
Using an explicit And regarding This is already the case for the 6.x packaging: https://github.com/varnishcache/pkg-varnish-cache/blob/6.x/systemd/varnish.service I also had a proposal to get rid of further arbitrary defaults in our packaging: varnishcache/pkg-varnish-cache#106 Unsurprisingly it was met with pitchforks but I'm still convinced that we should:
The defaults I'm suggesting are actually closer to what one would usually want for production (listening to HTTP traffic and forwarding to a private 8080 HTTP backend) but this is however a topic for pkg-varnish-cache. On the topic of All of the above is either trivial to cope with during a _major_ upgrade, or something you probably _already_ have to cope with ( |
I would find it very useful if there was a framework where vmods could define command line parameters on their own, without having to modify core Varnish code. We wrote a vmod_file a few years ago and solved this problem by just exposing an ACL API within the VMOD itself and allowing an optional root directory. So there are solutions to this problem outside of adding core parameters. |
@rezan No question that we can set a search path in command line parameters for vmods are problematic because vmods are loaded long after the command line is parsed. But extending your idea a bit might make sense: We could have arbitrary custom parameters, e.g. with some marker prefix like Another idea that had been discussed previously was a |
Ya, didn't think about the timing, vmods get loaded too late for this to be possible. Anyway, I have been thinking about this for security and sandboxing filesystem reads and writes. Its just going to be a challenge to enforce this across the entire vmod ecosystem. But it would be useful to have this from a policy perspective. If this is for convenience for your potential vmod_file, then I dont have much else to say. |
it's dead. the idea of a simple fixed length buffer shared between mgmt and worker process was refused and anything else would overly complicate the cli dance. |
This ticket is to ask for opinions about whether or not an
aux_path
parameter (other names suggested so far:cache_path
,search_path
) would be considered worth the implementation effort.aux_path
would define a search path parallelingvcl_path
andvmod_path
, but for auxiliary use cases like files with synthetic response pages.aux_path
could be$PREFIX/etc/varnish/aux:$PREFIX/share/varnish/aux
aux_path
would be available to vmods, but with the currently envisioned simplified implementation, only during vcl events and vmod initialization (iow from CLI context)aux_path
would only become effective for newly loaded VCLsaux_path
would be a default search path for vmods handling files, see for example vmod_file(subjective) summary of previous discussion:
vcl_path
cannot easily be made available in the worker process because it gets changed in the master process and the respective memory region is not shared. (see RFC: vmod read-access to parameters #3172 (comment) )Please provide feedback how important/useful such a parameter would be for you.
The text was updated successfully, but these errors were encountered: