Skip to content

[v13] Omit empty fields from DeviceCredential resources#27869

Merged
codingllama merged 3 commits intobranch/v13from
bot/backport-27821-branch/v13
Jun 14, 2023
Merged

[v13] Omit empty fields from DeviceCredential resources#27869
codingllama merged 3 commits intobranch/v13from
bot/backport-27821-branch/v13

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

Backport #27821 to branch/v13

Omits, from the resource representation of devices, fields that are always empty
in some cases.

DeviceAttestationType is particular in the sense that it tends to show up as
"unspecified", while other enums are never unspecified in valid devices (OSType,
EnrollStatus), or tend to have their entire parent message/struct nil when they
would be unspecified (DeviceOrigin).

-before/+after:

tctl get device/foo
kind: device
metadata:
  name: 9c39701e-9f19-4766-bc0c-1241d08ce649
spec:
  asset_tag: foo
  create_time: "2023-06-13T17:47:51.169251Z"
  credential:
-   device_attestation_type: unspecified
    id: ae2d978c-fee8-419d-a2e6-a5dd0a00c4b8
    public_key_der: MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEg1iznap59moe9gDCySvK1dYkenZBgRdif1No8u4sjlhp7qyRjMxSoFv8wytBCZNSJRRZ55prKVlMEjxcdFtJlQ==
-   tpm_ak_public: null
-   tpm_ekcert_serial: ""
  # so on ...
version: v1

https://github.com/gravitational/teleport.e/issues/827

@codingllama codingllama added this pull request to the merge queue Jun 14, 2023
Merged via the queue into branch/v13 with commit e6b9349 Jun 14, 2023
@codingllama codingllama deleted the bot/backport-27821-branch/v13 branch June 14, 2023 22:20
@r0mant r0mant mentioned this pull request Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants