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

Support TLS parameters #3

Open
nobu-k opened this issue Oct 19, 2016 · 3 comments
Open

Support TLS parameters #3

nobu-k opened this issue Oct 19, 2016 · 3 comments

Comments

@nobu-k
Copy link
Member

nobu-k commented Oct 19, 2016

From #2 (comment) .

The plugin should provide these TLS parameters. However, I don't have a good idea now to support a lot of parameters. Generally, I think one of the following forms should be okay.

WITH
  root_ca = val,
  client_ca = val,
  ...;
WITH
  tls = {
    "root_ca": val,
    "client_ca": val,
    ...
  };

I want to know/discuss if there's a good way to set all parameters at once.

Note

SensorBee's data package should provide an easy way to process parameters passed as data.Map. Ideally, it should also support something like (JSON) schema.

@Albibek
Copy link

Albibek commented Oct 20, 2016

I also thought about one of these variants. Will the second one be parsed correctly without quoting the whole value? If not, it will force double quote escaping inside double quotes.

I also thought we could specify some external file with the desired settings or use some section in the main yaml file. The latter as a feature available to any plugin or as a simple function could be a cool feature of the whole product.

@nobu-k
Copy link
Member Author

nobu-k commented Oct 20, 2016

Will the second one be parsed correctly without quoting the whole value?

Yes, WITH parameters accepts map values.

I also think using an external file is a good option because a certificate needs to be read from a file anyway in most cases. A user has to be careful of the working directory of the process, though.

Parsing YAML and converting it into data.Map is quite simple: https://github.com/sensorbee/sensorbee/blob/master/cmd/lib/run/cmd.go#L49 . So, supporting both tls = {map} and something like tls_config_file = "/path/to/config.yml" might be possible.

The latter as a feature available to any plugin or as a simple function could be a cool feature of the whole product.

This is very interesting. At the moment, I think the definition of a component like a source and its configuration should be managed in one place (i.e. in BQL). However, I'll keep thinking of applying this approach to our existing use cases to see how suitable it is.

@nobu-k
Copy link
Member Author

nobu-k commented Oct 27, 2016

To parse params data.Map in plugins, we're thinking about supporting this functionality in data package of SensorBee sensorbee/sensorbee#121 . Defining many parameters in a plugin could become easier with it.

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

2 participants