Skip to content

[v14] Add server-side tpm joining implementation (#40512)#40875

Merged
strideynet merged 1 commit intobranch/v14from
strideynet/v14/backport-40512
Apr 25, 2024
Merged

[v14] Add server-side tpm joining implementation (#40512)#40875
strideynet merged 1 commit intobranch/v14from
strideynet/v14/backport-40512

Conversation

@strideynet
Copy link
Copy Markdown
Contributor

@strideynet strideynet commented Apr 24, 2024

Backports #40512

changelog: Introduced the tpm join method, which allows for secure joining in on-prem environments without the need for a shared secret.

* 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>
@strideynet strideynet marked this pull request as ready for review April 25, 2024 09:33
@github-actions github-actions Bot requested review from codingllama and tigrato April 25, 2024 09:34
@strideynet strideynet added this pull request to the merge queue Apr 25, 2024
Merged via the queue into branch/v14 with commit 60a0a1f Apr 25, 2024
@strideynet strideynet deleted the strideynet/v14/backport-40512 branch April 25, 2024 14:26
@camscale camscale mentioned this pull request May 1, 2024
This was referenced Aug 6, 2024
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