elastic / elastic/package-spec

[Change Proposal] Add special `tls` variable types

Open
#761 5 comments 1 reaction 0 assignees View on GitHub
stale Team:Ecosystem
Dominant language
Go
Stars
20
Forks
93
Avg merge
15h 10m
Merged PRs (30d)
12

Description

Ref @andrewkroh's comment here: https://github.com/elastic/integrations/issues/8610#issuecomment-2082564625

Today, there is duplication across integrations that include TLS related fields. In an effort to remove this duplication, we should provide special `tls` variable types that are "expanded" by Fleet UI to render + provide boilerplate TLS variables without integration maintainers needing to copy/paste TLS configuration across many integrations.

Providing this abstraction will also allow Fleet UI to build a better, more tailored UX around TLS fields that makes use of secrets as appropriate and provides something better than a few text inputs and a YAML textarea.

There are two distinct types of TLS variables exposed in integrations:
- TLS server variables
- TLS client variables

TODO: Add specific examples of each type of variable in an existing integration, clarify exactly which variables should be included in which type.

Rather than define these variables directly, an integration maintainer should be able to define a flag at any level for which `vars` might exist, e.g.

```yaml
# my_integration/manifest.yml
policy_templates:
- name: my_integration
title: My integration
include_tls_server_vars: true
vars:
- name: bar
type: text
...
```

Only one of `include_tls_server_vars` and `include_tls_client_vars` should be defined at a time in a given manifest.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.