Skip to content

Configuration might be unmarshal and altered before usage into templating #430

Open
@rbeuque74

Description

@rbeuque74

Describe the bug
When using configuration in templating, if the value fetch from configstore is a raw value (such as a SSH key),
utask engine try to unmarshal it with yaml

err := yaml.Unmarshal([]byte(*v), &i, func(dec *json.Decoder) *json.Decoder {

In the case of a SSH key, the yaml.Unmarshal succeeds, but transform all \n into spaces.
The SSH key used in a utask template, given to the SSH plugin, is not usable.

Proposed fix
I guess we should add a new templating store, named configraw, and put the raw value there, without any yaml.Unmarshal.
In that way, if user want to use a raw value such as a SSH key, it can come from this store.

utask version impacted by the bug
All

cc @Alkorin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions