Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-3297

Make the 'Variable' struct private and provide getters/setters handling secrets

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: (None)
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.16.0
    • Component/s: None
    • Labels:
      None

      Description

      In order to have a better control of where and how values of variables are used, we need to make the struct Variable private and provide getters and setters for its fields. The VariableGetRval() getter should respect a new secret tag (meta attribute) marking variables as secrets and only return the real value when get_secret=true. Otherwise it should return an Rval with just ********.

      The WIP commits for core and enterprise that can be used as a starting point are at https://github.com/vpodzime/cfengine-core/tree/master-vars_encapsulation and https://github.com/vpodzime/enterprise/tree/master-vars_encapsulation.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vpodzime Vratislav Podzimek
                Reporter:
                vpodzime Vratislav Podzimek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel