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>
Checks an end-entity certificate against the TEFCA FHIR certificate profile and returns one named pass/fail result per requirement: subject OU (RCE-FHIR production, RCE-FHIR-TEST validation), a root -> intermediate -> leaf chain, keyUsage digitalSignature only and critical, basicConstraints cA=false and critical, no dNSName SANs, CN of at most 64 characters equal to a SAN URI, the DirectTrust policy OIDs for production, http CDP and AIA URLs (reachability through an injectable probe), RSA 2048+, SHA-256 with RSA, and validity of at most three years. The exchange purpose in the client SAN URI is not settled, so that check is a replaceable rule that accepts a fragment, last path segment or xp query carrying an authorized XP code, and reports anything else as a warning. The check runs after an end-entity certificate is issued from a TEFCA profile (its name contains "TEFCA"); the results ride on the issuance result and a toast summarizes them. The Explorer runs it on demand for any end-entity certificate, offline or with the CDP/AIA URLs fetched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…URLs SAN URIs are read and compared as case-sensitive strings with no normalization, following HL7 SSRAA 3.0.0: the exchange purpose parser splits the raw SAN on its delimiters only, never percent-decodes or trims, and matches XP codes exactly. Its query parameter name is now configuration (TefcaConformance:ExchangePurposeQueryParameter) with no default; unset, only the fragment and last-path-segment forms are recognized. A parameter repeated with conflicting values is reported as ambiguous (a warning). New check: a server certificate's URI SANs are FHIR base URLs, which SSRAA 3.0.0 says SHALL NOT end with a trailing slash. It fails for server profiles, warns when the certificate's role is unknown, and is skipped for client profiles. The role comes from the profile's certificate type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A server certificate's URI SANs are FHIR base URLs and never carry an exchange purpose, so the SAN exchange purpose check is skipped for server profiles, with that reason. The CN-equals-SAN-URI check still applies to server certificates, against their base-URL SANs. When the role is unknown the SAN form result stays a warning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JoeShook
force-pushed
the
feature/67-tefca-conformance
branch
from
November 22, 2026 14:28
f687dc6 to
25993ed
Compare
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 #67
Depends on #76 (certificate policies): this branch merges
feature/63-certificate-policiesso it can read policy OIDs withCertificatePolicyExtension. Merge #76 first; this diff will then shrink to this PR's own commits.What changed
TefcaConformanceChecker(Sigyll.Common/Services/Tefca): checks an end-entity certificate and its issuing chain and returns named results (Pass/Fail/Warning/Skipped):RCE-FHIR(production) orRCE-FHIR-TEST(validation). The environment can be given, or it is inferred from the OU; an unknown OU gets the production rules./. Server URI SANs are FHIR base URLs, and HL7 SSRAA 3.0.0 says a FHIR base URL SHALL NOT have a trailing slash. This fails for server profiles, warns when the role is unknown (for example an imported certificate), and is skipped for client profiles. The role comes from the profile's certificate type.1.3.6.1.4.1.41179.0.2,.1.5,.3.1present (production only; skipped for validation)http://IUrlReachabilityProbeis supplied, so unit tests never touch the networkITefcaSanFormatRule, reported as a warning, never a failure, because the TEFCA client SAN form is not settled. The default rule accepts an authorized XP code as a fragment (#T-TRTMNT) or last path segment (/T-TRTMNT). It also accepts a query parameter (?{name}=T-TRTMNT), but only when a name is configured inTefcaConformance:ExchangePurposeQueryParameter. There is no default name. Server profiles skip this check (Skipped, with the reason), because their URI SANs are FHIR base URLs that never carry an exchange purpose. When the role is unknown, the result is still a warning.System.Uriis involved. Parameter names compare ordinally, values are taken verbatim, and XP codes must match exactly. If the configured parameter appears more than once with conflicting values, the result is ambiguous (a warning).TefcaConformanceService: runs the check on a stored end-entity certificate, taking the chain from the stored CAs and the role from its profile. It checks the operator (View).HttpUrlReachabilityProbefetches URLs through the existingSigyllCrloutbound client.TefcaConformanceSettingsbinds theTefcaConformanceconfiguration section.IssueCertificateAsyncandIssueCertificateFromCsrAsyncrun the check offline. They put the results on the newCertificateIssuanceResult.ConformanceResultsand log failures. The check reports; it never blocks issuance. A profile counts as TEFCA when its name contains "TEFCA" (TefcaConformanceService.IsTefcaProfile). That is deliberately simple, so the preset profiles in TEFCA FHIR certificate presets (intermediate, client, server; production and validation) #62 can switch to a flag later.Overlap with #66 and #78
#66 adds an XP-from-SAN helper, and #78 is aligning its
ExchangePurposeSan.Extractto the same SSRAA 3.0.0 rules (raw string, configured parameter name with no default, exact match, ambiguous duplicates). This PR depends on neither. Its own parser (TefcaExchangePurpose) isinternal. Once those land, the default SAN rule can call the shared helper and the internal copy can go.Testing
dotnet build Sigyll.slnx: succeedsdotnet test _tests/Sigyll.Signing.Tests: 634 passed, 17 skipped (the PKCS Bump the microsoft group with 18 updates #11/SoftHSM tests, which skip without SoftHSM), 0 failed.TefcaConformanceTestscovers:ServiceBoundaryTestscovers the new service's operator check.I did not exercise the Explorer UI in a browser.
Open questions
ConformanceResultsyet. Should the results go intoIssuanceApiResult?🤖 Generated with Claude Code