Skip to content

fix(cert): bind identity certificates to agent DNS names - #172

Open
barnjamin wants to merge 1 commit into
agentnameservice:mainfrom
barnjamin:fix/identity-certificate-dns-san
Open

barnjamin wants to merge 1 commit into
agentnameservice:mainfrom
barnjamin:fix/identity-certificate-dns-san

Conversation

@barnjamin

Copy link
Copy Markdown

Related issue

Refs agentnameservice/ans-spec#102, which requires identity certificates to carry both the agent-host DNS SAN and the versioned ANSName URI SAN.

Summary

Preserve the validated DNS SAN when issuing identity certificates. Require identity CSRs to contain exactly one matching DNS SAN and URI SAN, with an optional Common Name matching the agent host.

Update existing test fixtures and demo CSR generators. URI-only CSRs and mismatched Common Names previously accepted will now be rejected.

Testing

  • Passed: go test ./internal/crypto/... ./internal/adapter/cert/... ./internal/ra/...
  • Updated the existing issuance test to assert the DNS SAN.
  • Companion DNSid/ANS demo passed local authentication, payout, replay/TLS negative checks, and retirement anchoring. Final retired-state verification stopped on HTTP 429.
  • make check: formatting and vet passed; the pinned linter cannot read Go 1.27 export data. Coverage validation was not reached.

AI assistance

Assisted-by: pi (gpt-6.1-sol)

Checklist

  • The PR title follows Conventional Commits
  • Tests cover the change
  • I linked the relevant issue or proposal, or explained why no separate issue is needed
  • Every commit is signed off (git commit -s) certifying the DCO

Align identity CSR validation and certificate issuance with ANS-2 section 3 (agentnameservice/ans-spec#102). Require one matching URI/DNS SAN and validate the optional CN; preserve the DNS SAN in issued certificates. Update existing fixtures and demo CSR generators.

Validation: crypto, certificate-adapter, and RA suites passed. Local DNSid/ANS integration passed authentication, payout, negative-proof, and retirement anchoring checks; final CLI verification hit HTTP 429. Full make check is blocked by the pinned linter's incompatibility with Go 1.27 export data.
Signed-off-by: Ben Guidarelli <ben.guidarelli@identity.digital>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant