-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add support for including configuration from multiple files #61
Comments
I definitely like snippet-style configuration when you're dealing with a complex configuration, but doas's is dead simple. Mine's literally one line long. I guess my question would be what the specific use case you're needing here: are you thinking of having packages drop in files granting wheel permission to use them, or what? I just don't see what difference it makes how the user goes about configuring it in this case. |
That doesn’t matter. The point is to be able to add/remove rules just by adding/removing files.
Yes; for example: repmgr, nagios-openrc. |
This would be nice to have. I can write a patch for it if it would be helpful. |
Also chiming in with @jirutka : when you are talking big infrastructures and you manage everything with a configuration management system, editing files is a no-go. Adding/removing files OTOH is dead simple. Kind of fitting to doas, doesn't it? |
Yes, that would be awesome! Adding support for “include” into OpenDoas to allow modular configuration as sudo does, so package or configuration management can add/remove rules simply by adding/removing a file into/from /etc/doas.d/, would allow me to finally replace sudo with doas. |
@telmich, yeah, but not just big infrastructure, I would say every infrastructure. BTW, I use Git + CI + APK packages as a configuration management system (apk-deploy-tool), so those two use cases I described are actually the same for me, that’s why I forgot to mention CM before. |
@Duncaen the Alpine TSC has voted to replace |
I'm not sure, what do you prefer? My concerns are mostly about diverting from upstream, which I tried to avoid. There are some implementation details that need to be considered, like that the last applicable rule is the rule that makes the final decision, this could get a bit confusing over multiple files. I don't think this is a problem but needs to be considered when writing rules. |
Based on your point with |
I guess we could get away without a breaking change to |
I’d definitely prefer implementing it in |
I would rather keep it simple. The question of what The more I think about it, configuration management is really the way to go here. |
This is not some novel and unexplored feature; many software implements it, including sudo. And the typical solution is very simple – just iterate the files in the BTW, you would have the same issue with |
Obviously the order of parsing can be made deterministic. The problem is that Say you want to do The |
Well, that’s easy, just don’t support |
BTW, If we use |
I think @Duncaen's proposal that |
This adds support for an /etc/doas.d configuration directory as discussed in Duncaen#61. It is disabled by default.
This adds support for an /etc/doas.d configuration directory as discussed in Duncaen#61. It is disabled by default.
Can you please add support for including rules from files in a directory (e.g.
/etc/doas.d/*
)? This is basically essential feature for usingdoas
as asudo
replacement in packages.The text was updated successfully, but these errors were encountered: