Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement status sub-command #85

Open
EvilBit opened this issue Jul 14, 2021 · 1 comment
Open

Implement status sub-command #85

EvilBit opened this issue Jul 14, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@EvilBit
Copy link
Contributor

EvilBit commented Jul 14, 2021

Having a sub-command à la tpm2-totp status to show the currently enrolled configuration would be helpful and very much appreciated.

Infos to display could include:

  • general enrollment status
  • selected PCR registers
    • possibly with short description for well-known PCRs (man 1 systemd-cryptenroll has a nice summary)
  • resealing possible? (enrolled with password or not)
  • PCR banks
  • nvindex used
  • label
  • etc.

Possibly/Optionally in YAML format.

@diabonas
Copy link
Member

Sounds like a good idea! The following information should be easy enough to obtain:

The following information is not stored permanently at the moment:

  • nvindex used: We'd need to store this information somewhere on disk since it can't be derived from the TPM (short of trying all defined NV indices, which doesn't seem feasible). Maybe we could parse the kernel command line /proc/cmdline for the tpm2_totp_nvindex/rd.tpm2totp.nvindex=index argument to cover at least the initramfs use case? I'm not sure if people really use this feature at all (though it might possibly make sense if you store multiple different TOTP secrets, possibly for different operating systems).
  • label: the --label argument is only used during generation of the QR code containing the TOTP secret. It might make sense to store it in the NV index as well to make resealing easier, but it currently is a variable-length string, so not a good fit for a fixed-size index. We could limit it to e.g. a maximum of 32 characters though.

@diabonas diabonas added enhancement New feature or request help wanted Extra attention is needed labels Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants