Closed apazzolini closed 1 year ago
This PR adds CLI support for secret visibility types. It:
doppler secrets --json
[RESTRICTED]
--visibility
Note that this should only be merged after visibility types has been released as the code expects the new properties from the API.
» doppler secrets ┌──────────────────────┬─────────────────────────────────────┬──────┐ │ NAME │ VALUE │ NOTE │ ├──────────────────────┼─────────────────────────────────────┼──────┤ │ S1 │ [RESTRICTED] │ │ │ S2 │ v2 │ │ │ S3 │ v3 │ │ └──────────────────────┴─────────────────────────────────────┴──────┘ » doppler secrets --visibility ┌──────────────────────┬────────────┬─────────────────────────────────────┬──────┐ │ NAME │ VISIBILITY │ VALUE │ NOTE │ ├──────────────────────┼────────────┼─────────────────────────────────────┼──────┤ │ S1 │ restricted │ [RESTRICTED] │ │ │ S2 │ masked │ v2 │ │ │ S3 │ masked │ v3 │ │ └──────────────────────┴────────────┴─────────────────────────────────────┴──────┘ » doppler secrets --visibility --raw ┌──────────────────────┬────────────┬──────────────┬────────────────┬──────────────────────────┬──────┐ │ NAME │ VISIBILITY │ VALUE │ RAW VISIBILITY │ RAW VALUE │ NOTE │ ├──────────────────────┼────────────┼──────────────┼────────────────┼──────────────────────────┼──────┤ │ S1 │ restricted │ [RESTRICTED] │ unmasked │ ${stg.RESTRICTED_SECRET} │ │ │ S2 │ masked │ v2 │ masked │ v2 │ │ │ S3 │ masked │ v3 │ masked │ v3 │ │ └──────────────────────┴────────────┴──────────────┴────────────────┴──────────────────────────┴──────┘ » doppler secrets --json --raw | jq { "S1": { "computed": null, "computedVisibility": "restricted", "note": "", "raw": "${stg.RESTRICTED_SECRET}", "rawVisibility": "unmasked" }, "S2": { "computed": "v2", "computedVisibility": "masked", "note": "", "raw": "v2", "rawVisibility": "masked" }, "S3": { "computed": "v3", "computedVisibility": "masked", "note": "", "raw": "v3", "rawVisibility": "masked" } }
Closes ENG-6140
This PR adds CLI support for secret visibility types. It:
doppler secrets --json
[RESTRICTED]
in the table when appropriate--visibility
flag to explicitly show the visibility types in the tableNote that this should only be merged after visibility types has been released as the code expects the new properties from the API.
Closes ENG-6140