Add server-side tpm joining implementation#40512
Conversation
tpm joining implementation to Auth Servertpm joining implementation for Auth Server and Client
cebb009 to
e74cc44
Compare
51bd20b to
ee968a0
Compare
|
Join succeeded: |
|
Join with EKCert and CA enforcement: |
codingllama
left a comment
There was a problem hiding this comment.
Sorry for the delay in the initial reply.
This is a big PR - 1k lines without generated code, touching around 7 different packages. Do you think you could split it into smaller parts? (Feel free to assign me to the parts, I don't mind reviewing it all.)
Apologies - I'd already broken it into three and this was the largest remaining chunk. I'll see if there's anything meaningful I can extract. |
45aaca1 to
d36cdd8
Compare
99cf5e5 to
8071b7f
Compare
d36cdd8 to
aa8a8f2
Compare
tpm joining implementation for Auth Server and Clienttpm joining implementation
|
Split out the client element PR - #40647 |
codingllama
left a comment
There was a problem hiding this comment.
Sending some comments now, I'll take a closer look at the tests a bit later.
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
c3e2564 to
39ad9bf
Compare
|
@strideynet See the table below for backport results.
|
* Add clientside elements of TPM joining * Update lib/auth/register.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update api/client/joinservice.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/auth/register.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Tidy up RegisterUsingTPMMethod method * Add default case * Rename CheckAndSetDefaults to validate * Add basic success test for JoinServiceClient_RegisterUsingTPMMethod * Add final touches to client joinservice test * Add license header to joinservice_test.go * Add server-side elements of TPM joining * Turn SAN extension code into helper func * Add `ok` check to provision token casting * Improve test name * Update lib/auth/join_tpm.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/auth/join_tpm.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Unexported registerUsingTPMMethod * Refactor enterprise error * tidy up test * Update lib/tpm/validate.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/auth/join_tpm.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Update lib/auth/join_tpm_test.go Co-authored-by: Alan Parra <alan.parra@goteleport.com> * Fix StripSANExtensionOIDs and add test * Improve joinserver.go, use simpler proto getter methods and use slog * Tidy up join_tpm_test.go * Tidy up joinserver_test * Add join failure audit event --------- Co-authored-by: Alan Parra <alan.parra@goteleport.com>
* Add clientside elements of TPM joining * Update lib/auth/register.go * Update api/client/joinservice.go * Update lib/auth/register.go * Tidy up RegisterUsingTPMMethod method * Add default case * Rename CheckAndSetDefaults to validate * Add basic success test for JoinServiceClient_RegisterUsingTPMMethod * Add final touches to client joinservice test * Add license header to joinservice_test.go * Add server-side elements of TPM joining * Turn SAN extension code into helper func * Add `ok` check to provision token casting * Improve test name * Update lib/auth/join_tpm.go * Update lib/auth/join_tpm.go * Unexported registerUsingTPMMethod * Refactor enterprise error * tidy up test * Update lib/tpm/validate.go * Update lib/auth/join_tpm.go * Update lib/auth/join_tpm_test.go * Fix StripSANExtensionOIDs and add test * Improve joinserver.go, use simpler proto getter methods and use slog * Tidy up join_tpm_test.go * Tidy up joinserver_test * Add join failure audit event --------- Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Closes #38558
As per RFD #38613
Depends on #40647
Example config:
Manually tested on:
changelog: Introduces the
tpmjoin method, which allows for secure joining in on-prem environments without the need for a shared secret.