Skip to content

Sub-properties of sensitive object parameter not tracked as sensitive #3227

@lbergnehr

Description

@lbergnehr

Describe the bug

When using sub-properties of a sensitive parameter of object type, they are not tracked as sensitive by Porter, even if the parameter itself is sensitive. This is an effect of the implementation of the sub-properties functionality in templating done in #3225.

See #3225 (comment) for more context and the development of the sub-properties feature.

To Reproduce

Steps to reproduce the behavior:

Given this manifest:

---
name: test
schemaVersion: 1.0.1
version: 1.0.0

registry: localhost:5000

parameters:
  - name: sensitiveObject
    type: object
    sensitive: true
    default:
      subfield: this_is_secret

mixins:
  - exec

install:
  - exec:
      command: printf
      arguments:
        - '%s\n%s'
        - 'Sensitive object: ${ bundle.parameters.sensitiveObject }'
        - 'Sensitive subfield: ${ bundle.parameters.sensitiveObject.subfield }'

uninstall:
  - exec:
      command: echo

Run porter install on it, will produce something like this:

executing install action from test (installation: /test)
Sensitive object: *******
Sensitive subfield: this_is_secret
execution completed successfully!

Expected behavior

The value of Sensitive subfield, this_is_secret, should be masked like the value of Sensitive object.

Version

porter v1.1.0-33-g7630bc37 (7630bc37)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugOops, sorry!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions