Closed benlongo closed 2 months ago
Hi @benlongo, what exactly are you looking for?
Our implementation of device-attest-01
does in fact support the tpm
format. Our CLI has very basic support for it too. Our crypto
package has several parts related to supporting TPMs. The part that's not in step-ca
is the attestation CA, but in terms of responsibilities, implementation scope and business requirements, that part is supposed to be in an independent/different system, IMO. Then, after the attestation CA does its job, step-ca
can authorize an ACME request using the tpm
format.
We currently do make a few assumptions, so it's possible some changes are required to make it work for more cases. I think we're open to suggestions there, if needed.
Hi @hslatman, thanks for your response. I believe I have misinterpreted the contents of #1545 which to me seemed to suggest that a critical component was missing to implement device-attest-01
with tpm
, but after reading more carefully it appears my understanding of the protocol was flawed and I was conflating the attestation CA with step-ca.
I'd be happy with a simple example attestation CA service code and some documentation/examples that shows what the flow actually would be.
When I played around with this it was all way to opaque for me to be able to figure out what bits go where.
@benlongo No problem 🙂 I have to admit that the tpm
format and how to use it with step-ca
is currently not that well explained/documented, so I understand where you're coming from.
@glance- I'll see what I can do. It'll probably be documentation based first.
@hslatman We are also interested in documentation around using the device-attest-01 flow with TPMs, so any documentation you can provide would be much appreciated.
We are developing a step-ca Pro edition, for commercial use. It's a drop-in replacement for step-ca and it will include more device identity and attestation features. Schedule a time to talk with us if you'd like to learn more!
@tashian I'm interpreting your message as an indication that smallstep does not plan on making the TPM2 attestation workflows available in their open source packages. This seems to be contrary to @hslatman's previous comment which suggested that this was indeed part of the open source offering.
I would be very disappointed if this is the case, but understand the business case for it. If you do not plan on open sourcing device-attest-01
support, then please close this issue.
For what it's worth, I don't appreciate GitHub issues I've created being turned into sales pitches, and I don't anticipate other folks will appreciate it either.
Hi @benlongo, thanks for the feedback. I admit it's tricky to find a balance because I want people to know that we have commercial options that may be a better fit for them, but I'm not here to pollute the conversation with ads.
And I think you may have read a bit too much into my note, so I should clarify.
My understanding of this issue is that we already have device attestation features in open source—some added very recently—that are not very well documented. Our docs contain approximately one paragraph about device-attest-01.
So, I think there’s more we could do and am discussing with Herman where the gaps are. Personally, I'd like to see a YubiKey example at minimum. I've opened smallstep/docs#321 to cover this part.
In the meantime, beyond our current docs, we have the following blog posts about device attestation, which might help you:
Now, on to the meat of the issue. It's true that we have no plans to release an open source TPM attestation CA, and if that's what this issue is really about, then we should close it.
However, I understood the issue to be a bit more broad. step-ca
has always been focused on DevOps use cases. The value of this issue is that it advocates for "applications for device-attest-01
beyond just enterprise MDM" — TPM or otherwise — and that's something we should continue to explore. And that's the case for keeping it open, so people can voice their support and help shape future developments.
So, while our focus on DevOps for step-ca
doesn't preclude further device attestation features, it does mean we need to serve the greatest need for DevOps first. And that need is for workload identity certificates. If device certs are to be in scope at all, they are secondary.
Finally, I want to say with humility that this is a sensitive topic for us right now. We are 5 years into the development of step-ca
, yet the philosophical boundaries of this project are still emerging—especially the boundaries between open source and commercial. These boundaries are critical for discerning what is out of scope. We do not want this project to be burdened by unrelated or niche features that are not serving its core use cases. I would say that's been a huge risk for open source projects in the past, and it's one we'd like to avoid.
@tashian thanks for the response - I do understand the difficulty in defining the boundaries both in broader scope, and where to split the line between commercial and open source. I also admit my understanding of the various pieces of the device-attest-01
protocol is limited and I haven't looked at it in awhile.
Perhaps it would be useful to explain my use case that ultimately motivated creating this issue because I think it is much more aligned with the scope of DevOps than MDM which feels more 'IT'. Our team has a large number of servers deployed at remote locations. These devices ultimately need to authenticate with AWS workloads. AWS offers IAM Roles Anywhere, and y'all even have an excellent blog post illustrating how to use this with step-ca: https://smallstep.com/blog/smallstep-and-aws-iam-roles-anywhere/. My ultimate goal is to utilize the TPM2 on these servers with device-attest-01
to get IAM Roles Anywhere certificates onto these servers.
From my perspective, this is definitely in the scope of DevOps, although it does share almost identical technical structure to the MDM use case.
At a higher level, I think this kind of abstraction would be really useful for IoT device identity problems. ACME seems like a natural fit to me, and the use cases are definitely not restricted to just AWS. It seems possible to fully automate device enrollment with this kind of tech.
I don't know if there's any kind of technical approach to split the IT customer segment from the DevOps segment here but I hope I've made the case for this feature in the step-ca repo.
edit: upon more searching it looks like this use case is already being considered and might be in the commercial pipeline https://smallstep.com/integrations/aws-iam/
Thanks for articulating your use case, Ben. And I agree that it's a solid DevOps use case.
There are several TPM certificate workflows possible with device-attest-01
. I have spent a lof of time researching TPM 2.0 and the TCG specs, and I still feel like a beginner when it comes to understanding the certificate workflows and their use cases. Several workflows are specified but few, if any, have been adopted or implemented in open source.
However, I'm almost certain that you would need an Attestation CA in order to have an attested device identifier on a certificate for your desired use case. The Attestation CA is beyond the scope of step-ca
. It's not simply a missing provisioner type; it's a separate component that should be developed as an independent project.
So, I'm going to close this issue. Circling back to what @hslatman said earlier, step-ca
fully supports the tpm
attestation format. From my POV, step-ca
has done its part here by implementing ACME device-attest-01
to spec on the server side.
If someone wants to build an open source Attestation CA for TPM2, it would certainly unlock more use cases.
However, I'm almost certain that you would need an Attestation CA in order to have an attested device identifier on a certificate for your desired use case. The Attestation CA is beyond the scope of step-ca. It's not simply a missing provisioner type; it's a separate component that should be developed as an independent project.
If I am not mistaken, something like Googles go-attestation library could fill that gap, correct?
If I am not mistaken, something like Googles go-attestation library could fill that gap, correct?
Absolutely, but go-attestation
only provides you the lower level bits; not the client <-> server (attestation CA) interaction/protocol, so that would still have to be implemented.
We rely on go-attestation (our fork, until all our changes are upstreamed) ourselves in e.g. our tpm and (more specifically) the attestation packages. In step-ca
, it's used as part of the ACME challenge validation: https://github.com/smallstep/certificates/blob/master/acme/challenge.go#L666-L679.
Hello!
Issue details
https://github.com/smallstep/certificates/discussions/1545
Why is this needed?
There are many applications for device-attest-01 beyond just enterprise MDM, and it's a shame the implementation isn't open source.