Skip to content

bootstrap-step-ca.sh: give SCEP provisioners an RSA decrypter (fix 14003)#48

Merged
rcurranmoz merged 1 commit into
mainfrom
fix-scep-decrypter-bootstrap
Jul 17, 2026
Merged

bootstrap-step-ca.sh: give SCEP provisioners an RSA decrypter (fix 14003)#48
rcurranmoz merged 1 commit into
mainfrom
fix-scep-decrypter-bootstrap

Conversation

@rcurranmoz

Copy link
Copy Markdown
Collaborator

The CA is EC, so step-ca can't auto-use the CA key as the SCEP decrypter. The provisioner-add loop never passed an explicit decrypter, so newly-created SCEP provisioners returned only the CA cert on GetCACert (application/x-x509-ca-cert) instead of the CA+RA chain (x-x509-ca-ra-cert). macOS SCEP needs the RA (decrypter) cert to encrypt its request, so it failed with MDM-SCEP:14003 "unable to generate certificate signing request".

Hit 2026-07 on the tart-VM (scep-gecko-t-osx-1500-m-vms) + the arm64 provisioners added by the recent run; the pre-existing provisioners (scep-no-sip, etc.) worked because they already had a decrypter.

Fix: ensure one shared RSA decrypter and pass it to every SCEP provisioner add (--scep-decrypter-certificate / --scep-decrypter-key). Reuse the decrypter already in ca.json if the CA has SCEP provisioners (keeps them all consistent), else mint a new CA-signed RSA decrypter.

Live CA already remediated out-of-band (shared decrypter copied into the 6 affected provisioners + step-ca restart; confirmed GetCACert now returns the RA chain and enrollment succeeds with the correct SPIFFE role). This PR makes a from-scratch CA rebuild reproduce the working state instead of silently reintroducing the bug.

Validated: bash -n clean. The --scep-decrypter-* flag names + the mint path should be confirmed on the next from-scratch bootstrap (the reuse path is what runs on the existing CA).

…003)

The CA is EC, so step-ca cannot auto-use the CA key as the SCEP decrypter. The
provisioner-add loop omitted an explicit decrypter, so newly-created SCEP
provisioners returned only the CA cert on GetCACert (x-x509-ca-cert) instead of
the CA+RA chain (x-x509-ca-ra-cert). macOS SCEP then can't encrypt its request
and fails with MDM-SCEP:14003 "unable to generate certificate signing request".
Hit 2026-07 on the tart-VM + arm64 provisioners added by the recent run;
pre-existing provisioners worked because they already had a decrypter.

Fix: ensure one shared RSA decrypter and pass it to every SCEP provisioner add
(--scep-decrypter-certificate / --scep-decrypter-key). Reuse the existing
decrypter from ca.json if the CA already has SCEP provisioners (keeps them
consistent), else mint a new CA-signed RSA decrypter.

The live CA was already remediated out-of-band (shared decrypter copied into the
6 affected provisioners + restart); this makes a from-scratch CA rebuild
reproduce the working state instead of silently reintroducing the bug.
@rcurranmoz
rcurranmoz requested a review from a team as a code owner July 17, 2026 11:01
@rcurranmoz
rcurranmoz merged commit 80a4663 into main Jul 17, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant