Display secret to user in inpspect

It is pretty complicated to display the secret on the host, but is
not really secured. This patch makes it easier to examine the secret.

Partial fix for https://github.com/containers/podman/issues/18667

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2023-06-27 09:28:16 -04:00
parent 2ac2ba9e4f
commit bf60bb0731
13 changed files with 95 additions and 14 deletions

View File

@ -23,6 +23,7 @@ Format secret output using Go template.
|--------------------------|-------------------------------------------------------------------|
| .CreatedAt | When secret was created (relative timestamp, human-readable) |
| .ID | ID of secret |
| .SecretData | Secret Data (Displayed only with --showsecret option) |
| .Spec ... | Details of secret |
| .Spec.Driver | Driver info |
| .Spec.Driver.Name | Driver name (string) |
@ -39,12 +40,16 @@ Print usage statement.
Print inspect output in human-readable format
#### **--showsecret**
Display secret data
## EXAMPLES
```
$ podman secret inspect mysecret
$ podman secret inspect --format "{{.Name} {{.Scope}}" mysecret
$ podman secret inspect --showsecret --format "{{.Name} {{.SecretData}}" mysecret
```
## SEE ALSO

View File

@ -34,6 +34,7 @@ Valid placeholders for the Go template are listed below:
| ------------------------ | ----------------------------------------------------------------- |
| .CreatedAt | When secret was created (relative timestamp, human-readable) |
| .ID | ID of secret |
| .SecretData | Secret Data (Displayed only with --showsecret option) |
| .Spec ... | Details of secret |
| .Spec.Driver | Driver info |
| .Spec.Driver.Name | Driver name (string) |