[v14] Add tpm package with Attestation/Validation functionality (#40351)#40496
Merged
strideynet merged 2 commits intobranch/v14from Apr 11, 2024
Merged
[v14] Add tpm package with Attestation/Validation functionality (#40351)#40496strideynet merged 2 commits intobranch/v14from
tpm package with Attestation/Validation functionality (#40351)#40496strideynet merged 2 commits intobranch/v14from
Conversation
* Add structure of `tpm` package * Add proto conversion methods * Add tests for proto conversions * Add startup stuff for tpm sim based tests * try and fail to write a fake ekcert to the tpm * Working ability to write to a TPM ekcert index * Tidy up * Add finishing touches to test and add godocs * Go mod tidy * Appease linter * Remove incorrectly copied comment * Tidy up line wrapping * Add license header * Update lib/tpm/tpm.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/tpm/tpm_simulator_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/tpm/validate.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/tpm/tpm.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/tpm/tpm_simulator_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/tpm/tpm_simulator_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/tpm/tpm_simulator_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Avoid managing closure in the attestWithTPM func * Use ekCertSerialHex const * Simpler JoinAuditAttributes method Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Add missing err return * Add remark on the nvram rsa ekcert index * Update lib/tpm/tpm_simulator_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Add subtests * Clarify in hex * Switch to testing exported iface * Use x509.CertPool and switch to testing public APi * Remove overly cautious check * Validate Validate params * Reuse strings builder when handling an odd number of hex digits * Switch to gocmp and struct for ekcert * Use return struct for Attest * Avoid marshalling PKIX key twice * Update lib/tpm/validate.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> --------- Co-authored-by: Alan Parra <alan.parra@goteleport.com>
codingllama
approved these changes
Apr 11, 2024
avatus
approved these changes
Apr 11, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #40351