You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f4e0619
Browse filesBrowse the repository at this point in the historyBrowse files
feat(ra): make identityCsrPEM optional on agent registration (#33)
* feat(ra): make identityCsrPEM optional on agent registration
Agents may now register without an identity CSR on both the V1 and V2
lanes. When identityCsrPEM is supplied, behavior is unchanged: the RA
issues an identity certificate from it at verify-acme. When omitted, the
agent registers with no identity certificate, drives through the
lifecycle to ACTIVE normally, and emits TL events carrying empty identity
certs.
- domain: NewRegistration accepts a nil identity CSR.
- service: RegisterAgent skips CSR validation/persistence when omitted;
VerifyACME treats a missing pending identity CSR as a no-op rather than
an inconsistent-state error.
- no-add-later guard: an ACTIVE agent that registered without an identity
CSR cannot obtain one via SubmitIdentityCSR (409 IDENTITY_CSR_NOT_PERMITTED);
it must register a new version instead.
- spec: identityCsrPEM removed from the required list; docsui regenerated.
Tests follow the repo convention (unit-under-test + concern):
- domain/agent_test.go pins nil-CSR acceptance.
- service: RegisterAgent cases in registration_errors_test.go; new
lifecycle_test.go covers VerifyACME/VerifyDNS V1+V2 wire shapes and the
SubmitIdentityCSR guard.
- handler: V2 202 + V1 reaches-ACTIVE parity, plus the 409 add-later path.
Replaces the stale TestV1Register_MissingIdentityCSR_422.
Signed-off-by: James Hateley <jhateley@godaddy.com>
* refactor(ra): address code review feedback on identity CSR submission
Flatten SubmitIdentityCSR with an early-return AGENT_NOT_ACTIVE guard,
removing the now-redundant nested status check.
Reword the no-identity-CSR event tests: identityCert/identityCerts/
validIdentityCerts are all omitempty, so the fields are absent on the
wire when empty rather than serialized as null/empty arrays. Comments
and failure messages no longer assert a wire shape the encoder cannot
produce.
Signed-off-by: James Hateley <jhateley@godaddy.com>
* docs(ra): drop implementation-plan references from test comments
Remove AC-* acceptance-criteria identifiers and plan-relative framing
("RED gauge", "the optional-identity-CSR feature", "as before the
optional path was introduced") from test comments. These pointed at an
implementation plan rather than describing behavior; reword them to
state what each test verifies in product terms.
Signed-off-by: James Hateley <jhateley@godaddy.com>
---------
Signed-off-by: James Hateley <jhateley@godaddy.com>
0 commit comments