1. Create a workload identity
Go to Workload Identity in the left nav and click New Identity. Fill in:
Click Create Identity. The identity is created in
pending_enrollment status — no cert yet.
2. Generate an enrollment token
Open the identity you just created. In the Enrollment Token section, click Generate Token. The token is a<uuid>:<32-hex> string. Copy it immediately — it is only shown once and stored as a one-way hash.
This token is what your workload uses to bootstrap its first certificate. It is single-use: once the workload enrolls, the token cannot be reused. If the workload needs to re-enroll (e.g. key compromise, re-deployment), generate a new token from this same screen.
The token expires at the time shown — if it expires before the workload uses it, generate a new one.
3. Enroll the workload
The workload generates its own private key and sends a CSR to CertGov. CertGov ignores the CSR’s CN and SANs — the CN and SANs are taken from the identity configuration, so the workload cannot self-assign a different identity. Enrollment endpoint:- Store
cert_pemand its private key on disk (or in memory) - Use
renew_beforeto know when to trigger renewal - Never reuse the enrollment token
active in the CertGov UI.
4. Renew the workload certificate
Renewal uses mutual TLS (mTLS) — the workload presents its current certificate to authenticate the renewal request. No API key or token is needed after the first enrollment. Renewal endpoint (mTLS listener, port 8444):cert_pem, serial, not_after, renew_before).
The renewal endpoint is port 8444, not 8443. The mTLS listener requires client certs; the main API listener (8443) does not.
5. Testing
Use these scripts from the CertGov repo root to test enrollment and renewal end-to-end:./workload-key.pem and ./workload-cert.pem in the current directory.
To test against a specific environment:
6. Verify the certificate
Check the chain and that the certificate carries your organization ID:workload-cert.pem: OK, and a subject containing OU = org:<your-org-id>.
To check revocation the way a strict service does:
7. What you see in the UI
Once enrolled and renewing, the workload identity detail page shows:
Credential Events counts enrollment + renewal calls against this identity. It is not an mTLS connection counter — a workload that renews once every 24 hours will show 1 event per day.
8. AWS Roles Anywhere CRL distribution (optional)
If your workload uses AWS and you want CertGov to push revocation data to your AWS account, configure CRL distribution.8a. Set up AWS
In your AWS account:- Create a Trust Anchor in IAM Roles Anywhere. Use source External certificate bundle and paste the CertGov root certificate (
https://ca.certgov.io/root.crt, converted to PEM). - Create the CertGov push role. CertGov needs no AWS keys. It assumes a role in your account to upload the CRL. On Workload Identities → CRL Distribution in CertGov, copy the trust policy and permissions policy shown under Create the CertGov push role, and create an IAM role with them (for example
certgov-crl-push). The trust policy contains an external ID unique to your organization. Keep it. - Create the workload role your workload will assume. Use a trust policy generated by CertGov: the per-identity one on the identity’s page, or the org-wide and per-policy ones on CRL Distribution. Each requires your organization ID. Don’t remove that condition.
- Create a Profile in IAM Roles Anywhere that lists the workload role, with the minimum session duration (15 minutes).
8b. Configure in CertGov
Go to Workload Identities → CRL Distribution.
Click Save Configuration, then Re-push CRL Now to test. A successful push registers the CRL in Roles Anywhere, and the status line shows its CRL ID.
The Roles Anywhere console doesn’t list CRLs. To confirm AWS has the latest one, check its
updatedAt:
Earlier versions of CertGov asked for an IAM user’s access key here. Those keys are deprecated. Saving a push role ARN deletes the stored key from CertGov. Then deactivate the key in AWS.
~/.aws/config:
9. Revocation
To revoke a workload identity, open the identity in the UI and click Revoke in the Actions section. What happens immediately:- Renewal and re-enrollment are blocked
- The cert’s serial is added to the revocation list
- The CRL is rebuilt and published at
crl.certgov.io - If AWS is configured, the updated CRL is pushed to Roles Anywhere (AWS refuses new credentials within seconds)
revoked. Services that load the CRL reject the cert at their next refresh, within 15 minutes if they follow the integration guide. Services that don’t check revocation keep accepting it until it expires.
To re-enroll the same identity later: click Re-enable Identity → then generate a new token and have the workload re-enroll.
Troubleshooting
Enrollment returns 401:- Check that the token hasn’t expired (the UI shows the expiry time)
- Check that the token hasn’t already been used (status shows “Token was used at…”)
- Tokens are single-use — generate a new one if needed
- The mTLS listener requires the workload to present its certificate
- Confirm the renewal request is going to port 8444, not 8443
- Confirm
--certand--keyflags (or the TLS client config) point to the current workload cert/key
- Check the cert’s
Issuerfield:openssl x509 -in workload-cert.pem -noout -issuer. It must match the intermediate you passed with-untrusted
- Check the error shown in CRL Distribution status or in Alerts
assume push role: sts AssumeRole: AccessDenied: the push role’s trust policy must name CertGov’s AWS identity and your external ID exactly as shown on CRL Distribution- Confirm the push role has
rolesanywhere:ImportCrlandrolesanywhere:UpdateCrl - Confirm the Trust Anchor ARN matches the region in the CertGov config