redpanda-data / redpanda-data/connect
Allow the StreamBuilder.AsYaml to have options to disable scrubbing
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.8k
- Forks
- 969
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 64
Description
TL;DR - Scrubbing control is broken as Spec.SanitiseYAML does not take the SanitiseConfig into account for scrubbing
When you want to output the result of your StreamBuilder, you can call the AsYaml function to return a scrubbed version of your configuration. This is great because it formats the configuration file in a more readable way than what we would get doing the yaml Marshalling ourselves. However, there does not seem to be a way to disable the scrubbing.
Underneath a dedicated scrubber is used (defined on config field level) to scrub the actual value in case the field contains a secret. A call to AsYaml will create a SanitiseConfig containing various options, one being to control whether scrubbing should happen or not. However, this config is not taken into account by the scrubber defined on the field.
Approach:
- Guard the scrubbing behavior in the
Spec.SanitiseYAMLbased onSanitiseConfig.ScrubSecrets - Make sure the
NewSanitiseConfigis enabling scrubbing by default - Allow GenerationOptions to be passed to the
StreamBuilder.AsYaml()call - Create a
WithScrubbingDisabledoption to be passed to theStreamBuilder.AsYaml()call
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with StreamBuilder.AsYaml and Spec.SanitiseYAML, then trace SanitiseConfig, NewSanitiseConfig, and GenerationOptions. Done means ScrubSecrets controls field-level scrubbing, scrubbing remains enabled by default, and AsYaml accepts a WithScrubbingDisabled option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- stream-processing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100