-
Notifications
You must be signed in to change notification settings - Fork 1
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
ACME device attestation and TPM residency of AKs #2
Comments
The device-attest-01 challenge does not implement a workflow mentioned in the TPM 2.0 Keys for Device Identity and Attestation. It implements a workflow that more closely aligns with the WebAuthn standard which supports more than just TPMs. I've created a new challenge type for this project, device-01, which does follow the TCG specs you mentioned. It currently supports both of the Identity Provisioning use cases mentioned for OEM's, and I will add more in the future. I actually just got the first end to end test working today. You can be the first to give it a try and let me know what you think: ACME Server:
ACME Client:
Both the ACME server and client will start up using the embedded TPM simulator. The platform software fully provisions the TPM, including an EK, SRK, IAK, and IDevID keys. Then, the client will see the ACME client config and use the configured ACME server endpoint to request an EK, IAK, IDevID certificates (with all of the proper TCG OIDs) and finally, a web server TLS certificate using a standalone pkcs8 key. The EK is retrieved using a custom The IAK and IDevID is retrieved using a custom Finally, a TLS certificate is requested & issued, using a separate pkcs8 key, for its web services which will be running on localhost:8444. You can inspect the certificate in the browser to confirm it's issued by the Enterprise CA. I've run into an issue fully implementing the It seems like there are 3 paths to pursue with device-attest-01:
I just pushed the latest code to the feature/acme branch if you want to check it out. |
Ahh! Okay, that makes sense. Great timing! I'll give this a go and read about your |
I'll take a closer look when I get a chance but drive by comment in the mean time:
The intent is not to align with WebAuthn per se. It is just that every other attestation schemed covered by the In order to make the TPM specifications generalizable to both enterprise and privacy preserving use cases the concept of a third party attestation/privacy CA is included. Until a subject device has been issued an AK certificate, it is unable to participate in any attestation flow, including the ACME flow described by There are a lot of considerations in implementing an attestation CA, including important privacy considerations. It seems inappropriate for a |
I notice that the ACME client starts as a web server
Is this necessary? Does the client have to be addressable for endorse-01 and device-01 to work? |
The ACME client is starting with the web service because the web server needs a TLS certificate before it can start. Therefore, it fires up the ACME client first to request it, but before that can happen, the attestation procedure outlined above takes place so that when a TLS certificate is requested, the ACME server can perform the device-attest-01 challenge. As Brandon mentioned, that challenge expects the ACME server to already know about the permanent-identifier and how to verifiy the attestation statement, which implies some kind of enrollment has already happened. For this reason, endorse-01 and device-01 were created, to allow the device to be enrolled first, so the CA has the root certificates, permanent-identifiers or whatever else it needs to verify the device-attest-01 challenge, and also verify that it is talking to a known device (via the IDevID cert). Yes, both endorse-01 and device-01 require HTTP as they are slightly modified versions of http-01, however, they start their own web servers and tear them down once the challenge has been completed. Once the TLS certificate is obtained, the main web services are started. I currently have http-8080 and http-8081 as challenge options to work around privileged port requirements, and will probably just consolidate them into something like http-x that reads the port from the config file, and make endorse-01 and device-01 ports configurable in the same manner, that way anyone in control of the Enterprise CA deployment can define the challenge to happen on any port they want. |
Ahh okay. That makes sense, though it might make things tricky in my scenario where my devices are NATed. |
The same efforts to make the NATed devices work would be required for http-01 as well. dns-01 doesn't seem like a good candidate due to the attestation statement payload size. The most convenient solution for device attestation is to send the attestation payload when the client accepts the challenge, as defined in If you have other suggestions for a challenge type that would make the an async validation process more automation and administration friendly for NATed devices, I'm open to suggestions. I pinged the Boulder team. I'm interested in their thoughts on this as well. |
Cheers @jeremyhahn — that sounds sensible. I've subscribed to that issue, will see what comes of it. I look fowrard to seeing what you do in this space |
I confirmed via the ACME mailing list that the empty payload object is not a strict RFC requirement and opened a PR to allow the golang acme client to support our use case. golang/crypto#305 Upon merge, I'll finish wiring up the last remaining piece for acme-device-attest and refactor the custom enrollment challenges to reduce a round trip. I'm going to leave this issue open until complete. |
You may be able to use |
# This is the 1st commit message: ACME client & server iteration # This is the commit message #2: fix http challenge urls. clean up comments # This is the commit message #3: Add webapp to public_html. more misc cleanup # This is the commit message #4: support configurable / dynamic port assignments for http based challenges # This is the commit message #5: misc bug fixes and cleanup # This is the commit message #6: - Add key rotation support to key stores - Add overwrite flag to key store backend and save operations - Add docker and packer support for the core platform and RPI - Create Trusted Platform ISO build scripts - Re-organize webservice package, decouple configs - Add ACME client cross-signing support - Create examples directory # This is the commit message #7: Remove TSS attestation workflow from core project, move to examples # This is the commit message #8: Remove protobuf from core project, relocate to TSS examples # This is the commit message #9: - Add support for external ACME servers (tested w/ LetsEncrypt) - Add DNS server w/ support for internal and public DNS zones - Add full support for dns-01 ACME challenge w/ DNS server integration - Create docker based ISO builders # This is the commit message #10: - Add support for automated ACME certificates deployed to web server via external CA's (e.g. LetsEncrypt) - Add virtual hosts, url rewrite and reverse proxy support to web server - Add support for HTTP/3 QUIC - Create build-public-html target to automate dashboard build - Re-organize configs, cleanup - Create custom security logging facility - Add ACME docs, lots of cleanup - Fix bugs and broken tests - Clean up VS code tasks and targets - Iterate on minimal docker and ISO build targets for platform and ansible
I see you're working on implementing acme-device-attest. I'm curious, how does that flow can guarantee TPM residency of AKs as described in TPM 2.0 Keys for Device Identity and Attestation?
The text was updated successfully, but these errors were encountered: