Skip to content

Support TLS parameters #3

Open
Open

Description

@nobu-k

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.

Activity

  1. Albibek commented on Oct 20, 2016

    @Albibek

    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.

  2. nobu-k commented on Oct 20, 2016

    @nobu-k
    MemberAuthor

    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.

  3. nobu-k commented on Oct 27, 2016

    @nobu-k
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions