Repository navigation
Conversation
A profile now carries a list of certificate policy OIDs (CertificatePolicyOids, semicolon-delimited like the extended key usages). Issued certificates carry them in a non-critical certificatePolicies extension (RFC 5280 section 4.2.1.4) on the local, CSR, remote-signing and hybrid paths. - CertificatePolicyExtension: parse, validate and normalize policy text, build the extension, and decode it (policy OIDs plus CPS / user notice qualifiers). - Profile editor: a Certificate Policies field with inline OID validation; clone copies the policies; the service refuses entries that are not OIDs. - Certificate viewer: the extension is decoded into its policy OIDs. - Renewal and re-key keep the predecessor's policies: a profile may add policies but not drop any. Compatible-profile filtering and the issuance service both enforce this. Re-sign already copies every extension. - Flyway V11 adds the CertificateProfiles.CertificatePolicyOids column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds an NPI Subject Alternative Name type: an otherName with type-id 2.16.840.1.113883.4.6 and a UTF8String value holding the 10-digit NPI, as the DirectTrust certificate profiles allow for a verified organization or individual covered entity. - SanType.Npi; profiles and SAN lists accept the "NPI" token, the RA API accepts "npi", and the issuance, external-request and CSR dialogs offer it. - Validation: exactly 10 digits with a Luhn check digit computed over the 80840 prefix (NpiNumber), both server-side in ValidateSanValues and in SanExtensionBuilder. - Encoding via BouncyCastle in SanExtensionBuilder. - Read back by CsrGenerationService.ExtractSubjectAltNames, so renewal, re-key, Similar and CSR generation keep the NPI; the explorer parses the stored "Npi:" entries when re-issuing. - Display: SAN extensions containing an otherName are described from the decoded names (e.g. "Npi:1234567893") instead of the platform formatter; other SANs are shown as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eature/62-tefca-presets
Seed preset certificate profiles for TEFCA FHIR (RCE UDAP) certificates, following DirectTrust Certificate Profiles v2.1, Worksheet 4-4 and the Appendix validation profile: - TEFCA Intermediate CA: pathLen 0, keyCertSign + cRLSign, CDP and AIA - TEFCA FHIR Client / Server (production): OU RCE-FHIR, DirectTrust CP, IAL2 and Device policy OIDs - TEFCA FHIR Client / Server (Validation): OU RCE-FHIR-TEST, no policies Leaves are RSA 2048 / SHA-256, 1095 days, keyUsage digitalSignature (critical), basicConstraints cA=false (critical), no EKU, URI SAN required (an NPI otherName may be added), and require RA approval. Seeding adds missing presets by name, so existing databases pick them up once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JoeShook
force-pushed
the
feature/62-tefca-presets
branch
from
November 22, 2026 14:28
89dbed9 to
55330d2
Compare
Owner
Author
|
Scope addition from #76: certificate profiles should be able to configure certificatePolicies qualifiers (CPS URI and user notice), not only decode them for display. #76 ships OID-only policies; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #62
Depends on #76 (certificatePolicies) and #77 (NPI otherName). This branch merges both, so the diff includes their changes for now; it will shrink to the TEFCA commit once they merge.
What changed
New preset certificate profiles, following DirectTrust Certificate Profiles v2.1, Worksheet 4-4 (TEFCA RCE (UDAP)) and the Appendix validation profile. They live in
Sigyll.Common/Services/TefcaCertificateProfiles.cs, andPresetProfiles()inProgram.csadds them next to Root CA, Intermediate CA, UDAP Client, SSL Server and the PQC presets.RCE-FHIR; certificatePolicies1.3.6.1.4.1.41179.0.2,.1.5,.3.1RCE-FHIR-TEST; no certificate policiesAll four leaves: RSA 2048, SHA-256, 1095 days, keyUsage digitalSignature only (critical), basicConstraints cA=false (critical), no EKU, URI SAN required, RA approval required, no auto-issue. Subject template
CN={UDAP URI}, OU=<ou>, O={Organization}, ST={State}, C=US. NPI is left offSubjectAltNameTypesbecause a listed type is required. The NPI otherName from #77 can still be added at issuance.Seeding still adds any missing preset by name, so an existing database gets the five new rows once and later starts add nothing. No schema change.
Tests
dotnet build Sigyll.slnx: 0 warnings, 0 errorsdotnet test _tests/Sigyll.Signing.Tests: 607 passed, 17 skipped (PKCS Bump the microsoft group with 18 updates #11/SoftHSM), 0 failedTefcaCertificateProfilesTests(10 tests): checks the preset values, issues from a CSR with the production and validation leaf presets and checks KU/BC criticality, no EKU, SHA-256, URI + NPI SANs and the policies, and checks that a request without a URI SAN is rejected.Open questions
SubjectAltNameTypeslists required types, not allowed ones. Enforcing it needs a new "allowed SAN types" constraint (column + migration + UI). Should that be a follow-up issue?NotAfter, and nothing caps it at the profile'sValidityDays. The key size comes from the profile for server-generated keys, but a CSR's key size is not checked.🤖 Generated with Claude Code