Commit Graph
4 Commits
Author SHA1 Message Date
Alan Parra d5e329e9ea Add tsh device debug commands (#19166)
Add `tsh device collect` and `tsh device keyget`, which are useful to debug
device trust functionality.

gravitational/teleport.e#514
2022-12-09 10:38:52 -03:00
Alan Parra 73d058d7a7 Return user-friendly messages for common enroll errors (#19115)
Handle a few common macOS errors, as well as gRPC unimplemented errors, and
return more user-friendly messages in their place.

gravitational/teleport.e#514
2022-12-07 20:10:14 +00:00
Alan Parra d218fd2625 Implement macOS device enrollment methods (#19079)
Implement native macOS methods required by device enrollment, namely methods to
Create/Get the device key, Sign challenges with it, and to collect device data
(aka serial number).

The implementation is rather similar to lib/auth/touchid, but simpler in a few
aspects:

1. Device keys don't require user interaction (as in they don't cause a touch ID
   prompt); and
2. There exists, at most, a single device key at all times.

I've added a tiny refactor to reuse Apple public key parsing from touchid, plus
some changes so touchid doesn't break in the face of unexpected keys (which the
device key didn't cause, per se, but my experiments getting to it did).

gravitational/teleport.e#514
2022-12-07 18:11:21 +00:00
Alan Parra 4e1c39639e Implement client-side device enrollment (#18988)
Implement the client-side enrollment ceremony and define the interfaces for
native-only methods.

The server-side implementation for Device Trust is Enterprise-only, so sadly we
can't against the real server here. I've opted to write a couple of fakes that
we can reuse for the device authentication ceremony and, eventually, to test
against other OS implementations. The current design attempts to write as much
as possible without build tags, so we can unit test the most of it.

Follow ups will add the native parts and wire the ceremony to the corresponding
`tsh` command.

gravitational/teleport.e#514
2022-12-05 21:17:48 +00:00