Add ACMECertificate payload handling with Device Attestation#10
Add ACMECertificate payload handling with Device Attestation#10hslatman wants to merge 3 commits intojessepeterson:mainfrom
ACMECertificate payload handling with Device Attestation#10Conversation
|
@hslatman bump :) |
|
Oh wow, totally forgot about this one 😅 Are you OK with the things mentioned in the last paragraph, @jessepeterson? An alternative to having to provide the attestation CA is to generate and persist one, but that would require informing the user about where the root CA certificate is stored, as that's needed for attestation certificate validation. |
|
@hslatman picking this up way late, but philosophically I consider attaching things on the context to be suitable only for context-lived things that originate in and expire after the context is done (like trace IDs, connection identifiers, etc.). Anything that lives longer than a single context's lifetime I generally try to make part of the containing service/object. To that end I'd probably move it out of the context if it's some sort of configuration or state that's meant to be shared across different contexts. Hope that helps! |
cbb0710 to
9edcd33
Compare
|
Hey @jessepeterson, I have rebased the branch and changed the attestation CA to be passed similar to the |
|
@hslatman no worries. if you want to land 'something working' vs. a more fleshed out PR I'm just fine with that, too — this little project is quite hacky! :) |
This adds support for handling the
ACMECertificatepayload.Currently always requires configuration for the (fake) attestation CA to be supplied:
Example ACMECertificate configuration, with attestation enabled (dropdown):
The example
ACMECertificatepayload is configured to connect to a step-ca instance. Its configuration should be similar to what's described in hslatman/ios-acme-simulator.Changes in jessepeterson/cfgprofiles#2 need to be merged first for the
com.apple.security.acmepayload type to be recognized.In its current state, some ACME flow details will be logged. I can remove that if requested, or change it so that log output is only shown when requested. I noticed #1, so maybe that needs to be taken into account for that.
The (fake) attestation CA configuration is currently always required when trying the
ACMECertificatepayload, because there's no other way for the Apple ACME client to prove control over ACME identifiers. @jessepeterson Configuration of the (fake) attestation CA is done through flags (without fallback). They're only required for theACMECertificatepayload and the (fake) attestation CA is injected through acontext.Context. Are you OK with that approach, or would you like it to be passed around as a property ofDevice(similar to the DB instance) instead? I noticed #2, for which I think thecontextapproach might help to a certain extent.