Skip to content
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

Avoid custom INI file format in management framework #38

Open
awelzel opened this issue Nov 20, 2023 · 2 comments
Open

Avoid custom INI file format in management framework #38

awelzel opened this issue Nov 20, 2023 · 2 comments

Comments

@awelzel
Copy link
Contributor

awelzel commented Nov 20, 2023

We should consider to not use Python specific extensions (value-less entries) for the configuration files used in the management framework to aid consuming these files from different languages/bindings.


Just wondering whether I am reading the Wikipedia article on the INI format correctly, INI does not usually have value-less entries, right? I am asking since if that's correct, maybe we should fix our format to e.g., make it easier to use libraries to generate such files (coming my experience of trying to read the non-standard multi-line strings in zkg.meta files).

Regardless, the file definitely isn't TOML (e.g., strings are not quoted).

Originally posted by @bbannier in zeek/zeek-docs#228 (comment)

@ckreibich ckreibich transferred this issue from zeek/zeek Nov 23, 2023
@ckreibich
Copy link
Member

For some perspective: it is not at all clear whether zeek-client will even keep using the ini-ish config file format. Depending on where its functionality goes, something more structured like YAML could well happen.

In the case at hand the [instances] section that started the whole discussion is definitely preliminary. I just put something in there to get the difference between agent-to-controller and controller-to-agent connection initiation off the ground.

So read this ticket as "let's revisit in due course what's the right format for the config file", not whether what's currently there is more INI- or TOML-like.

@bbannier
Copy link
Member

Thanks for chiming in here with some context @ckreibich. I asked Arne to file this ticket since my impression was that config format for the management framework was a "stable" API (introduced in zeek-5.0 so definitely something which would need planned deprecation paths there); the intention was to capture what could be relevant for such a discussion.

The need to be very careful about the highlighting in zeek/zeek-docs#228 definitely gave me pause as it can be an indicator of a weird API which not only could break highlighting (when rendered for the web or in editors), but could also make it harder than needed to generate and consume such files outside of our own special built tooling. We have such a story already with our multiline strings in zkg.meta which require handcrafted parsing logic, and I think we should avoid such APIs when not strictly needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants