Skip to content

Omit empty fields from DeviceCredential resources#27821

Merged
codingllama merged 3 commits intomasterfrom
codingllama/tpm-omit-tctl
Jun 14, 2023
Merged

Omit empty fields from DeviceCredential resources#27821
codingllama merged 3 commits intomasterfrom
codingllama/tpm-omit-tctl

Conversation

@codingllama
Copy link
Copy Markdown
Contributor

@codingllama codingllama commented Jun 13, 2023

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
Copy link
Copy Markdown
Contributor Author

@strideynet, did I tag the correct issue in the description? Feel free to edit if I didn't.

@codingllama
Copy link
Copy Markdown
Contributor Author

Friendly ping @avatus @nklaassen ?

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from nklaassen June 14, 2023 19:35
@codingllama codingllama added this pull request to the merge queue Jun 14, 2023
Merged via the queue into master with commit eb65bdd Jun 14, 2023
@codingllama codingllama deleted the codingllama/tpm-omit-tctl branch June 14, 2023 20:14
@public-teleport-github-review-bot
Copy link
Copy Markdown

@codingllama See the table below for backport results.

Branch Result
branch/v13 Create PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants