thycotic.secretserver icon indicating copy to clipboard operation
thycotic.secretserver copied to clipboard

Secret Field property "ExposeForDisplay" is an alias for "MustEncrypt" even though they have opposite connotations

Open jagger opened this issue 1 year ago • 1 comments

          https://github.com/thycotic-ps/thycotic.secretserver/blob/996427548cdefd482d1c0b14ec0824e7a4633e82/src/Thycotic.SecretServer.Types.ps1xml#L113

ExposeForDisplay is an alias for MustEncrypt so the values would be the same when pulled even though the meanings are opposite. A field that is encrypted is not exposed in the database.

PS > $xnine |  Select-Object FieldSlugName, MustEncrypt, ExposeForDisplay

FieldSlugName MustEncrypt ExposeForDisplay
------------- ----------- ----------------
notes               False            False

PS > $xnine.ExposeForDisplay = $true
PS > $xnine |  Select-Object FieldSlugName, MustEncrypt, ExposeForDisplay

FieldSlugName MustEncrypt ExposeForDisplay
------------- ----------- ----------------
notes                True             True

PS > $xnine.ExposeForDisplay = $false
PS > $xnine |  Select-Object FieldSlugName, MustEncrypt, ExposeForDisplay

FieldSlugName MustEncrypt ExposeForDisplay
------------- ----------- ----------------
notes               False            False

PS > $xnine.MustEncrypt = $true
PS > $xnine |  Select-Object FieldSlugName, MustEncrypt, ExposeForDisplay

FieldSlugName MustEncrypt ExposeForDisplay
------------- ----------- ----------------
notes                True             True

PS > $xnine.MustEncrypt = $false
PS > $xnine |  Select-Object FieldSlugName, MustEncrypt, ExposeForDisplay

FieldSlugName MustEncrypt ExposeForDisplay
------------- ----------- ----------------
notes               False            False

Originally posted by @jagger in https://github.com/thycotic-ps/thycotic.secretserver/issues/367#issuecomment-1684493664

jagger avatar Aug 18 '23 22:08 jagger

the best solution would be to change from exposeForDisplay to notExposedForDisplay as it keeps with the secret server wording, but removes the backwards meaning.

jagger avatar Aug 18 '23 22:08 jagger